-
Notifications
You must be signed in to change notification settings - Fork 8
49 lines (46 loc) · 1.32 KB
/
unleash-apitoken.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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