name: Release on: push: tags: ['v*'] workflow_dispatch: jobs: build-and-push: name: Build and push images runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Determine image tag id: tag run: | if [ "${{ gitea.ref_type }}" = "tag" ]; then echo "tag=${{ gitea.ref_name }}" >> "$GITHUB_OUTPUT" else echo "tag=manual-$(date -u +%Y%m%d%H%M%S)" >> "$GITHUB_OUTPUT" fi - uses: docker/setup-buildx-action@v3 # NOT secrets.GITEA_TOKEN — it cannot push to the Gitea container registry (documented # Gitea limitation, see CLAUDE.md). REGISTRY_TOKEN is a separate PAT with `package:write` # scope that a human must create in Settings -> Applications and add as a repo Actions # secret before this workflow can succeed. - uses: docker/login-action@v3 with: registry: 192.168.0.3:3000 username: ${{ gitea.actor }} password: ${{ secrets.REGISTRY_TOKEN }} - name: Build and push API image uses: docker/build-push-action@v6 with: context: apps/api push: true tags: | 192.168.0.3:3000/bbergle/velodrome-api:${{ steps.tag.outputs.tag }} 192.168.0.3:3000/bbergle/velodrome-api:latest - name: Build and push web image uses: docker/build-push-action@v6 with: context: apps/web push: true tags: | 192.168.0.3:3000/bbergle/velodrome-web:${{ steps.tag.outputs.tag }} 192.168.0.3:3000/bbergle/velodrome-web:latest