From 49b374f846389af0fff9ae9284176716b3874fac Mon Sep 17 00:00:00 2001 From: dylan Date: Fri, 31 Jan 2025 19:55:10 +0100 Subject: [PATCH] Add image-build.yaml --- .gitea/workflows/image-build.yaml | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .gitea/workflows/image-build.yaml diff --git a/.gitea/workflows/image-build.yaml b/.gitea/workflows/image-build.yaml new file mode 100644 index 0000000..401a2e9 --- /dev/null +++ b/.gitea/workflows/image-build.yaml @@ -0,0 +1,35 @@ +name: Build and Push Docker Image on Tag + +on: + push: + tags: + - "v*" + +jobs: + build: + name: Build and Push Docker Image + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + registry: code.dlmw.ch + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push + uses: docker/build-push-action@v6 + with: + platforms: linux/amd64,linux/arm64 + push: true + tags: code.dlmw.ch/dlmw/qv:${{ env.GITHUB_REF_NAME }}