feat: auto-create Gitea releases on tag push
All checks were successful
Deploy CodeBoard / deploy (push) Successful in 1m36s
All checks were successful
Deploy CodeBoard / deploy (push) Successful in 1m36s
This commit is contained in:
@@ -62,6 +62,19 @@ jobs:
|
|||||||
docker compose logs web --tail 50
|
docker compose logs web --tail 50
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
|
- name: Create Gitea Release
|
||||||
|
if: startsWith(gitea.ref, 'refs/tags/')
|
||||||
|
env:
|
||||||
|
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
|
run: |
|
||||||
|
TAG="${{ gitea.ref_name }}"
|
||||||
|
curl -s -X POST \
|
||||||
|
"https://gitea.vectry.tech/api/v1/repos/Vectry/codeboard/releases" \
|
||||||
|
-H "Authorization: token ${RELEASE_TOKEN}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{\"tag_name\": \"${TAG}\", \"name\": \"${TAG}\", \"body\": \"Automated release for ${TAG}\", \"draft\": false, \"prerelease\": false}" \
|
||||||
|
|| echo "Release may already exist — skipping"
|
||||||
|
|
||||||
- name: Cleanup
|
- name: Cleanup
|
||||||
if: always()
|
if: always()
|
||||||
run: docker image prune -f
|
run: docker image prune -f
|
||||||
|
|||||||
Reference in New Issue
Block a user