chore: add changes from forked repo #53
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 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.23.0 | |
- name: Test | |
run: go test -v -race -coverpkg=./... -coverprofile=coverage.txt -covermode=atomic ./test | |
- uses: codecov/codecov-action@v2 | |
with: | |
files: ./coverage.txt | |
build-ai-project-service: | |
name: Build query-cache when pull request is created | |
if: github.event.pull_request.draft == false | |
uses: Informasjonsforvaltning/workflows/.github/workflows/build-push.yaml@main | |
with: | |
app_name: ai-project-service | |
environment: staging | |
build_env: true | |
build_env_name: BINARY | |
build_env_value: ai-project-service | |
secrets: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GCP_SA_DIGDIR_FDK_GCR_KEY: ${{ secrets.GCP_SA_DIGDIR_FDK_GCR_KEY }} | |
deploy: | |
name: Deploy to staging environment with reusable workflow | |
if: github.event.pull_request.draft == false | |
needs: [ run-tests, build-ai-project-service ] | |
uses: Informasjonsforvaltning/workflows/.github/workflows/kustomize-deploy.yaml@main | |
with: | |
app_name: ai-project-service | |
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 }} |