Skip to content

chore: bump

chore: bump #43

name: Deploy to production & demo
on:
push:
branches:
- main
workflow_dispatch:
jobs:
run-tests:
name: Run tests
uses: Informasjonsforvaltning/workflows/.github/workflows/coverage-go.yaml@main
with:
coverage_file_path: ./coverage.txt
go_version: 1.22
test_path: ./test
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
build-and-push-image:
needs: run-tests
name: Deploy to prod on merge to main branch
uses: Informasjonsforvaltning/workflows/.github/workflows/build-push.yaml@main
with:
app_name: fdk-harvest-admin
environment: prod
build_env: true
build_env_name: BINARY
build_env_value: fdk-harvest-admin
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GCP_SA_DIGDIR_FDK_GCR_KEY: ${{ secrets.GCP_SA_DIGDIR_FDK_GCR_KEY }}
deploy-to-prod:
needs: build-and-push-image
name: Deploy to prod if prod-deploy is successful
uses: Informasjonsforvaltning/workflows/.github/workflows/kustomize-deploy.yaml@main
with:
app_name: fdk-harvest-admin
environment: prod
cluster: digdir-fdk-prod
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DIGDIR_FDK_AUTODEPLOY: ${{ secrets.DIGDIR_FDK_PROD_AUTODEPLOY }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
deploy-to-demo:
needs: deploy-to-prod
name: Deploy to demo if prod-deploy is successful
uses: Informasjonsforvaltning/workflows/.github/workflows/kustomize-deploy.yaml@main
with:
app_name: fdk-harvest-admin
environment: demo
cluster: digdir-fdk-dev
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DIGDIR_FDK_AUTODEPLOY: ${{ secrets.DIGDIR_FDK_DEV_AUTODEPLOY }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}