add check command #20
This file contains hidden or 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: klass-forvaltning-dev-build-and-deploy.yml | |
| on: | |
| push: | |
| branches: | |
| - 4-of-november-1 | |
| workflow_dispatch: | |
| jobs: | |
| docker-build: | |
| name: Docker build | |
| permissions: | |
| contents: "read" | |
| id-token: "write" | |
| packages: "read" | |
| runs-on: ubuntu-latest | |
| outputs: | |
| image: ${{ steps.docker-build-push.outputs.image }} | |
| telemetry: ${{ steps.docker-build-push.outputs.telemetry }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '8' | |
| cache: 'maven' | |
| - name: Build with Maven | |
| working-directory: klass-forvaltning | |
| run: mvn --batch-mode --update-snapshots install -DskipTests | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push | |
| uses: nais/docker-build-push@v0 | |
| id: docker-build-push | |
| with: | |
| team: dapla-metadata | |
| image_suffix: forvaltning | |
| dockerfile: klass-forvaltning/Dockerfile | |
| docker_context: klass-forvaltning | |
| deploy-test: | |
| name: Deploy to test | |
| needs: docker-build | |
| permissions: | |
| contents: "read" | |
| id-token: "write" | |
| packages: "read" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - uses: nais/deploy/actions/deploy@v2 | |
| env: | |
| CLUSTER: test | |
| RESOURCE: .nais/test/klass-forvaltning-dev.yaml | |
| DEPLOY_SERVER: deploy.ssb.cloud.nais.io:443 | |
| WORKLOAD_IMAGE: ${{ needs.docker-build.outputs.image }} | |
| TELEMETRY: ${{ needs.docker-build.outputs.telemetry }} | |