Skip to content

Deploy feature branch vaas/udeltesamtalereferat by @madsleegiil #191

Deploy feature branch vaas/udeltesamtalereferat by @madsleegiil

Deploy feature branch vaas/udeltesamtalereferat by @madsleegiil #191

name: Deploy feature branch GCP
run-name: Deploy feature branch ${{ github.ref_name }} by @${{ github.actor }}
on:
workflow_dispatch:
concurrency:
group: deploy_feature_branch_gcp
cancel-in-progress: true
env:
PRINT_PAYLOAD: true
jobs:
build:
name: Build, push
runs-on: ubuntu-latest
outputs:
image: ${{ steps.docker-build-push.outputs.image }}
telemetry: ${{ steps.docker-build-push.outputs.telemetry }}
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Execute Gradle build
run: ./gradlew assemble --scan
- name: Push docker image to GAR
uses: nais/docker-build-push@v0
id: docker-build-push
with:
team: dab
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }} # Provided as Organization Secret
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }} # Provided as Organization Variable
env:
TRIVY_JAVA_DB_REPOSITORY: "public.ecr.aws/aquasecurity/trivy-java-db:1" # avoid rate limiting on javadb download
deploy:
name: Deploy to gcp dev
needs: build
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Deploy
uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: dev-gcp
RESOURCE: nais/nais-dev-gcp.yaml
VAR: image=${{ needs.build.outputs.image }}
TELEMETRY: ${{ needs.build.outputs.telemetry }}