File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ # TODO: Skal refaktoreres til bruk av reusable workflows
2+ name : Build and deploy Dev Manuell
3+ on : [workflow_dispatch]
4+
5+ jobs :
6+ build_and_deploy :
7+ name : Build, push and deploy
8+ runs-on : ubuntu-latest
9+ permissions :
10+ contents : read
11+ id-token : write
12+ actions : read
13+ steps :
14+ - uses : actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # ratchet:actions/checkout@v4
15+ with :
16+ fetch-depth : 0 # Fetch all history for what-changed action
17+ - uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # ratchet:actions/setup-node@v4
18+ with :
19+ node-version : 20
20+ cache : " npm"
21+ registry-url : " https://npm.pkg.github.com"
22+ - name : Install npm dependencies
23+ env :
24+ NODE_AUTH_TOKEN : ${{ secrets.READER_TOKEN }}
25+ run : npm ci
26+ - name : Build application
27+ run : |
28+ npm run build
29+ npm run build:server
30+ - name : Determine what to do
31+ id : changed-files
32+ uses : nais/what-changed@bc3dad0463b36ad29044134bba5898f0af73c34c # ratchet:nais/what-changed@main
33+ with :
34+ files : .nais/dev.yaml
35+ - name : Build and push image and SBOM to OCI registry
36+ if : steps.changed-files.outputs.changed != 'only-inputs'
37+ uses : nais/docker-build-push@791ebb6f74b82849c742a9bc9c97abe44c6c111f # ratchet:nais/docker-build-push@v0
38+ id : docker-build-push
39+ with :
40+ team : etterlatte
41+ - name : Deploy to Nais
42+ if : steps.changed-files.outputs.changed != 'only-inputs'
43+ uses : nais/deploy/actions/deploy@961addd1e4d4211f1a7333ada5fde85f7c9aa5b7 # ratchet:nais/deploy/actions/deploy@v2
44+ env :
45+ CLUSTER : dev-gcp
46+ RESOURCE : .nais/dev.yaml
47+ WORKLOAD_IMAGE : ${{ steps.docker-build-push.outputs.image }}
48+ TELEMETRY : ${{ steps.docker-build-push.outputs.telemetry }}
File renamed without changes.
You can’t perform that action at this time.
0 commit comments