Skip to content

🚧 Generasjon har avslag #421

🚧 Generasjon har avslag

🚧 Generasjon har avslag #421

name: Spesialist-migrering
on:
push:
branches:
- master
paths:
- 'Dockerfile-migrering'
- 'spesialist-migrering/**'
- 'spesialist-felles/**'
- 'build.gradle.kts'
- '.github/workflows/spesialist-migrering.yml'
- 'deploy/dev-migrering.yml'
- 'deploy/prod-migrering.yml'
- '.dockerignore'
jobs:
build:
permissions:
contents: read
id-token: write
name: build docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- uses: gradle/actions/setup-gradle@v3
- name: Gradle build
env:
ORG_GRADLE_PROJECT_githubUser: x-access-token
ORG_GRADLE_PROJECT_githubPassword: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew :spesialist-migrering:build
- uses: nais/docker-build-push@v0
id: docker-build-push
with:
team: tbd
dockerfile: Dockerfile-migrering
image_suffix: migrering
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
outputs:
image: ${{ steps.docker-build-push.outputs.image }}
deployDev:
name: deploy to dev
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: nais/deploy/actions/deploy@v2
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: dev-gcp
RESOURCE: deploy/dev-migrering.yml
IMAGE: ${{ needs.build.outputs.image }}
deployProd:
name: deploy to prod
needs: [build, deployDev]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: nais/deploy/actions/deploy@v2
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: prod-gcp
RESOURCE: deploy/prod-migrering.yml
IMAGE: ${{ needs.build.outputs.image }}