diff --git a/.github/workflows/tilbake-build.yml b/.github/workflows/tilbake-build.yml new file mode 100644 index 00000000..446c450b --- /dev/null +++ b/.github/workflows/tilbake-build.yml @@ -0,0 +1,44 @@ +name: Build-Deploy-Preprod +on: + push: + branches: + - main + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref_name }} + cancel-in-progress: true + +permissions: + contents: "read" + id-token: "write" +jobs: + build-dev: + name: Build and push + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - uses: actions/setup-java@v4 + with: + java-version: 21 + distribution: 'temurin' + cache: 'maven' + + - name: Bygg med maven + env: + GITHUB_USERNAME: x-access-token + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: mvn -B --no-transfer-progress package --settings .m2/maven-settings.xml --file pom.xml + + - name: Bygg og push docker image + uses: nais/docker-build-push@v0 + id: docker-push + with: + team: tilbake + tag: latest + project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }} + identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }} + byosbom: target/classes/META-INF/sbom/application.cdx.json