From f1707e9eea69a140dfff59042e4cd9765b81edc2 Mon Sep 17 00:00:00 2001 From: Carl-OW <142233642+Carl-OW@users.noreply.github.com> Date: Wed, 9 Oct 2024 14:07:23 +0200 Subject: [PATCH 1/2] gh-ssb to gh-ssbno for testing --- .github/workflows/delete_nais.yaml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/delete_nais.yaml b/.github/workflows/delete_nais.yaml index b37988da0..76df23c2f 100644 --- a/.github/workflows/delete_nais.yaml +++ b/.github/workflows/delete_nais.yaml @@ -3,18 +3,18 @@ name: NAIS Deploy on: pull_request: types: [closed] - + jobs: delete: name: 'Delete app from cluster' permissions: - contents: "read" - id-token: "write" + contents: 'read' + id-token: 'write' runs-on: ubuntu-latest if: (startsWith(github.head_ref, 'MIM-') || startsWith(github.head_ref, 'mim-') && contains(github.event.issue.labels.*.name, 'nais') && contains(fromJSON('["annesiri", "ssb-cgn", "Glenruben", "johnnadeluy", "Carl-OW", "michaelpande"]'), github.actor)) steps: # turn 'MIM-9876_new_feature' into 'mim-9876' so it can be used in URL, it can be found in env.ISSUE_NUMBER - - name: "Get JIRA issue number" + - name: 'Get JIRA issue number' id: jira_issue_number run: | BRANCH="${{ github.head_ref }}" @@ -23,17 +23,17 @@ jobs: echo "ISSUE_NUMBER=${ISSUE_NUMBER}" >> $GITHUB_ENV; echo "Issue number: $ISSUE_NUMBER"; - - id: "auth" - name: "Authenticate to Google Cloud" - uses: "google-github-actions/auth@v0.6.0" + - id: 'auth' + name: 'Authenticate to Google Cloud' + uses: 'google-github-actions/auth@v0.6.0' with: - workload_identity_provider: "projects/906675412832/locations/global/workloadIdentityPools/ssb-identity-pool/providers/github-oidc-provider" - service_account: "gh-ssb@nais-management-b3a7.iam.gserviceaccount.com" - token_format: "access_token" - - id: "get-credentials" + workload_identity_provider: 'projects/906675412832/locations/global/workloadIdentityPools/ssb-identity-pool/providers/github-oidc-provider' + service_account: 'gh-ssbno@nais-management-b3a7.iam.gserviceaccount.com' + token_format: 'access_token' + - id: 'get-credentials' uses: 'google-github-actions/get-gke-credentials@v2' with: cluster_name: 'nais-test' location: 'europe-north1' - - id: "delete" - run: "kubectl delete pod -n ssbno --selector=app=mimir-branch-${{ env.ISSUE_NUMBER }} --ignore-not-found=true" \ No newline at end of file + - id: 'delete' + run: 'kubectl delete pod -n ssbno --selector=app=mimir-branch-${{ env.ISSUE_NUMBER }} --ignore-not-found=true' From 954ac3cdeb667bd0a2431a28323072482dcf7bb0 Mon Sep 17 00:00:00 2001 From: Carl-OW <142233642+Carl-OW@users.noreply.github.com> Date: Wed, 9 Oct 2024 14:27:09 +0200 Subject: [PATCH 2/2] google-github-actions/auth update --- .github/workflows/delete_nais.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/delete_nais.yaml b/.github/workflows/delete_nais.yaml index 76df23c2f..a596c6915 100644 --- a/.github/workflows/delete_nais.yaml +++ b/.github/workflows/delete_nais.yaml @@ -25,7 +25,7 @@ jobs: - id: 'auth' name: 'Authenticate to Google Cloud' - uses: 'google-github-actions/auth@v0.6.0' + uses: 'google-github-actions/auth@v2.1.6' with: workload_identity_provider: 'projects/906675412832/locations/global/workloadIdentityPools/ssb-identity-pool/providers/github-oidc-provider' service_account: 'gh-ssbno@nais-management-b3a7.iam.gserviceaccount.com'