Browse Source

fix: applying several pipeline fixes (#4667)

Signed-off-by: Gustavo Carvalho <gustavo@externalsecrets.com>
Gustavo Fernandes de Carvalho 1 year ago
parent
commit
f6c4784159

+ 2 - 2
.github/actions/e2e-managed/action.yml

@@ -147,8 +147,8 @@ runs:
       if: env.GHCR_USERNAME != ''
       if: env.GHCR_USERNAME != ''
       with:
       with:
         registry: ghcr.io
         registry: ghcr.io
-        username: ${{ env.GHCR_USERNAME }}
-        password: ${{ env.GHCR_TOKEN }}
+        username: ${{ github.actor }}
+        password: ${{ env.GITHUB_TOKEN }}
 
 
     - name: Run managed e2e Tests
     - name: Run managed e2e Tests
       shell: bash
       shell: bash

+ 2 - 2
.github/workflows/ci.yml

@@ -167,6 +167,6 @@ jobs:
       build-arch: ${{ matrix.build-arch }}
       build-arch: ${{ matrix.build-arch }}
       ref: ${{ github.ref }}
       ref: ${{ github.ref }}
     secrets:
     secrets:
-      GHCR_USERNAME: ${{ secrets.GHCR_USERNAME }}
-      GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }}
+      GHCR_USERNAME: ${{ github.actor }}
+      GHCR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 
 

+ 2 - 2
.github/workflows/e2e-managed.yml

@@ -14,7 +14,7 @@ env:
   # Common users. We can't run a step 'if secrets.GHCR_USERNAME != ""' but we can run
   # Common users. We can't run a step 'if secrets.GHCR_USERNAME != ""' but we can run
   # a step 'if env.GHCR_USERNAME' != ""', so we copy these to succinctly test whether
   # a step 'if env.GHCR_USERNAME' != ""', so we copy these to succinctly test whether
   # credentials have been provided before trying to run steps that need them.
   # credentials have been provided before trying to run steps that need them.
-  GHCR_USERNAME: ${{ secrets.GHCR_USERNAME }}
+  GHCR_USERNAME: ${{ github.actor }}
   GCP_SM_SA_JSON: ${{ secrets.GCP_SM_SA_JSON}}
   GCP_SM_SA_JSON: ${{ secrets.GCP_SM_SA_JSON}}
   GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID}}
   GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID}}
   USE_GKE_GCLOUD_AUTH_PLUGIN: true
   USE_GKE_GCLOUD_AUTH_PLUGIN: true
@@ -47,7 +47,7 @@ env:
   GITHUB_PR_NUMBER: ${{ github.event.client_payload.pull_request.number }}
   GITHUB_PR_NUMBER: ${{ github.event.client_payload.pull_request.number }}
   CLOUD_PROVIDER: ${{ github.event.client_payload.slash_command.args.named.provider }}
   CLOUD_PROVIDER: ${{ github.event.client_payload.slash_command.args.named.provider }}
   INFRACOST_API_KEY: ${{ secrets.INFRACOST_API_KEY }}
   INFRACOST_API_KEY: ${{ secrets.INFRACOST_API_KEY }}
-  GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }}
+  GHCR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 
 
 name: managed e2e tests
 name: managed e2e tests
 
 

+ 1 - 1
.github/workflows/e2e.yml

@@ -24,7 +24,7 @@ env:
   # a step 'if env.GHCR_USERNAME' != ""', so we copy these to succinctly test whether
   # a step 'if env.GHCR_USERNAME' != ""', so we copy these to succinctly test whether
   # credentials have been provided before trying to run steps that need them.
   # credentials have been provided before trying to run steps that need them.
   TARGET_SHA: ${{ github.event.client_payload.slash_command.args.named.sha }}
   TARGET_SHA: ${{ github.event.client_payload.slash_command.args.named.sha }}
-  GHCR_USERNAME: ${{ secrets.GHCR_USERNAME }}
+  GHCR_USERNAME: ${{ github.actor }}
   GCP_SM_SA_JSON: ${{ secrets.GCP_SM_SA_JSON}}
   GCP_SM_SA_JSON: ${{ secrets.GCP_SM_SA_JSON}}
   GCP_GKE_ZONE: ${{ secrets.GCP_GKE_ZONE}}
   GCP_GKE_ZONE: ${{ secrets.GCP_GKE_ZONE}}
   GCP_GSA_NAME: ${{ secrets.GCP_GSA_NAME}} # Goolge Service Account
   GCP_GSA_NAME: ${{ secrets.GCP_GSA_NAME}} # Goolge Service Account

+ 4 - 4
.github/workflows/publish.yml

@@ -84,8 +84,8 @@ jobs:
         if: env.IS_FORK == 'false'
         if: env.IS_FORK == 'false'
         with:
         with:
           registry: ghcr.io
           registry: ghcr.io
-          username: ${{ secrets.GHCR_USERNAME }}
-          password: ${{ secrets.GHCR_TOKEN }}
+          username: ${{ github.actor }}
+          password: ${{ secrets.GITHUB_TOKEN }}
 
 
       - name: Get docker image tag
       - name: Get docker image tag
         id: container_info
         id: container_info
@@ -147,6 +147,6 @@ jobs:
         with:
         with:
           image-name: ${{ inputs.image-name }}
           image-name: ${{ inputs.image-name }}
           image-tag: ${{ needs.build-publish.outputs.image-tag }}
           image-tag: ${{ needs.build-publish.outputs.image-tag }}
-          GHCR_USERNAME: ${{ secrets.GHCR_USERNAME }}
-          GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }}
+          GHCR_USERNAME: ${{ github.actor }}
+          GHCR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

+ 2 - 2
.github/workflows/rebuild-image.yml

@@ -65,6 +65,6 @@ jobs:
       ref: ${{ github.event.inputs.ref }}
       ref: ${{ github.event.inputs.ref }}
       image-tag: ${{ github.event.inputs.ref }}
       image-tag: ${{ github.event.inputs.ref }}
     secrets:
     secrets:
-      GHCR_USERNAME: ${{ secrets.GHCR_USERNAME }}
-      GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }}
+      GHCR_USERNAME: ${{ github.actor }}
+      GHCR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 
 

+ 4 - 4
.github/workflows/release.yml

@@ -89,8 +89,8 @@ jobs:
         uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
         uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
         with:
         with:
           registry: ghcr.io
           registry: ghcr.io
-          username: ${{ secrets.GHCR_USERNAME }}
-          password: ${{ secrets.GHCR_TOKEN }}
+          username: ${{ github.actor }}
+          password: ${{ secrets.GITHUB_TOKEN }}
 
 
       - name: Promote Container Image
       - name: Promote Container Image
         run: make docker.promote
         run: make docker.promote
@@ -108,8 +108,8 @@ jobs:
         with:
         with:
           image-name: ${{ env.IMAGE_NAME }}
           image-name: ${{ env.IMAGE_NAME }}
           image-tag: ${{ env.RELEASE_TAG }}
           image-tag: ${{ env.RELEASE_TAG }}
-          GHCR_USERNAME: ${{ secrets.GHCR_USERNAME }}
-          GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }}
+          GHCR_USERNAME: ${{ github.actor }}
+          GHCR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 
 
       - name: Update Release
       - name: Update Release