Deploy til preprod gcp #475
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: Deploy til preprod gcp | |
on: | |
workflow_dispatch: | |
jobs: | |
lint: | |
uses: ./.github/workflows/lint.yml | |
secrets: | |
READER_TOKEN: ${{ secrets.READER_TOKEN }} | |
test: | |
uses: ./.github/workflows/test.yml | |
secrets: | |
READER_TOKEN: ${{ secrets.READER_TOKEN }} | |
test-cypress: | |
uses: ./.github/workflows/cypress-tester.yml | |
secrets: | |
READER_TOKEN: ${{ secrets.READER_TOKEN }} | |
build: | |
uses: ./.github/workflows/build.yml | |
secrets: | |
READER_TOKEN: ${{ secrets.READER_TOKEN }} | |
deploy-dev-gcp: | |
name: Deploye til DEV GCP | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
id-token: write | |
needs: [lint, test, test-cypress, build] | |
steps: | |
- name: Hente kode | |
uses: actions/checkout@v4 | |
- name: Setup .yarnrc.yml | |
run: | | |
yarn config set npmScopes.navikt.npmRegistryServer "https://npm.pkg.github.com" | |
yarn config set npmScopes.navikt.npmAlwaysAuth true | |
yarn config set npmScopes.navikt.npmAuthToken $NPM_AUTH_TOKEN | |
env: | |
NPM_AUTH_TOKEN: ${{ secrets.READER_TOKEN }} | |
- name: Sette opp Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
registry-url: https://npm.pkg.github.com/ | |
scope: '@navikt' | |
- uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: ./dist | |
- name: Installere moduler | |
run: yarn workspaces focus @k9-punsj-frontend/server --production | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }} | |
- uses: nais/docker-build-push@v0 | |
id: docker-push | |
with: | |
tag: 'latest' | |
team: k9saksbehandling | |
pull: true | |
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }} | |
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }} | |
- name: Set image | |
run: echo "IMAGE=${{steps.docker-push.outputs.image}}" >> $GITHUB_ENV | |
- name: Deploye til dev | |
uses: nais/deploy/actions/deploy@v2 | |
env: | |
CLUSTER: dev-gcp | |
RESOURCE: nais/k9-punsj-frontend.yml | |
VARS: nais/dev-gcp.yml |