Skip to content

bumper r&r

bumper r&r #95

Workflow file for this run

name: Bygg og deploy
on:
push:
branches:
- master
jobs:
build:
name: build docker image
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '21.x'
cache: 'gradle'
- name: test and build
run: ./gradlew test build
env:
ORG_GRADLE_PROJECT_githubPassword: ${{ secrets.GITHUB_TOKEN }}
- name: build docker image
uses: nais/docker-build-push@v0
id: docker-build-push
with:
team: tbd
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@v1
- uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: dev-gcp
RESOURCE: deploy/dev.yml
IMAGE: ${{ needs.build.outputs.image }}
deployProd:
name: deploy to prod
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: prod-gcp
RESOURCE: deploy/prod.yml
IMAGE: ${{ needs.build.outputs.image }}