Skip to content

Bump next from 12.3.4 to 14.2.6 #391

Bump next from 12.3.4 to 14.2.6

Bump next from 12.3.4 to 14.2.6 #391

Workflow file for this run

name: Build and deploy
on: [ push ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
registry-url: "https://npm.pkg.github.com"
- run: npm ci --legacy-peer-deps --ignore-scripts
env:
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
- run: npm rebuild && npm run prepare --if-present
- run: npm run build --if-present
- run: npm test
env:
CI: true
build:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
permissions:
contents: write
checks: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
registry-url: "https://npm.pkg.github.com"
- run: cp $NPM_CONFIG_USERCONFIG .npmrc
- name: docker-build-push
uses: nais/docker-build-push@v0
id: docker-build-push
with:
team: teamdagpenger
tag: ${{ github.sha }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
build_secrets:
"NODE_AUTH_TOKEN=${{ secrets.READER_TOKEN }}"
outputs:
image: ${{ steps.docker-build-push.outputs.image }}
deploy-dev:
needs: [ build, test ]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: dev-gcp
RESOURCE: .nais/nais.yaml
VARS: .nais/vars-dev.yaml
VAR: image=${{ needs.build.outputs.image }}
PRINT_PAYLOAD: true
deploy-prod:
needs: [ build, deploy-dev ]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: prod-gcp
RESOURCE: .nais/nais.yaml
VARS: .nais/vars-prod.yaml
VAR: image=${{ needs.build.outputs.image }}
PRINT_PAYLOAD: true