diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e504fd5..dcf92f5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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