From 716da34a03e422c6a7b8b00a169a3cee822664dd Mon Sep 17 00:00:00 2001 From: Greg Konush <12027037+gregkonush@users.noreply.github.com> Date: Fri, 23 Aug 2024 23:21:44 -0700 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Adjust=20docker=20workflow=20for=20?= =?UTF-8?q?main=20branch=20deployment.=20(#187)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker-build-push.yaml | 16 ++++++++-------- apps/ecran/kustomize/deployment.yaml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker-build-push.yaml b/.github/workflows/docker-build-push.yaml index cb9e829..6dbf2e5 100644 --- a/.github/workflows/docker-build-push.yaml +++ b/.github/workflows/docker-build-push.yaml @@ -5,7 +5,10 @@ on: branches: - "main" tags: - - "v*.*.*" + - "v*" + pull_request: + branches: + - "main" jobs: docker: @@ -33,13 +36,10 @@ jobs: gitea.proompteng.ai/d/lab/ecran gitea.proompteng.ai/d/lab/ledos tags: | - type=schedule type=ref,event=branch type=ref,event=pr type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} - type=sha - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx @@ -56,10 +56,10 @@ jobs: platforms: linux/arm64 context: ./apps/ecran file: ./apps/ecran/Dockerfile - push: true + push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - cache-from: type=registry,ref=gitea.proompteng.ai/d/lab/ecran:latest + cache-from: type=registry,ref=gitea.proompteng.ai/d/lab/ecran:main cache-to: type=inline - name: Build and push ledos uses: docker/build-push-action@v5 @@ -67,8 +67,8 @@ jobs: platforms: linux/arm64 context: ./apps/ledos file: ./apps/ledos/Dockerfile - push: true + push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - cache-from: type=registry,ref=gitea.proompteng.ai/d/lab/ledos:latest + cache-from: type=registry,ref=gitea.proompteng.ai/d/lab/ledos:main cache-to: type=inline diff --git a/apps/ecran/kustomize/deployment.yaml b/apps/ecran/kustomize/deployment.yaml index 89d80b5..d6be353 100644 --- a/apps/ecran/kustomize/deployment.yaml +++ b/apps/ecran/kustomize/deployment.yaml @@ -18,7 +18,7 @@ spec: - name: gitea-registry containers: - name: ecran - image: gitea.proompteng.ai/d/lab/ecran:latest + image: gitea.proompteng.ai/d/lab/ecran:main imagePullPolicy: Always ports: - containerPort: 3000