Skip to content

Set cascading delete to false as a precaution #53

Set cascading delete to false as a precaution

Set cascading delete to false as a precaution #53

Workflow file for this run

name: 'Bygg og deploy til prod-gcp og dev-gcp'
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build_and_push:
permissions:
contents: "read"
id-token: "write"
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Setup Java'
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
cache: 'gradle'
- name: 'Build code'
run: |
./gradlew build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'Build and push docker image'
uses: nais/docker-build-push@v0
id: docker-push
with:
team: pensjonopptjening
tag: ${{ github.sha }}
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }} # required, but is defined as an organization variable
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }} # required, but is defined as an organization secret
- name: 'Deploy til dev-gcp'
uses: nais/deploy/actions/deploy@v2
env:
RESOURCE: nais/dev-gcp.yml,nais/unleash-apitoken-dev-gcp.yml
CLUSTER: dev-gcp
IMAGE: ${{ steps.docker-push.outputs.image }}
TELEMETRY: ${{ steps.docker-push.outputs.telemetry }}
- name: 'Deploy til prod-gcp'
uses: nais/deploy/actions/deploy@v2
env:
RESOURCE: nais/prod-gcp.yml,nais/unleash-apitoken-prod-gcp.yml
CLUSTER: prod-gcp
IMAGE: ${{ steps.docker-push.outputs.image }}
TELEMETRY: ${{ steps.docker-push.outputs.telemetry }}