From 8f87e05783b57da7f7093bf6eb08bcccc1cce2e8 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Thu, 8 Sep 2022 23:39:17 +0000 Subject: [PATCH] Build/Test Tools: Use the default `GITHUB_TOKEN` instead of a personal access token. Previously, it was not possible to use the default `GITHUB_TOKEN` token to create new workflow runs in an effort to prevent accidental recursive workflows. This has changed, and the `workflow_dispatch` is now one of two exceptions to this rule. Using `GITHUB_TOKEN` is preferred whenever possible to avoid the need for a PAT (personal access token), which expires (when created using the recommended security best practices), and is tied to an individual user. See https://github.blog/changelog/2022-09-08-github-actions-use-github_token-with-workflow_dispatch-and-repository_dispatch/. See #55652. git-svn-id: https://develop.svn.wordpress.org/trunk@54108 602fd350-edb4-49c9-b593-d223f7449a82 --- .github/workflows/coding-standards.yml | 1 - .github/workflows/end-to-end-tests.yml | 1 - .github/workflows/javascript-tests.yml | 1 - .github/workflows/php-compatibility.yml | 1 - .github/workflows/phpunit-tests.yml | 1 - .github/workflows/test-coverage.yml | 1 - .github/workflows/test-npm.yml | 1 - .github/workflows/test-old-branches.yml | 1 - 8 files changed, 8 deletions(-) diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 04fe086d63..8876203dbb 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -192,7 +192,6 @@ jobs: - name: Dispatch workflow run uses: actions/github-script@c713e510dbd7d213d92d41b7a7805a986f4c5c66 # v6.2.0 with: - github-token: ${{ secrets.GHA_WORKFLOW_DISPATCH }} script: | github.rest.actions.createWorkflowDispatch({ owner: context.repo.owner, diff --git a/.github/workflows/end-to-end-tests.yml b/.github/workflows/end-to-end-tests.yml index c9e030c5be..0672642f7e 100644 --- a/.github/workflows/end-to-end-tests.yml +++ b/.github/workflows/end-to-end-tests.yml @@ -148,7 +148,6 @@ jobs: - name: Dispatch workflow run uses: actions/github-script@c713e510dbd7d213d92d41b7a7805a986f4c5c66 # v6.2.0 with: - github-token: ${{ secrets.GHA_WORKFLOW_DISPATCH }} script: | github.rest.actions.createWorkflowDispatch({ owner: context.repo.owner, diff --git a/.github/workflows/javascript-tests.yml b/.github/workflows/javascript-tests.yml index 4f43b22ed7..e17fefbab1 100644 --- a/.github/workflows/javascript-tests.yml +++ b/.github/workflows/javascript-tests.yml @@ -116,7 +116,6 @@ jobs: - name: Dispatch workflow run uses: actions/github-script@c713e510dbd7d213d92d41b7a7805a986f4c5c66 # v6.2.0 with: - github-token: ${{ secrets.GHA_WORKFLOW_DISPATCH }} script: | github.rest.actions.createWorkflowDispatch({ owner: context.repo.owner, diff --git a/.github/workflows/php-compatibility.yml b/.github/workflows/php-compatibility.yml index 509b39674b..f74868892f 100644 --- a/.github/workflows/php-compatibility.yml +++ b/.github/workflows/php-compatibility.yml @@ -132,7 +132,6 @@ jobs: - name: Dispatch workflow run uses: actions/github-script@c713e510dbd7d213d92d41b7a7805a986f4c5c66 # v6.2.0 with: - github-token: ${{ secrets.GHA_WORKFLOW_DISPATCH }} script: | github.rest.actions.createWorkflowDispatch({ owner: context.repo.owner, diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 2f3b000a7e..6ef9ae7cca 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -263,7 +263,6 @@ jobs: - name: Dispatch workflow run uses: actions/github-script@c713e510dbd7d213d92d41b7a7805a986f4c5c66 # v6.2.0 with: - github-token: ${{ secrets.GHA_WORKFLOW_DISPATCH }} script: | github.rest.actions.createWorkflowDispatch({ owner: context.repo.owner, diff --git a/.github/workflows/test-coverage.yml b/.github/workflows/test-coverage.yml index 15cb3625d7..c2a7ea4b0d 100644 --- a/.github/workflows/test-coverage.yml +++ b/.github/workflows/test-coverage.yml @@ -211,7 +211,6 @@ jobs: - name: Dispatch workflow run uses: actions/github-script@c713e510dbd7d213d92d41b7a7805a986f4c5c66 # v6.2.0 with: - github-token: ${{ secrets.GHA_WORKFLOW_DISPATCH }} script: | github.rest.actions.createWorkflowDispatch({ owner: context.repo.owner, diff --git a/.github/workflows/test-npm.yml b/.github/workflows/test-npm.yml index 1a86d54ccb..142d428ae0 100644 --- a/.github/workflows/test-npm.yml +++ b/.github/workflows/test-npm.yml @@ -190,7 +190,6 @@ jobs: - name: Dispatch workflow run uses: actions/github-script@c713e510dbd7d213d92d41b7a7805a986f4c5c66 # v6.2.0 with: - github-token: ${{ secrets.GHA_WORKFLOW_DISPATCH }} script: | github.rest.actions.createWorkflowDispatch({ owner: context.repo.owner, diff --git a/.github/workflows/test-old-branches.yml b/.github/workflows/test-old-branches.yml index 01de1f3bab..489e47191b 100644 --- a/.github/workflows/test-old-branches.yml +++ b/.github/workflows/test-old-branches.yml @@ -70,7 +70,6 @@ jobs: uses: actions/github-script@c713e510dbd7d213d92d41b7a7805a986f4c5c66 # v6.2.0 if: ${{ github.event_name == 'push' || github.event.schedule == '0 0 15 * *' || matrix.branch == '6.0' }} with: - github-token: ${{ secrets.GHA_WORKFLOW_DISPATCH }} script: | github.rest.actions.createWorkflowDispatch({ owner: context.repo.owner,