Skip to content

Merge branch 'master' into TAG-2127-POC_Sticky_filters_faktisk #589

Merge branch 'master' into TAG-2127-POC_Sticky_filters_faktisk

Merge branch 'master' into TAG-2127-POC_Sticky_filters_faktisk #589

Workflow file for this run

name: CICD
on:
push:
workflow_dispatch:
jobs:
cicd:
name: CICD
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
packages: 'write'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '20'
registry-url: https://npm.pkg.github.com/
cache: 'npm'
- run: npm ci --omit=dev --omit=optional
env:
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
working-directory: ./server
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
- run: npm run test
- run: npm run lint
- run: npm run build
- uses: nais/docker-build-push@v0
id: dockerpush
with:
team: fager
tag: ${{ github.sha }}
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
- id: upload
uses: nais/deploy/actions/cdn-upload/v2@master
with:
team: fager
source: ./build/
destination: '/min-side-arbeidsgiver'
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
- name: Deploy til dev-gcp
uses: nais/deploy/actions/deploy@v1
if: github.ref == 'refs/heads/master'
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
IMAGE: ${{ steps.dockerpush.outputs.image }}
CLUSTER: dev-gcp
RESOURCE: nais/dev-gcp.yaml
PRINT_PAYLOAD: true
VAR: commit=${{ github.sha }}
- name: Deploy til prod-gcp
uses: nais/deploy/actions/deploy@v1
if: github.ref == 'refs/heads/master'
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
IMAGE: ${{ steps.dockerpush.outputs.image }}
CLUSTER: prod-gcp
RESOURCE: nais/prod-gcp.yaml
PRINT_PAYLOAD: true
VAR: commit=${{ github.sha }}
- name: Deploy prodlik demo til dev-gcp
uses: nais/deploy/actions/deploy@v1
if: github.ref == 'refs/heads/master'
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
IMAGE: ${{ steps.dockerpush.outputs.image }}
CLUSTER: dev-gcp
RESOURCE: nais/demo-prodlik.yaml
PRINT_PAYLOAD: true
VAR: commit=${{ github.sha }}
- name: Deploy dev-lik demo til dev-gcp
if: github.ref == 'refs/heads/master'
uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
IMAGE: ${{ steps.dockerpush.outputs.image }}
CLUSTER: dev-gcp
RESOURCE: nais/demo-devlik.yaml
PRINT_PAYLOAD: true
VAR: commit=${{ github.sha }}