From e7e876a81a38cf740094eeeb24738e99e4621940 Mon Sep 17 00:00:00 2001 From: Arne Baeumler Date: Thu, 11 Jun 2026 20:39:33 +0200 Subject: [PATCH] feat: add ci pipeline --- .gitea/workflows/publish-docker.yml | 46 +++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .gitea/workflows/publish-docker.yml diff --git a/.gitea/workflows/publish-docker.yml b/.gitea/workflows/publish-docker.yml new file mode 100644 index 0000000..60ee8e8 --- /dev/null +++ b/.gitea/workflows/publish-docker.yml @@ -0,0 +1,46 @@ +--- +name: Build and Publish Docker Image +on: + push: + branches: + - main + tags: + - 'v*' + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Log in to Gitea Container Registry + uses: docker/login-action@v3 + with: + registry: git.br0tkasten.de + username: ${{ gitea.actor }} + # access token of the user triggering this action + # in gitea -> user settings -> applications -> new token -> write:packages and write:repositories + # then in gitea -> user settings -> actions -> secrets -> add new secret named "TOKEN" with the value of the access token. + password: ${{ secrets.TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: git.br0tkasten.de/${{ gitea.repository }} + flavor: | + latest=true + tags: | + type=ref,event=branch + type=semver,pattern={{version}} + type=sha + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} +