From 3ad208ec998794b28ea0e1f6be5fa390417721d8 Mon Sep 17 00:00:00 2001 From: Ann Katrin Gagnat Date: Mon, 8 Jan 2024 13:08:38 +0100 Subject: [PATCH] =?UTF-8?q?N=C3=B8kkelfri=20deploy=20fra=20Github?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/alert-deploy.yaml | 6 ++++-- .github/workflows/build-and-test.yaml | 3 ++- .github/workflows/manual-deploy.yaml | 6 ++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/alert-deploy.yaml b/.github/workflows/alert-deploy.yaml index ffb66808f..5a64c5cca 100644 --- a/.github/workflows/alert-deploy.yaml +++ b/.github/workflows/alert-deploy.yaml @@ -14,13 +14,14 @@ jobs: preprod-deploy: name: Deploy to preprod runs-on: ubuntu-latest + permissions: + id-token: 'write' steps: - name: Checkout code uses: actions/checkout@v4 - name: Deploy to preprod uses: nais/deploy/actions/deploy@v2 env: - APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} CLUSTER: dev-gcp RESOURCE: './.nais/bygger/alerts.yaml' VARS: './.nais/bygger/preprod.yaml' @@ -28,13 +29,14 @@ jobs: prod-deploy: name: Deploy to prod runs-on: ubuntu-latest + permissions: + id-token: 'write' steps: - name: Checkout code uses: actions/checkout@v4 - name: Deploy to prod uses: nais/deploy/actions/deploy@v2 env: - APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} CLUSTER: prod-gcp RESOURCE: './.nais/bygger/alerts.yaml' VARS: './.nais/bygger/prod.yaml' diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index a3944000b..f2321cc84 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -129,12 +129,13 @@ jobs: if: github.ref == 'refs/heads/master' needs: [build-and-test, package-and-push-bygger, package-and-push-fyllut-base] runs-on: ubuntu-latest + permissions: + id-token: 'write' steps: - uses: 'actions/checkout@v4' - name: 'Deploy to PROD' uses: 'nais/deploy/actions/deploy@v2' env: - APIKEY: '${{ secrets.NAIS_DEPLOY_APIKEY }}' CLUSTER: 'prod-gcp' RESOURCE: './.nais/bygger/nais.yaml' VARS: './.nais/bygger/prod.yaml' diff --git a/.github/workflows/manual-deploy.yaml b/.github/workflows/manual-deploy.yaml index 6068a3095..be4e4631c 100644 --- a/.github/workflows/manual-deploy.yaml +++ b/.github/workflows/manual-deploy.yaml @@ -58,12 +58,13 @@ jobs: needs: [package-and-push-bygger] if: ${{ !failure() && !cancelled() }} runs-on: ubuntu-latest + permissions: + id-token: 'write' steps: - uses: 'actions/checkout@v4' - name: 'Deploy to preprod' uses: 'nais/deploy/actions/deploy@v2' env: - APIKEY: '${{ secrets.NAIS_DEPLOY_APIKEY }}' CLUSTER: 'dev-gcp' RESOURCE: './.nais/bygger/nais.yaml' VARS: './.nais/bygger/${{ github.event.inputs.environment }}.yaml' @@ -112,12 +113,13 @@ jobs: needs: [package-and-push-fyllut] if: ${{ !failure() && !cancelled() }} runs-on: ubuntu-latest + permissions: + id-token: 'write' steps: - uses: 'actions/checkout@v4' - name: 'Deploy to preprod' uses: 'nais/deploy/actions/deploy@v2' env: - APIKEY: '${{ secrets.NAIS_DEPLOY_APIKEY }}' CLUSTER: 'dev-gcp' RESOURCE: './.nais/fyllut/config.yaml' VARS: './.nais/fyllut/${{ github.event.inputs.environment }}.yaml'