Skip to content

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

[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) #1287

Workflow file for this run

name: continuous integration 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:
build:
name: Build with maven and docker
runs-on: ubuntu-latest
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-
- name: Valider Java-formatering
run: mvn fmt:check --settings .m2/maven-settings.xml
- name: Maven clean install
run: mvn -B -e --no-transfer-progress package --settings .m2/maven-settings.xml --file pom.xml clean install
- uses: nais/docker-build-push@v0
if: ${{ github.actor != 'dependabot[bot]' }}
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 dev
needs: build
permissions:
contents: "read"
id-token: "write"
steps:
- uses: actions/checkout@v4
with:
path: deploy
- name: Deploy main to dev-gcp
if: github.ref == 'refs/heads/main'
uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: dev-gcp
RESOURCE: deploy/.nais/app/naiserator-dev.yml
VARS: deploy/.nais/app/main.yml
IMAGE: ${{ needs.build.outputs.image }}
- name: Deploy feature to dev-gcp
if: github.ref != 'refs/heads/main'
uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: dev-gcp
RESOURCE: deploy/.nais/app/naiserator-dev.yml
VARS: deploy/.nais/app/feature.yml
IMAGE: ${{ needs.build.outputs.image }}