From af74604198dc48e57a15a6980f5f5dd2f3c25452 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Wed, 28 Feb 2024 15:06:04 +0100 Subject: [PATCH] build: fix the CI on main --- .github/workflows/ci.yml | 8 +++++--- terraform_infra/artifact_registry.tf | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ba922ce..f6111198 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,7 @@ env: jobs: frontend: + if: github.event_name != 'push' runs-on: ubuntu-22.04 permissions: contents: read @@ -47,6 +48,7 @@ jobs: test: runs-on: ubuntu-22.04 + if: github.event_name != 'push' steps: - name: Clone repository uses: actions/checkout@v4 @@ -90,7 +92,7 @@ jobs: working-directory: api docker-images: - if: github.event_name == 'merge_group' || github.ref == 'refs/heads/main' + if: github.event_name == 'merge_group' || github.event_name == 'push' runs-on: ubuntu-22.04 permissions: contents: read @@ -155,7 +157,7 @@ jobs: run: echo "image_id=${{ env.FRONTEND_IMAGE_ID_BASE }}@${{ steps.frontend_push.outputs.imageid }}" >> $GITHUB_OUTPUT staging: - if: github.event_name == 'merge_group' || github.ref == 'refs/heads/main' + if: github.event_name == 'merge_group' runs-on: ubuntu-22.04 needs: docker-images environment: @@ -204,7 +206,7 @@ jobs: run: deno task tf:staging:apply prod: - if: github.ref == 'refs/heads/main' + if: github.event_name == 'push' || github.ref == 'refs/heads/main' runs-on: ubuntu-22.04 needs: docker-images environment: diff --git a/terraform_infra/artifact_registry.tf b/terraform_infra/artifact_registry.tf index c1cc020c..e0e66fbc 100644 --- a/terraform_infra/artifact_registry.tf +++ b/terraform_infra/artifact_registry.tf @@ -4,7 +4,7 @@ resource "google_artifact_registry_repository" "registry" { repository_id = "registry" format = "DOCKER" docker_config { - immutable_tags = true + immutable_tags = false } }