Skip to content
This repository was archived by the owner on Aug 11, 2025. It is now read-only.

Commit 195267c

Browse files
authored
Update deploy_gcp.yml (#25)
1 parent f0282fe commit 195267c

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

.github/workflows/deploy_gcp.yml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,33 +24,23 @@ jobs:
2424
name: Deploy to GCP
2525
runs-on: ubuntu-latest
2626
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
2731
- name: Sett env variabler
2832
run: |
2933
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
4035
echo "CLUSTER_NAME=${{ github.event.inputs.cluster }}" >> $GITHUB_ENV
4136
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-
4737
- name: Deploy til GCP
4838
uses: nais/deploy/actions/deploy@v1
4939
env:
5040
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
5141
RESOURCE: nais.yaml
5242
CLUSTER: ${{ env.CLUSTER_NAME }}
5343
VARS: nais/${{ env.CONFIG_FILE }}.json
54-
REF: ${{ github.event.client_payload.TAG }}
44+
REF: ${{ steps.artifact-version.outputs.version }}
5545
PRINT_PAYLOAD: true
5646
IMAGE: ${{ env.IMAGE }}

0 commit comments

Comments
 (0)