Update secret token
This commit is contained in:
@@ -20,19 +20,19 @@ jobs:
|
|||||||
|
|
||||||
- name: Create Gitea release (if needed)
|
- name: Create Gitea release (if needed)
|
||||||
run: curl -s -X POST \
|
run: curl -s -X POST \
|
||||||
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
-H "Authorization: token ${{ secrets.PUBLISH_TOKEN }}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d "{\"tag_name\": \"${GITEA_REF_NAME}\", \"name\": \"${GITEA_REF_NAME}\"}" \
|
-d "{\"tag_name\": \"${GITEA_REF_NAME}\", \"name\": \"${GITEA_REF_NAME}\"}" \
|
||||||
https://${GITEA_SERVER}/api/v1/repos/${GITEA_REPOSITORY}/releases || true
|
https://${GITEA_SERVER}/api/v1/repos/${GITEA_REPOSITORY}/releases || true
|
||||||
|
|
||||||
- name: Get release ID
|
- name: Get release ID
|
||||||
id: get_release
|
id: get_release
|
||||||
run: RELEASE_JSON=$(curl -s -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
run: RELEASE_JSON=$(curl -s -H "Authorization: token ${{ secrets.PUBLISH_TOKEN }}" \
|
||||||
https://${GITEA_SERVER}/api/v1/repos/${GITEA_REPOSITORY}/releases/tags/${GITEA_REF_NAME})
|
https://${GITEA_SERVER}/api/v1/repos/${GITEA_REPOSITORY}/releases/tags/${GITEA_REF_NAME})
|
||||||
echo "release_id=$(echo $RELEASE_JSON | jq -r .id)" >> $GITEA_OUTPUT
|
echo "release_id=$(echo $RELEASE_JSON | jq -r .id)" >> $GITEA_OUTPUT
|
||||||
|
|
||||||
- name: Upload tarball to Gitea release
|
- name: Upload tarball to Gitea release
|
||||||
run: curl -s -X POST \
|
run: curl -s -X POST \
|
||||||
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
-H "Authorization: token ${{ secrets.PUBLISH_TOKEN }}" \
|
||||||
-F "attachment=@myapp-${GITEA_REF_NAME}.tar" \
|
-F "attachment=@myapp-${GITEA_REF_NAME}.tar" \
|
||||||
https://${GITEA_SERVER}/api/v1/repos/${GITEA_REPOSITORY}/releases/${{ steps.get_release.outputs.release_id }}/assets
|
https://${GITEA_SERVER}/api/v1/repos/${GITEA_REPOSITORY}/releases/${{ steps.get_release.outputs.release_id }}/assets
|
||||||
Reference in New Issue
Block a user