-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (34 loc) · 943 Bytes
/
push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
on:
push:
branches:
- main
permissions:
contents: read
id-token: write
jobs:
build-and-push:
name: Build and push GAR
runs-on: ubuntu-20.04
outputs:
image: ${{ steps.docker-build-push.outputs.image }}
steps:
- uses: actions/checkout@v4
- name: Push docker image to GAR
uses: nais/docker-build-push@v0
id: docker-build-push
with:
team: nada
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
deploy-prod:
name: Deploy prod gcp
runs-on: ubuntu-20.04
needs: [build-and-push]
steps:
- uses: actions/checkout@v4
- name: Deploy to dev-gcp
uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: prod-gcp
RESOURCE: .nais/naisjob.yaml,.nais/alerts.yaml
VAR: image=${{ needs.build-and-push.outputs.image }}