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
This commit is contained in:
Jonathan Desrosiers 2022-09-08 23:39:17 +00:00
parent acad157d89
commit 8f87e05783
8 changed files with 0 additions and 8 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,