Skip to content

navn på workflow så man kan skille de #66

navn på workflow så man kan skille de

navn på workflow så man kan skille de #66

name: Deploy Docker image GCP
on:
push:
branches:
- GCP-migrering
jobs:
deploy-docker-image:
name: Deploy Docker image
runs-on: ubuntu-latest
permissions:
issues: write
contents: read
id-token: write
outputs:
image: ${{ steps.docker-push.outputs.image }}
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'
cache: 'yarn'
- name: Set timestamp
run: echo "TIMESTAMP=$(expr $(date +%Y%m%d%H%M%S))" >> $GITHUB_ENV
- name: Installere dependencies
run: HUSKY=0 yarn install --immutable
- name: Bygge dist
run: yarn build
- uses: nais/docker-build-push@v0
id: docker-push
with:
team: k9saksbehandling
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
- name: Sett image for nais deploy
run: |
echo "IMAGE=${{steps.docker-push.outputs.image}}" >> $GITHUB_ENV
- name: Promoter til cluster og namespace
uses: nais/deploy/actions/deploy@v2
env:
PRINT_PAYLOAD: true
CLUSTER: dev-gcp
RESOURCE: deploy/dev-gcp.yml
trivy:
needs: [deploy-docker-image]
uses: navikt/sif-gha-workflows/.github/workflows/trivy.yml@main
permissions:
contents: write
id-token: write
security-events: write
actions: read
secrets: inherit
with:
image: ${{ needs.deploy-docker-image.outputs.image }}
team: k9saksbehandling