Feat: add release image workflows

Fix:
- transaction didn't do shit because of my shit code
This commit is contained in:
2025-12-09 01:28:59 +08:00
parent 2208307c48
commit a2b00e6976
3 changed files with 41 additions and 10 deletions

View File

@@ -10,8 +10,28 @@ jobs:
uses: actions/checkout@v4
- name: Run go vet
run: go vet
check-swagger-up-to-date:
runs-on: imgbuilder
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run make swagger
run: make swagger
- name: Check diff
run: |
if ! git diff --exit-code; then
echo "ERROR: swagger introduced uncommitted changes!"
echo "Please commit generated files."
git status
git diff
exit 1
else
echo "No uncommitted changes detected. OpenAPI is up-to-date."
fi
run-go-test:
needs: run-go-vet
needs:
- run-go-vet
- check-swagger-up-to-date
runs-on: imgbuilder
steps:
- name: Checkout repository
@@ -29,3 +49,14 @@ jobs:
uses: actions/checkout@v4
- name: Run make docker-clean
run: make docker-clean
release-image:
needs:
- run-go-test
runs-on: imgbuilder
steps:
- name: Build and push image
uses: https://gitea.konchin.com/action/docker@main
with:
registry-certificate: ${{ vars.ROOTCA }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}