Skip to content

Commit

Permalink
Oppdate GH actions - submitt salsa i eget steg.
Browse files Browse the repository at this point in the history
  • Loading branch information
geiralund committed Nov 22, 2024
1 parent 59c86ab commit a7d80b9
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,57 @@ jobs:
build:
name: Build and publish Docker image
runs-on: ubuntu-latest
permissions: # Sjekk https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
contents: "write" # For å submitte dependency graph
checks: "write"
pull-requests: "write"
id-token: "write"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- uses: gradle/wrapper-validation[email protected]
- uses: gradle/[email protected]
- uses: gradle/actions/wrapper-validation@v4
- uses: gradle/actions/setup-gradle@v4
env:
# Eksluder test dependencies
DEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS: compileClasspath|runtimeClasspath
with:
gradle-version: wrapper
dependency-graph: generate-and-submit
arguments: --configuration-cache build
cache-encryption-key: ${{ secrets.GradleEncryptionKey }}
- run: ./gradlew --configuration-cache build


- name: docker-build-push
uses: nais/docker-build-push@v0
id: docker-build-push
with:
team: teamdagpenger
push_image: true # optional, default true
tag: ${{ github.sha }}
dockerfile: mediator/Dockerfile # optional, default Dockerfile
docker_context: mediator # optional, default .
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
salsa: false
outputs:
image: ${{ steps.docker-build-push.outputs.image }}
digest: ${{ steps.docker-build-push.outputs.digest }}

salsa:
name: Generate SBOM, attest and sign image
needs: [ build ]
runs-on: ubuntu-latest
permissions:
id-token: "write"
steps:
- uses: navikt/dagpenger/actions/attest-sign@master
with:
digest: ${{ needs.build.outputs.digest }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
team: teamdagpenger

deploy-dev:
name: Deploy to dev
Expand Down

0 comments on commit a7d80b9

Please sign in to comment.