Created
October 18, 2017 22:05
-
-
Save IlyaFinkelshteyn/1deffbd1f73dee326aceb5de88524d6a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#environment variables to set in build config | |
$env:gh_user = "<github_user>" | |
$env:gh_repo = "<github_repo>" | |
$env:gh_token = "<your_sha>" #secure variable | |
$headers = @{ | |
"Authorization" = "Bearer $env:gh_token" | |
"Content-type" = "application/json" | |
} | |
$commit = Invoke-RestMethod -Uri "https://api.github.com/repos/$env:gh_user/$env:gh_repo/commits/$env:APPVEYOR_REPO_COMMIT" -Headers $headers -Method GET | |
Write-host "Files changed:" | |
$commit.files | % {$_.filename} | |
if (($commit.files.filename -like "*.md") -and !($commit.files.filename -notlike "*.md")) { | |
Write-host "only *.md files found, exiting..."; Exit-AppveyorBuild | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment