Feat: add release image workflows
Some checks failed
Go test / run-go-vet (push) Successful in 5s
Go test / check-swagger-up-to-date (push) Successful in 9s
Go test / run-go-test (push) Successful in 27s
Go test / cleanup-go-test (push) Successful in 14s
Go test / release-image (push) Failing after 56s

This commit is contained in:
2025-12-09 01:55:15 +08:00
parent 2208307c48
commit 54c7659ee8
4 changed files with 55 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,18 @@ 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: Checkout repository
uses: actions/checkout@v4
- name: Build binary
run: make backend
- 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 }}