diff --git a/.github/workflows/deploy-unleash-api-token.yml b/.github/workflows/deploy-unleash-api-token.yml new file mode 100644 index 000000000..5a0354cc2 --- /dev/null +++ b/.github/workflows/deploy-unleash-api-token.yml @@ -0,0 +1,35 @@ +name: Deploy unleash-apitoken +on: + push: + paths: + - ".nais/unleash/unleash-api-token.dev.yaml" + - ".nais/unleash/unleash-api-token.prod.yaml" + +jobs: + deploy-dev: + name: Deploy unleash-apitoken to dev + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Deploy application + uses: nais/deploy/actions/deploy@v1 + env: + APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} + CLUSTER: dev-gcp + RESOURCE: .nais/unleash/unleash-api-token.dev.yaml + + deploy-prod: + name: Deploy unleash-apitoken to prod + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Deploy application + uses: nais/deploy/actions/deploy@v1 + if: github.ref == 'refs/heads/main' + env: + APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} + CLUSTER: prod-gcp + RESOURCE: .nais/unleash/unleash-api-token.prod.yaml \ No newline at end of file diff --git a/.nais/unleash/unleash-api-token.dev.yml b/.nais/unleash/unleash-api-token.dev.yml new file mode 100644 index 000000000..4163f2f8c --- /dev/null +++ b/.nais/unleash/unleash-api-token.dev.yml @@ -0,0 +1,17 @@ +apiVersion: unleash.nais.io/v1 +kind: ApiToken +metadata: + name: nav-dekoratoren + namespace: navno + labels: + team: navno +spec: + unleashInstance: + apiVersion: unleash.nais.io/v1 + kind: RemoteUnleash + name: navno + secretName: nav-dekoratoren-unleash-api-token + + # Specify which environment the API token should be created for. + # Can be one of: development, or production. + environment: development diff --git a/.nais/unleash/unleash-api-token.prod.yml b/.nais/unleash/unleash-api-token.prod.yml new file mode 100644 index 000000000..7b51a3221 --- /dev/null +++ b/.nais/unleash/unleash-api-token.prod.yml @@ -0,0 +1,17 @@ +apiVersion: unleash.nais.io/v1 +kind: ApiToken +metadata: + name: nav-dekoratoren + namespace: navno + labels: + team: navno +spec: + unleashInstance: + apiVersion: unleash.nais.io/v1 + kind: RemoteUnleash + name: navno + secretName: nav-dekoratoren-unleash-api-token + + # Specify which environment the API token should be created for. + # Can be one of: development, or production. + environment: production