Skip to content

Deploy to Production #520

Deploy to Production

Deploy to Production #520

Workflow file for this run

name: Deploy til prod
on:
workflow_run:
workflows: ["Build image"] # Venter på at bygg av image er ferdig
branches: [master]
types:
- completed
repository_dispatch:
types: [deploy_prod_tag]
jobs:
deploy-fss:
name: Deploy to prod-fss
if: ${{ github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
env:
DOCKER_IMAGE: ghcr.io/${{ github.repository }}/${{ github.event.repository.name }}
steps:
- uses: actions/checkout@v3
- name: Create artifact version
id: artifact-version
uses: navikt/sosialhjelp-ci/actions/create-artifact-version@v2
- name: Create docker image tags
run: |
echo "DOCKER_TAG=${{ env.DOCKER_IMAGE }}:${{ steps.artifact-version.outputs.version }}" >> $GITHUB_ENV
- name: deploy til prod-fss
uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
RESOURCE: nais/prod/prod-fss.yaml
CLUSTER: prod-fss
REF: ${{ github.sha }}
PRINT_PAYLOAD: true
IMAGE: ${{ env.DOCKER_TAG }}