Personlinje header oppsett & ekspanderingslogikk #4108
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & deploy to GCP | |
on: [push] | |
env: | |
CI: true | |
TZ: Europe/Oslo | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
id-token: write | |
outputs: | |
image: ${{ steps.docker-build-push.outputs.image }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
run_install: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
cache: 'pnpm' | |
registry-url: https://npm.pkg.github.com | |
- name: Install dependencies | |
run: pnpm install | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }} | |
- name: Generate source files | |
run: pnpm run gen:routes | |
- name: Lint | |
run: pnpm run lint:ci | |
- name: Test | |
run: pnpm run test | |
- name: Build | |
run: pnpm run build | |
if: github.ref != 'refs/heads/master' | |
- name: Publish Docker image | |
if: github.ref == 'refs/heads/master' | |
uses: nais/docker-build-push@v0 | |
id: docker-build-push | |
with: | |
team: personoversikt | |
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }} | |
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }} | |
build_secrets: | | |
node_auth_token=${{ secrets.READER_TOKEN }} | |
deploy-dev: | |
name: Deploy to dev-gcp | |
needs: build | |
if: github.ref == 'refs/heads/master' | |
environment: dev-gcp | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: nais/deploy/actions/deploy@v2 | |
env: | |
PRINT_PAYLOAD: true | |
CLUSTER: dev-gcp | |
RESOURCE: .nais/dev.yaml | |
VAR: version=${{ github.sha }},image=${{ needs.build.outputs.image }} | |
deploy-prod: | |
name: Deploy to prod-gcp | |
needs: build | |
if: github.ref == 'refs/heads/master' | |
environment: prod-gcp | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: nais/deploy/actions/deploy@v2 | |
env: | |
PRINT_PAYLOAD: true | |
CLUSTER: prod-gcp | |
RESOURCE: .nais/prod.yaml | |
VAR: version=${{ github.sha }},image=${{ needs.build.outputs.image }} |