Skip to content

Bump npm packages

Bump npm packages #45

Workflow file for this run

name: Build and deploy
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
REGISTRY: europe-north1-docker.pkg.dev/nais-io/nais/images
jobs:
lint_build_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Run linter
run: npm run lint
- name: Build project
run: npm run build
- name: Run tests
run: npm test
build_push_sign:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: nais/platform-build-push-sign@main
id: image
with:
name: my-copilot
google_service_account: gh-my-copilot
push: ${{ github.ref == 'refs/heads/main' }}
workload_identity_provider: ${{ secrets.NAIS_IO_WORKLOAD_IDENTITY_PROVIDER }}
outputs:
version: ${{ steps.image.outputs.version }}
rollout:
permissions:
id-token: write
name: Deploy to NAIS
needs: ["lint_build_test", "build_push_sign"]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
strategy:
matrix:
cluster: [dev-gcp, prod-gcp]
steps:
- uses: actions/checkout@v4
- uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: ${{ matrix.cluster }}
TEAM: nais
PRINT_PAYLOAD: "true"
RESOURCE: ".nais/app.yaml"
VARS: ".nais/${{ matrix.cluster }}.yaml"
VAR: image=europe-north1-docker.pkg.dev/nais-io/nais/images/my-copilot:${{ needs.build_push_sign.outputs.version }},namespace=nais