chore: remove local codeql, gcr.io SA key, move to github packages, b… #291
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to staging | |
on: | |
pull_request: | |
types: [ready_for_review, opened, reopened, synchronize] | |
branches: | |
- main | |
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: Call reusable workflow when pull request is created | |
if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.draft == false }} | |
uses: Informasjonsforvaltning/workflows/.github/workflows/build-push.yaml@main | |
with: | |
app_name: fdk-harvest-admin | |
environment: staging | |
build_env: true | |
build_env_name: BINARY | |
build_env_value: fdk-harvest-admin | |
secrets: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
deploy: | |
name: Deploy to staging environment with reusable workflow | |
if: github.event.pull_request.draft == false | |
needs: [ run-tests, build-and-push-image ] | |
uses: Informasjonsforvaltning/workflows/.github/workflows/kustomize-deploy.yaml@main | |
with: | |
app_name: fdk-harvest-admin | |
environment: staging | |
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 }} |