Skip to content

Commit

Permalink
build: fix the CI on main
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacasonato committed Feb 28, 2024
1 parent 9288c6a commit af74604
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:

jobs:
frontend:
if: github.event_name != 'push'
runs-on: ubuntu-22.04
permissions:
contents: read
Expand Down Expand Up @@ -47,6 +48,7 @@ jobs:

test:
runs-on: ubuntu-22.04
if: github.event_name != 'push'
steps:
- name: Clone repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion terraform_infra/artifact_registry.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resource "google_artifact_registry_repository" "registry" {
repository_id = "registry"
format = "DOCKER"
docker_config {
immutable_tags = true
immutable_tags = false
}
}

Expand Down

0 comments on commit af74604

Please sign in to comment.