Skip to content

Merge branch 'main' of https://github.com/navikt/hotsak-frontend #753

Merge branch 'main' of https://github.com/navikt/hotsak-frontend

Merge branch 'main' of https://github.com/navikt/hotsak-frontend #753

Workflow file for this run

name: Bygg, deploy til dev-gcp og lag release
on:
push:
paths-ignore:
- '**.md'
- '.gitignore'
- 'LICENCE'
- 'CODEOWNERS'
branches:
- main
- bosted
- barnebrille-saker-direkteoppgjorslosningen
env:
IMAGE: ghcr.io/${{ github.repository }}:${{ github.sha }}
jobs:
# test:
# name: Kjør Cypress-tester
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Cypress run
# uses: cypress-io/github-action@v5
# with:
# start: npm run dev
# wait-on: 'http://ip6-localhost:3001'
# working-directory: client
# config-file: cypress.config.ts
# record: false
build:
name: Bygg, deploy til dev-gcp og lag release
permissions:
packages: write
contents: write
id-token: write
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: navikt/digihot-deploy/actions/pre-deploy@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_IMAGE: ghcr.io/navikt/hotsak-frontend
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v3
with:
push: true
tags: ${{ env.IMAGE }}
cache-from: type=gha
cache-to: type=gha,mode=max
context: .
- name: Deploy til dev-gcp
uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: dev-gcp
RESOURCE: .nais/dev.yaml
VAR: commit=${{ github.sha }}
- uses: navikt/digihot-deploy/actions/post-deploy@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/create-release@latest
if: github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION_TAG }}
release_name: ${{ env.APPLICATION }} ${{ env.VERSION_TAG }}
body: ${{ env.CHANGE_LOG }}
draft: true
prerelease: false
- name: Deploy to dev-gcp (labs)
if: github.ref == 'refs/heads/main'
uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: dev-gcp
RESOURCE: .nais/labs.yaml
VAR: commit=${{ github.sha }}