Skip to content

Deploy feature branch minside-varsler by @tu55eladd #85

Deploy feature branch minside-varsler by @tu55eladd

Deploy feature branch minside-varsler by @tu55eladd #85

name: Deploy branch to dev gcp
run-name: Deploy feature branch ${{ github.ref_name }} by @${{ github.actor }}
on:
workflow_dispatch:
env:
PRINT_PAYLOAD: true
concurrency:
group: deploy_feature_branch
cancel-in-progress: true
jobs:
build:
name: Veilarbdialog - Test, build, push
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
cache: 'maven'
- name: Veilarbdialog - Build maven artifacts
run: mvn -B package
- 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
outputs:
image: ${{ steps.docker-build-push.outputs.image }}
telemetry: ${{ steps.docker-build-push.outputs.telemetry }}
deploy:
name: Veilarbdialog - deploy to dev
needs: build
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Veilarbdialog - Deploy application to dev
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 }}