This repository has been archived by the owner on Oct 17, 2024. It is now read-only.
Update README.md #82
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: Build and deploy depviz-backend | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build_and_deploy: | |
permissions: | |
contents: read | |
id-token: write | |
name: build, push and deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: gradle/actions/wrapper-validation@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }} | |
restore-keys: ${{ runner.os }}-gradle- | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 21 | |
- name: compile and run tests | |
run: ./gradlew build | |
- uses: nais/docker-build-push@v0 | |
id: docker-build-push | |
with: | |
team: nais-analyse | |
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 to prod-gcp | |
uses: nais/deploy/actions/deploy@v2 | |
env: | |
CLUSTER: prod-gcp | |
RESOURCE: .nais/nais.yaml | |
VAR: image=${{ steps.docker-build-push.outputs.image }} | |
VARS: .nais/prod.yaml |