@@ -24,33 +24,23 @@ jobs:
24
24
name : Deploy to GCP
25
25
runs-on : ubuntu-latest
26
26
steps :
27
+ - uses : actions/checkout@v2
28
+ - name : Create artifact version
29
+ id : artifact-version
30
+ uses : navikt/sosialhjelp-ci/actions/create-artifact-version@master
27
31
- name : Sett env variabler
28
32
run : |
29
33
PROJECT_NAME=$(echo ${{ github.repository }} | cut -d/ -f2)
30
- echo "IMAGE=docker.pkg.github.com/${{ github.repository }}/$PROJECT_NAME:${{ github.event.client_payload.TAG }}" >> $GITHUB_ENV
31
-
32
- - name : Sett cluster og config fra repository_dispatch
33
- if : github.event_name == 'repository_dispatch'
34
- run : |
35
- echo "CLUSTER_NAME=${{ github.event.client_payload.cluster }}" >> $GITHUB_ENV
36
- echo "CONFIG_FILE=${{ github.event.client_payload.config-file-name }}" >> $GITHUB_ENV
37
- - name : Sett cluster og config fra workflow_dispatch
38
- if : github.event_name == 'workflow_dispatch'
39
- run : |
34
+ echo "IMAGE=docker.pkg.github.com/${{ github.repository }}/$PROJECT_NAME:${{ steps.artifact-version.outputs.version }}" >> $GITHUB_ENV
40
35
echo "CLUSTER_NAME=${{ github.event.inputs.cluster }}" >> $GITHUB_ENV
41
36
echo "CONFIG_FILE=${{ github.event.inputs.config-file-name }}" >> $GITHUB_ENV
42
-
43
- - uses : actions/checkout@v2
44
- with :
45
- ref : ${{ github.event.client_payload.TAG }}
46
-
47
37
- name : Deploy til GCP
48
38
uses : nais/deploy/actions/deploy@v1
49
39
env :
50
40
APIKEY : ${{ secrets.NAIS_DEPLOY_APIKEY }}
51
41
RESOURCE : nais.yaml
52
42
CLUSTER : ${{ env.CLUSTER_NAME }}
53
43
VARS : nais/${{ env.CONFIG_FILE }}.json
54
- REF : ${{ github.event.client_payload.TAG }}
44
+ REF : ${{ steps.artifact-version.outputs.version }}
55
45
PRINT_PAYLOAD : true
56
46
IMAGE : ${{ env.IMAGE }}
0 commit comments