Skip to content

Manual deploy dev

Manual deploy dev #188

name: Manual deploy dev
on:
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
contents: write
checks: write
id-token: write
packages: write
steps:
# Checkout
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: 'gradle'
# Build
- name: Change wrapper permissions
run: chmod +x ./gradlew
- name: Build
run: ./gradlew clean build
env:
GITHUB_TOKEN: ${{ secrets.READER_TOKEN }}
# Release
- name: Build image
id: build-image
uses: nais/docker-build-push@v0
with:
dockerfile: Dockerfile
team: pensjonskalkulator
image_suffix: tps
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
tag: latest
outputs:
image: ${{ steps.build-image.outputs.image }}
deploy_dev:
name: Deploy to dev-fss
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
packages: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: dev-fss
RESOURCE: .nais/nais-dev.yaml
IMAGE: ${{ needs.build.outputs.image }}
deploy_dev-gcp:
name: Deploy to dev-gcp
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
packages: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: dev-gcp
RESOURCE: .nais/nais-dev-gcp.yaml
IMAGE: ${{ needs.build.outputs.image }}