From e06e4efbf8424ac67d2b671c023aa9d22bca3422 Mon Sep 17 00:00:00 2001 From: christian Date: Mon, 5 May 2025 17:38:39 +0200 Subject: [PATCH] added workflow for building image --- .gitea/workflows/build-image.yaml | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .gitea/workflows/build-image.yaml diff --git a/.gitea/workflows/build-image.yaml b/.gitea/workflows/build-image.yaml new file mode 100644 index 0000000..3f7b6c8 --- /dev/null +++ b/.gitea/workflows/build-image.yaml @@ -0,0 +1,37 @@ + +name: Build and Push Docker Image + +on: + push: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: gitea.rannes.dev/rannes.dev/resume + tags: | + type=sha,prefix={{branch}}- + type=raw,value=latest + + - name: Login to Gitea Registry + uses: docker/login-action@v3 + with: + registry: gitea.rannes.dev + username: ${{ secrets.REGISTRY_USER }} + password: ${{ secrets.REGISTRY_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}