set correct pool for production #332
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 kafka topics to prod | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- .github/workflows/kafka-topics-prod.yaml | |
- iac/kafka-topics/prod/*.yaml | |
jobs: | |
ci: | |
name: CI | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Lint | |
uses: ./.github/actions/lint-yaml | |
with: | |
path: iac/kafka-topics/prod | |
deploy-prod: | |
name: Deploy kafka topics to prod | |
runs-on: ubuntu-latest | |
needs: [ci] | |
if: github.event_name == 'push' && github.ref_name == 'main' | |
permissions: | |
id-token: write # Needed for `nais/deploy/actions/deploy` | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: List resource files | |
run: echo "RESOURCE_FILES=$(find iac/kafka-topics/prod -type f | tr '\n' ',' | sed 's/,$/\n/')" >> $GITHUB_ENV | |
- name: Deploy kafka topics | |
uses: nais/deploy/actions/deploy@v2 | |
env: | |
CLUSTER: prod-gcp | |
RESOURCE: ${{ env.RESOURCE_FILES }} | |
PRINT_PAYLOAD: true |