From 5183f9743b0bbf343227b303cf2d83e99fbfcd6b Mon Sep 17 00:00:00 2001 From: Sebastian Slettebakken <43045439+sebastas@users.noreply.github.com> Date: Tue, 11 Nov 2025 19:42:16 +0100 Subject: [PATCH] feat: add Gitea Actions workflow for building and publishing Docker image on release --- .gitea/workflows/publish.yaml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .gitea/workflows/publish.yaml diff --git a/.gitea/workflows/publish.yaml b/.gitea/workflows/publish.yaml new file mode 100644 index 0000000..945170d --- /dev/null +++ b/.gitea/workflows/publish.yaml @@ -0,0 +1,48 @@ +name: Build and publish Docker image + +on: + release: + types: [published] + +env: + REGISTRY: gitea.kanawave.net + REGISTRY_USERNAME: sebastas + IMAGE_NAME: ${{ gitea.repository }} + +jobs: + build-and-push: + runs-on: ubuntu-latest + + # Permissions are not yet supported in Gitea Actions -> https://github.com/go-gitea/gitea/issues/23642#issuecomment-2119876692 + # permissions: + # contents: read + # packages: write + # attestations: write + # id-token: write + + steps: + - name: Checkout + uses: actions/checkout@v5 + + - name: Login to registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ env.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + + - name: Extract metadata (tags, labels) + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Build and push + id: push + uses: docker/build-push-action@v6 + with: + context: . + # file: ./Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}