Skip to content

Commit

Permalink
Uten nais deploy api key (#2496)
Browse files Browse the repository at this point in the history
* Vil deploye uten NAIS_DEPLOY_APIKEY

* Trenger id-token permission på rot for å få tilgang ved deploy (deploy@v2).
  • Loading branch information
ma10s authored Jan 2, 2024
1 parent 44be7e0 commit dcf2862
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ on:
env:
IMAGE: ghcr.io/navikt/familie-ef-sak:${{ github.sha }}

permissions:
contents: "read"
id-token: "write"

jobs:
build:
name: Build, push and deploy to dev-gcp
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -44,7 +45,6 @@ jobs:
- uses: actions/checkout@v4
- uses: nais/deploy/actions/deploy@v2
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: dev-gcp
RESOURCE: .deploy/preprod.yaml
IMAGE: ${{ needs.build.outputs.image }}
9 changes: 4 additions & 5 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ on:
env:
IMAGE: ghcr.io/navikt/familie-ef-sak:${{ github.sha }}

permissions:
contents: "read"
id-token: "write"

jobs:
build:
name: Build, push and deploy to dev-gcp and prod-gcp
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -54,14 +55,12 @@ jobs:
- name: Deploy til dev-gcp
uses: nais/deploy/actions/deploy@v2
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: dev-gcp
RESOURCE: .deploy/preprod.yaml
IMAGE: ${{ needs.build.outputs.image }}
- name: Deploy til prod-gcp
uses: nais/deploy/actions/deploy@v2
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: prod-gcp
RESOURCE: .deploy/prod.yaml
IMAGE: ${{ needs.build.outputs.image }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/deploy-unleash-api-token-preprod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
- name: deploy unleash api-token
uses: nais/deploy/actions/deploy@v2
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: dev-gcp
RESOURCE: .deploy/unleash-apitoken-preprod.yaml
PRINT_PAYLOAD: true
1 change: 0 additions & 1 deletion .github/workflows/deploy-unleash-api-token-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
- name: deploy unleash api-token
uses: nais/deploy/actions/deploy@v2
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: prod-gcp
RESOURCE: .deploy/unleash-apitoken-prod.yaml
PRINT_PAYLOAD: true

0 comments on commit dcf2862

Please sign in to comment.