Skip to content

Commit

Permalink
Bygg og push image til team tilbake sitt Google Artifact Registry
Browse files Browse the repository at this point in the history
  • Loading branch information
sillerud committed Jan 27, 2025
1 parent de2198f commit 7692c11
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/tilbake-build.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 7692c11

Please # to comment.