Skip to content

Commit b09dd09

Browse files
committed
Bruk trunk-based
1 parent 4c550a1 commit b09dd09

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
build:
1010
name: Test and build
1111
runs-on: ubuntu-latest
12-
if: github.ref != 'refs/heads/dev' && github.ref != 'refs/heads/master'
12+
if: github.ref != 'refs/heads/master'
1313
steps:
1414
- uses: actions/checkout@v4
1515
- name: Set up JDK 21
@@ -30,7 +30,7 @@ jobs:
3030

3131
build-and-push:
3232
name: Build and push Docker container
33-
if: github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/master'
33+
if: github.ref == 'refs/heads/master'
3434
runs-on: ubuntu-latest
3535
permissions:
3636
packages: write
@@ -60,8 +60,9 @@ jobs:
6060
deploy-dev:
6161
name: Deploy to dev-gcp
6262
needs: build-and-push
63-
if: github.ref == 'refs/heads/dev'
63+
if: github.ref == 'refs/heads/master'
6464
runs-on: ubuntu-latest
65+
environment: dev-gcp
6566
permissions:
6667
contents: read
6768
id-token: write
@@ -79,6 +80,7 @@ jobs:
7980
needs: build-and-push
8081
if: github.ref == 'refs/heads/master'
8182
runs-on: ubuntu-latest
83+
environment: prod-gcp
8284
permissions:
8385
contents: read
8486
id-token: write
@@ -89,4 +91,4 @@ jobs:
8991
PRINT_PAYLOAD: true
9092
CLUSTER: prod-gcp
9193
RESOURCE: .nais/prod.yml
92-
VAR: image=${{ needs.build-and-push.outputs.image }}
94+
VAR: image=${{ needs.build-and-push.outputs.image }}

0 commit comments

Comments
 (0)