Deploy feature branch dependabot/gradle/shedlock_version-6.0.2 by @holymaloney #185
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 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@v3 | |
- 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 }} |