Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
elacheche authored Dec 20, 2019
1 parent 9067f7d commit ad060b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
steps:
- name: Run a multi-line script
run: |
LATEST=$(curl -s -H "Authorization: token $UPLOAD_ASSETS" https://api.github.com/repos/elacheche/docker_check/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) ".tar.gz"}')
LATEST=$(curl -s -H "Authorization: token ${{ secrets.UPLOAD_ASSETS }}" https://api.github.com/repos/elacheche/docker_check/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) ".tar.gz"}')
curl -Lso $LATEST https://github.com/elacheche/docker_check/archive/$LATEST
tar xzf $LATEST
FILE=$(ls docker_check*/docker_check.py)
UPLOAD_URL=$(curl -s https://api.github.com/repos/elacheche/docker_check/releases/latest | awk '/upload_url/ {gsub("\"","");gsub(",","");gsub("{.*}","");print $2"?name=docker_check________.py"}')
curl -s -H "Authorization: token $UPLOAD_ASSETS" -H "Content-Type: $(file -b --mime-type $FILE)" --data-binary @$FILE $UPLOAD_URL
curl -s -H "Authorization: token ${{ secrets.UPLOAD_ASSETS }}" -H "Content-Type: $(file -b --mime-type $FILE)" --data-binary @$FILE $UPLOAD_URL

0 comments on commit ad060b7

Please sign in to comment.