From 02a7f037595e2a41b68e35c33bc44c7f18809df8 Mon Sep 17 00:00:00 2001 From: Ken Gullaksen Date: Thu, 12 Oct 2023 12:53:32 +0200 Subject: [PATCH] forenkle workflow for bygg --- .github/workflows/main.yaml | 40 ++++++++++++------------------------- 1 file changed, 13 insertions(+), 27 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 9ac80026..60571047 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -4,9 +4,12 @@ on: workflow_dispatch: jobs: - test: - name: Test + bygg: + name: Bygg runs-on: ubuntu-latest + permissions: + contents: "read" + id-token: "write" services: postgres: image: postgres:12.10 @@ -29,32 +32,15 @@ jobs: java-version: 17 cache: maven - - run: mvn -B -Dsurefire.useFile=false test - - bygg: - name: Bygg - needs: test - runs-on: ubuntu-latest - permissions: - contents: "read" - id-token: "write" - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: 17 - cache: maven - - - run: mvn -B -DskipTests package + - run: mvn -B package - - uses: nais/docker-build-push@v0 - id: gar-push - with: - team: fager - tag: ${{ github.sha }} - project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }} - identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }} + - uses: nais/docker-build-push@v0 + id: gar-push + with: + team: fager + tag: ${{ github.sha }} + project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }} + identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }} deploy-dev-gcp: permissions: