Skip to content

[dependency] Bump testcontainers.version from 1.20.3 to 1.20.4 (#856) #151

[dependency] Bump testcontainers.version from 1.20.3 to 1.20.4 (#856)

[dependency] Bump testcontainers.version from 1.20.3 to 1.20.4 (#856) #151

Workflow file for this run

name: release farskapsportal-api
on:
push:
branches:
- release
paths:
- 'pom.xml'
- '.m2/**'
- '.github/workflows/**'
- 'apps/api/**'
- 'libs/**'
- '.nais/app/**'
- '**/api-ci.yml'
env:
GITHUB_USERNAME: x-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
verify:
name: Verify that release commit is present in main branch
runs-on: ubuntu-latest
steps:
- run: git clone --bare https://$GITHUB_ACTOR:[email protected]/${{ github.repository }}
- name: check if commit to build exists in main branch
run: |
cd $( echo ${{ github.repository }} | sed 's;navikt/;;' ).git
git log | grep -c ${{ github.sha }}
build:
name: Build release with maven and docker
runs-on: ubuntu-latest
needs: verify
permissions:
contents: "read"
id-token: "write"
outputs:
image: ${{ steps.docker-push.outputs.image }}
tag: ${{ steps.docker-push.outputs.tag }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
cache: 'maven'
- uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- run: mvn -B -e --no-transfer-progress package --settings .m2/maven-settings.xml --file pom.xml
- uses: nais/docker-build-push@v0
id: docker-push
with:
team: farskapsportal
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
deploy:
runs-on: ubuntu-latest
name: Deploy docker image to prod
needs: build
permissions:
contents: "read"
id-token: "write"
steps:
- uses: actions/checkout@v4
with:
path: deploy
- uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: prod-gcp
RESOURCE: deploy/.nais/app/naiserator-prod.yml
VARS: deploy/.nais/app/prod.yml
IMAGE: ${{ needs.build.outputs.image }}