Skip to content

IS-1488: Added unleash api token file #1

IS-1488: Added unleash api token file

IS-1488: Added unleash api token file #1

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