Created
August 30, 2016 18:16
-
-
Save matt-forster/53e4f45d36845d3d3790f8d662efe613 to your computer and use it in GitHub Desktop.
Get a file from a repo on github - used in CI.
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
# Get a file from a repo on github | |
TOKEN=$GITHUB_TOKEN | |
OWNER=$1 | |
REPO=$2 | |
PATH=$3 | |
FILE="https://api.github.com/repos/$OWNER/$REPO/contents/$PATH" | |
/usr/bin/curl -v --header "Authorization: token $TOKEN" \ | |
--header 'Accept: application/vnd.github.v3.raw' \ | |
--remote-name \ | |
--location $FILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment