name: Release image on: push: tags: ['v*'] workflow_dispatch: jobs: build-and-push: name: Build and push single-container image runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: docker/setup-buildx-action@v3 # secrets.GITEA_TOKEN cannot push to the Gitea container registry — a documented Gitea # limitation, not a misconfiguration (see CLAUDE.md). REGISTRY_TOKEN is a separate PAT with # package:write, expected to already exist as a repo secret. - uses: docker/login-action@v3 with: registry: 192.168.0.3:3000 username: BBergle password: ${{ secrets.REGISTRY_TOKEN }} - name: Resolve image tag id: tag run: | if [ "${{ gitea.ref_type }}" = "tag" ]; then echo "value=${{ gitea.ref_name }}" >> "$GITHUB_OUTPUT" else echo "value=manual-$(date -u +%Y%m%d%H%M%S)" >> "$GITHUB_OUTPUT" fi - uses: docker/build-push-action@v6 with: context: . file: Dockerfile push: true tags: | 192.168.0.3:3000/bbergle/bike-app:latest 192.168.0.3:3000/bbergle/bike-app:${{ steps.tag.outputs.value }}