Browse Source

use github token for the actions check (#3679)

* use github token for the actions check

Signed-off-by: Gustavo Carvalho <gusfcarvalho@gmail.com>

* fix msg

Signed-off-by: Gustavo Carvalho <gusfcarvalho@gmail.com>

---------

Signed-off-by: Gustavo Carvalho <gusfcarvalho@gmail.com>
Gustavo Fernandes de Carvalho 1 year ago
parent
commit
9512254a04
1 changed files with 3 additions and 3 deletions
  1. 3 3
      .github/workflows/e2e.yml

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

@@ -109,7 +109,7 @@ jobs:
         # Conveniently, job.status maps to https://developer.github.com/v3/checks/runs/#update-a-check-run
         # Conveniently, job.status maps to https://developer.github.com/v3/checks/runs/#update-a-check-run
         conclusion: ${{ job.status }}
         conclusion: ${{ job.status }}
       with:
       with:
-        github-token: ${{ steps.create_token.outputs.token }}
+        github-token: ${{ secrets.GITHUB_TOKEN }}
         script: |
         script: |
           const { data: pull } = await github.rest.pulls.get({
           const { data: pull } = await github.rest.pulls.get({
             ...context.repo,
             ...context.repo,
@@ -139,7 +139,7 @@ jobs:
         token: ${{ steps.create_token.outputs.token }}
         token: ${{ steps.create_token.outputs.token }}
         issue-number: ${{ github.event.client_payload.pull_request.number }}
         issue-number: ${{ github.event.client_payload.pull_request.number }}
         body: |
         body: |
-            [Bot] - :white_check_mark: [e2e for $TARGET_SHA passed](https://github.com/external-secrets/external-secrets/actions/runs/${{ github.run_id }})
+            [Bot] - :white_check_mark: [e2e for ${{ env.TARGET_SHA }} passed](https://github.com/external-secrets/external-secrets/actions/runs/${{ github.run_id }})
     - name: Update on Failure
     - name: Update on Failure
       if: always() &&  steps.e2e.conclusion != 'success'
       if: always() &&  steps.e2e.conclusion != 'success'
       uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
       uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
@@ -147,4 +147,4 @@ jobs:
         token: ${{ steps.create_token.outputs.token }}
         token: ${{ steps.create_token.outputs.token }}
         issue-number: ${{ github.event.client_payload.pull_request.number }}
         issue-number: ${{ github.event.client_payload.pull_request.number }}
         body: |
         body: |
-            [Bot] - :x: [e2e for $TARGET_SHA failed](https://github.com/external-secrets/external-secrets/actions/runs/${{ github.run_id }})
+            [Bot] - :x: [e2e for ${{ env.TARGET_SHA }} failed](https://github.com/external-secrets/external-secrets/actions/runs/${{ github.run_id }})