Skip to content

Bytter til bruk av Sanity tekster for å legge til nytt barn i "Velg b… #804

Bytter til bruk av Sanity tekster for å legge til nytt barn i "Velg b…

Bytter til bruk av Sanity tekster for å legge til nytt barn i "Velg b… #804

name: Build, push, and deploy app to prod
on:
workflow_dispatch:
branches:
- main
push:
branches:
- 'main'
env:
BASE_PATH: /barnetrygd/soknad/
jobs:
test:
name: Kjør typecheck og tester
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: "https://npm.pkg.github.com"
env:
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
- name: Installer node-pakker
run: yarn --prefer-offline --frozen-lockfile
- name: Kjør typecheck
run: yarn typecheck
- name: Kjør tester
run: yarn test
bygg:
name: Bygg app/image og push til GitHub
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: "https://npm.pkg.github.com"
- name: Yarn install
env:
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_RELEASE: ${{ github.sha }}
BASE_PATH: ${{ env.BASE_PATH }}
run: |
yarn --prefer-offline --frozen-lockfile
yarn build
- uses: nais/docker-build-push@v0
id: docker-push
with:
team: teamfamilie
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
outputs:
image: ${{ steps.docker-push.outputs.image }}
deploy-preprod:
name: Deploy til dev-gcp
needs:
- bygg
- test
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- name: Deploy til dev-gcp team namespace
uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: dev-gcp
RESOURCE: build_n_deploy/naiserator/naiserator_dev.yaml
VAR: base_path=${{ env.BASE_PATH }}
IMAGE: ${{ needs.bygg.outputs.image }}
deploy-prod:
name: Deploy til prod-gcp
needs:
- bygg
- test
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- name: Deploy til prod-gcp team namespace
uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: prod-gcp
RESOURCE: build_n_deploy/naiserator/naiserator_prod.yaml
VAR: base_path=${{ env.BASE_PATH }}
IMAGE: ${{ needs.bygg.outputs.image }}