**feat(ci):** introduce release workflow with version bump, Docker image build, and Gitea release automation
All checks were successful
CI / build-test (push) Successful in 1m2s

This commit is contained in:
2026-02-25 21:12:40 +01:00
parent 8af8131c9f
commit 0c456d9c78
2 changed files with 113 additions and 31 deletions

View File

@@ -38,34 +38,3 @@ jobs:
- name: Build binary
run: go build ./...
docker:
runs-on: dind
needs: build-test
if: gitea.event_name == 'push'
env:
DOCKER_HOST: tcp://dind:2375
steps:
- name: Install dependencies
run: apk add --no-cache git
- name: Checkout
run: |
GITEA_HOST="${{ gitea.server_url }}"
GITEA_HOST="${GITEA_HOST#https://}"
GITEA_HOST="${GITEA_HOST#http://}"
git clone "https://oauth2:${{ secrets.GITEA_TOKEN }}@${GITEA_HOST}/${{ gitea.repository }}.git" .
git checkout ${{ gitea.sha }}
- name: Log in to Gitea registry
run: |
REGISTRY="${{ gitea.server_url }}"
REGISTRY="${REGISTRY#https://}"
REGISTRY="${REGISTRY#http://}"
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login "$REGISTRY" -u "${{ gitea.actor }}" --password-stdin
- name: Build and push
run: |
REGISTRY="${{ gitea.server_url }}"
REGISTRY="${REGISTRY#https://}"
REGISTRY="${REGISTRY#http://}"
IMAGE="$REGISTRY/$(echo '${{ gitea.repository }}' | tr '[:upper:]' '[:lower:]')"
docker build -t "$IMAGE:${{ gitea.sha }}" -t "$IMAGE:latest" .
docker push "$IMAGE:${{ gitea.sha }}"
docker push "$IMAGE:latest"