IS-1488: Added unleash api token file #1
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: Unleash api-tokens | |
on: | |
merge_group: | |
pull_request: | |
paths: | |
- .github/workflows/unleash-apitoken.yaml | |
- .nais//unleash/unleash-apitoken-dev.yaml | |
- .nais//unleash/unleash-apitoken-prod.yaml | |
push: | |
branches: | |
- main | |
paths: | |
- .github/workflows/unleash-apitoken.yaml | |
- .nais//unleash/unleash-apitoken-dev.yaml | |
- .nais/unleash/unleash-apitoken-dev.yaml | |
jobs: | |
ci: | |
name: CI | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Lint | |
uses: ./.github/actions/lint-yaml | |
with: | |
path: mulighetsrommet-api/.nais | |
apply-apitoken-unleash: | |
name: Apply ApiToken for Unleash to cluster | |
runs-on: ubuntu-latest | |
needs: [ci] | |
if: github.event_name == 'push' && github.ref_name == 'main' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: deploy to dev | |
uses: nais/deploy/actions/deploy@v1 | |
env: | |
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} | |
CLUSTER: dev-gcp | |
RESOURCE: .nais/unleash/unleash-apitoken-dev.yaml | |
- name: deploy to prod | |
uses: nais/deploy/actions/deploy@v1 | |
env: | |
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} | |
CLUSTER: prod-gcp | |
RESOURCE: .nais/unleash/unleash-apitoken-prod.yaml |