Skip to content

Bump the all-dependencies group across 1 directory with 14 updates (#… #53

Bump the all-dependencies group across 1 directory with 14 updates (#…

Bump the all-dependencies group across 1 directory with 14 updates (#… #53

Workflow file for this run

name: Build-Deploy-Prod
on:
push:
branches:
- main
permissions:
contents: "read"
id-token: "write"
jobs:
build:
name: Bygg app/image, push til github, deploy til prod-fss og dev-fss
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: 'gradle'
- name: Test and build
env:
GPR_API_KEY: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew wrapper --gradle-version=8.5
./gradlew test build --no-daemon
- name: Generer SBOM
run: ./gradlew cyclonedxBom
- uses: nais/docker-build-push@v0
id: docker-push
with:
team: teamfamilie
tag: latest
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
byosbom: build/resources/main/META-INF/sbom/application.cdx.json
outputs:
image: ${{ steps.docker-push.outputs.image }}
deploy:
name: Deploy to fss
needs: build
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
steps:
- uses: actions/checkout@v4
- name: Deploy til dev-fss
uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: dev-fss
RESOURCE: nais/dev-fss.yml
VAR: image=${{ needs.build.outputs.image }}
- name: Deploy til prod-fss
uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: prod-fss
RESOURCE: nais/prod-fss.yml
VAR: image=${{ needs.build.outputs.image }}
- name: Post deploy failures to Slack
if: failure()
run: |
curl -X POST --data "{\"text\": \"Deploy av $GITHUB_REPOSITORY feilet - $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID\"}" $WEBHOOK_URL
env:
MESSAGE: "Deploy av feilet"
WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}