Merge pull request #4748 from navikt/feature/relevante-forslag #318
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: Kafka manager | |
on: | |
push: | |
paths: | |
- .github/workflows/kafka-manager.yaml | |
- iac/kafka-manager/** | |
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-manager | |
deploy-dev: | |
name: Deploy (dev) | |
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-manager/dev -type f | tr '\n' ',' | sed 's/,$/\n/')" >> $GITHUB_ENV | |
- name: Deploy | |
uses: nais/deploy/actions/deploy@v2 | |
env: | |
CLUSTER: dev-gcp | |
RESOURCE: ${{ env.RESOURCE_FILES }} | |
PRINT_PAYLOAD: true | |
deploy-prod: | |
name: Deploy (prod) | |
runs-on: ubuntu-latest | |
needs: [ci, deploy-dev] | |
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-manager/prod -type f | tr '\n' ',' | sed 's/,$/\n/')" >> $GITHUB_ENV | |
- name: Deploy | |
uses: nais/deploy/actions/deploy@v2 | |
env: | |
CLUSTER: prod-gcp | |
RESOURCE: ${{ env.RESOURCE_FILES }} | |
PRINT_PAYLOAD: true |