Skip to content

Deploy 'Design_endringer_for_søknad_i_forkant_av_kort_søknad' to 'mock' #352

Deploy 'Design_endringer_for_søknad_i_forkant_av_kort_søknad' to 'mock'

Deploy 'Design_endringer_for_søknad_i_forkant_av_kort_søknad' to 'mock' #352

name: 'Build and deploy to mock-ekstern'
run-name: Deploy '${{ github.ref_name }}' to 'mock'
on:
push:
branches: [master]
workflow_dispatch:
env:
DOCKER_IMAGE: ghcr.io/${{ github.repository }}/${{ github.event.repository.name }}
REACT_APP_DIGISOS_ENV: mock
jobs:
build-image:
name: 'Build Artifact and Image'
runs-on: ubuntu-latest
outputs:
docker-tag: ${{ steps.docker-image.outputs.full-tag }}
artifact-version: ${{ steps.docker-image.outputs.artifact-version }}
permissions:
contents: write
packages: write
actions: write
env:
READER_TOKEN: ${{ secrets.READER_TOKEN }}
WORKFLOW_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: 'Build Docker Image'
id: docker-image
uses: navikt/sosialhjelp-soknad/.github/actions/build-image@master
with:
prefix: ${{ env.REACT_APP_DIGISOS_ENV }}
deploy-app:
name: 'Deploy Application'
runs-on: ubuntu-latest
needs: build-image
permissions:
packages: write
contents: write
steps:
- uses: actions/checkout@v4
- id: docker-image-tag
run: |
echo "IMAGE_TAG=${{ env.DOCKER_IMAGE }}:${{ needs.build-image.outputs.docker-tag }}" >> $GITHUB_ENV
- name: Deploy til dev
uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
RESOURCE: nais/mock.yaml
CLUSTER: dev-gcp
REF: ${{ github.sha }}
PRINT_PAYLOAD: true
IMAGE: ${{ env.IMAGE_TAG }}