<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[60063] trunk/.github/workflows: Build/Test Tools: Eliminate the need for custom tokens.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/60063">60063</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/60063","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>desrosj</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2025-03-21 16:33:17 +0000 (Fri, 21 Mar 2025)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Build/Test Tools: Eliminate the need for custom tokens.

This reworks the workflow files introduced in <a href="https://core.trac.wordpress.org/changeset/59983">[59983]</a> to eliminate the need for a custom app token.

Follow up to <a href="https://core.trac.wordpress.org/changeset/59983">[59983]</a>, <a href="https://core.trac.wordpress.org/changeset/60052">[60052]</a>, <a href="https://core.trac.wordpress.org/changeset/60059">[60059]</a>.

See <a href="https://core.trac.wordpress.org/ticket/62221">#62221</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkgithubworkflowscheckbuiltfilesyml">trunk/.github/workflows/check-built-files.yml</a></li>
<li><a href="#trunkgithubworkflowsreusablecheckbuiltfilesyml">trunk/.github/workflows/reusable-check-built-files.yml</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkgithubworkflowscommitbuiltfilechangesyml">trunk/.github/workflows/commit-built-file-changes.yml</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkgithubworkflowscheckbuiltfilesyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/.github/workflows/check-built-files.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/check-built-files.yml     2025-03-21 13:54:38 UTC (rev 60062)
+++ trunk/.github/workflows/check-built-files.yml       2025-03-21 16:33:17 UTC (rev 60063)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,12 +1,12 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-# Checks for uncommitted changes to built files and pushes changes back.
-name: Check built files
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+# Checks for uncommitted changes to built files in pull requests.
+name: Check Built Files (PRs)
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> on:
</span><span class="cx" style="display: block; padding: 0 10px">   # Because all commits happen through SVN and should always be manually reviewed by a committer, this workflow only
</span><span class="cx" style="display: block; padding: 0 10px">   # runs for pull requests.
</span><span class="cx" style="display: block; padding: 0 10px">   #
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-  # Other workflows that run on push will detect changes to versioned files and fail.
-  pull_request_target:
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  # Other workflows that run for the push event will detect changes to versioned files and fail.
+  pull_request:
</ins><span class="cx" style="display: block; padding: 0 10px">     branches:
</span><span class="cx" style="display: block; padding: 0 10px">       - trunk
</span><span class="cx" style="display: block; padding: 0 10px">       - '6.[8-9]'
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -31,7 +31,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> concurrency:
</span><span class="cx" style="display: block; padding: 0 10px">   # The concurrency group contains the workflow name and the branch name for pull requests
</span><span class="cx" style="display: block; padding: 0 10px">   # or the commit hash for any other events.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.sha }}
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
</ins><span class="cx" style="display: block; padding: 0 10px">   cancel-in-progress: true
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> # Disable permissions for all available scopes by default.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -39,13 +39,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> permissions: {}
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> jobs:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-  update-built-files:
-    name: Update built files
-    permissions:
-      contents: write
-    if: ${{ github.repository == 'WordPress/wordpress-develop' }}
-    # This should always reference a version of the workflow committed through SVN and never a local reference.
-    uses: WordPress/wordpress-develop/.github/workflows/reusable-check-built-files.yml@trunk
-    secrets:
-      GH_APP_ID: ${{ secrets.GH_PR_MANAGEMENT_APP_ID }}
-      GH_APP_PRIVATE_KEY: ${{ secrets.GH_PR_MANAGEMENT_APP_PRIVATE_KEY }}
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  check-for-built-file-changes:
+    name: Check built files
+    # This prevents an unnecessary second run after changes are committed back because Dependabot always rebases and force pushes.
+    if: ${{ github.repository == 'wordpress/wordpress-develop' && ( github.actor != 'dependabot[bot]' || github.event.commits < 2 ) }}
+    uses: ./.github/workflows/reusable-check-built-files.yml
</ins></span></pre></div>
<a id="trunkgithubworkflowscommitbuiltfilechangesyml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: trunk/.github/workflows/commit-built-file-changes.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/commit-built-file-changes.yml                             (rev 0)
+++ trunk/.github/workflows/commit-built-file-changes.yml       2025-03-21 16:33:17 UTC (rev 60063)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,126 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+# Commits all missed changes to built files back to pull request branches.
+name: Commit Built File Changes (PRs)
+
+on:
+  workflow_run:
+    workflows: [ 'Check Built Files (PRs)' ]
+    types:
+      - completed
+
+# Cancels all previous workflow runs for pull requests that have not completed.
+concurrency:
+  # The concurrency group contains the workflow name and the branch name for pull requests
+  # or the commit hash for any other events.
+  group: ${{ github.workflow }}-${{ github.event_name == 'workflow_run' && format( '{0}-{1}', github.event.workflow_run.head_branch, github.event.workflow_run.head_repository.name ) || github.sha }}
+
+# Disable permissions for all available scopes by default.
+# Any needed permissions should be configured at the job level.
+permissions: {}
+
+jobs:
+  # Checks a PR for uncommitted changes to built files.
+  #
+  # Performs the following steps:
+  # - Attempts to download the artifact containing the PR diff.
+  # - Checks for the existence of an artifact.
+  # - Unzips the artifact.
+  # - Checks out the repository.
+  # - Applies the patch file.
+  # - Displays the result of git diff.
+  # - Configures the Git author.
+  # - Stages changes.
+  # - Commits changes.
+  # - Pushes changes.
+  update-built-files:
+    name: Check and update built files
+    runs-on: ubuntu-24.04
+    if: ${{ github.repository == 'wordpress/wordpress-develop' }}
+    timeout-minutes: 10
+    permissions:
+      contents: write
+    steps:
+      - name: Download artifact
+        uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
+        with:
+          script: |
+            const artifacts = await github.rest.actions.listWorkflowRunArtifacts( {
+               owner: context.repo.owner,
+               repo: context.repo.repo,
+               run_id: process.env.RUN_ID,
+            } );
+
+            const matchArtifact = artifacts.data.artifacts.filter( ( artifact ) => {
+              return artifact.name === 'pr-built-file-changes'
+            } )[0];
+
+            if ( ! matchArtifact ) {
+              core.info( 'No artifact found!' );
+              return;
+            }
+
+            const download = await github.rest.actions.downloadArtifact( {
+               owner: context.repo.owner,
+               repo: context.repo.repo,
+               artifact_id: matchArtifact.id,
+               archive_format: 'zip',
+            } );
+
+            const fs = require( 'fs' );
+            fs.writeFileSync( '${{ github.workspace }}/pr-built-file-changes.zip', Buffer.from( download.data ) )
+        env:
+          RUN_ID: ${{ github.event.workflow_run.id }}
+
+      - name: Check for artifact
+        id: artifact-check
+        run: |
+          if [ -f "pr-built-file-changes.zip" ]; then
+            echo "exists=true" >> "$GITHUB_OUTPUT"
+          else
+            echo "exists=false" >> "$GITHUB_OUTPUT"
+          fi
+
+      - name: Unzip the artifact containing the PR data
+        if: ${{ steps.artifact-check.outputs.exists == 'true' }}
+        run: unzip pr-built-file-changes.zip
+
+      - name: Checkout repository
+        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+        if: ${{ steps.artifact-check.outputs.exists == 'true' }}
+        with:
+          repository: ${{ github.event.workflow_run.repository.full_name }}
+          ref: ${{ github.event.workflow_run.head_branch }}
+          path: 'pr-repo'
+          show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
+
+      - name: Apply patch
+        if: ${{ steps.artifact-check.outputs.exists == 'true' }}
+        working-directory: 'pr-repo'
+        run: git apply ${{ github.workspace }}/changes.diff
+
+      - name: Display changes to versioned files
+        if: ${{ steps.artifact-check.outputs.exists == 'true' }}
+        working-directory: 'pr-repo'
+        run: git diff
+
+      - name: Configure git user name and email
+        if: ${{ steps.artifact-check.outputs.exists == 'true' }}
+        working-directory: 'pr-repo'
+        run: |
+          git config user.name "WordPress Build Script Bot[bot]"
+          git config user.email wordpress@users.noreply.github.com
+
+      - name: Stage changes
+        if: ${{ steps.artifact-check.outputs.exists == 'true' }}
+        working-directory: 'pr-repo'
+        run: git add .
+
+      - name: Commit changes
+        if: ${{ steps.artifact-check.outputs.exists == 'true' }}
+        working-directory: 'pr-repo'
+        run: |
+          git commit -m "Automation: Updating built files with changes. [dependabot skip]"
+
+      - name: Push changes
+        if: ${{ steps.artifact-check.outputs.exists == 'true' }}
+        working-directory: 'pr-repo'
+        run: git push
</ins></span></pre></div>
<a id="trunkgithubworkflowsreusablecheckbuiltfilesyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/.github/workflows/reusable-check-built-files.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/reusable-check-built-files.yml    2025-03-21 13:54:38 UTC (rev 60062)
+++ trunk/.github/workflows/reusable-check-built-files.yml      2025-03-21 16:33:17 UTC (rev 60063)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,13 +1,10 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-name: Lint GitHub Actions workflows
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+##
+# A reusable workflow that checks for uncommitted changes to built files in pull requests.
+##
+name: Check Built Files (PRs)
+
</ins><span class="cx" style="display: block; padding: 0 10px"> on:
</span><span class="cx" style="display: block; padding: 0 10px">   workflow_call:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    secrets:
-      GH_APP_ID:
-        description: 'A GitHub App ID.'
-        required: true
-      GH_APP_PRIVATE_KEY:
-        description: 'A GitHub App private key.'
-        required: true
</del><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> permissions: {}
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -14,11 +11,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> jobs:
</span><span class="cx" style="display: block; padding: 0 10px">   # Checks a PR for uncommitted changes to built files.
</span><span class="cx" style="display: block; padding: 0 10px">   #
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-  # This job uses a GitHub App instead of $GITHUB_TOKEN because Dependabot pull requests are only granted
-  # read-only access.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  # When changes are detected, the patch is stored as an artifact for processing by the Commit Built File Changes
+  # workflow.
</ins><span class="cx" style="display: block; padding: 0 10px">   #
</span><span class="cx" style="display: block; padding: 0 10px">   # Performs the following steps:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-  # - Generates a token for authenticating with the GitHub App.
</del><span class="cx" style="display: block; padding: 0 10px">   # - Checks out the repository.
</span><span class="cx" style="display: block; padding: 0 10px">   # - Sets up Node.js.
</span><span class="cx" style="display: block; padding: 0 10px">   # - Configures caching for Composer.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -31,62 +27,17 @@
</span><span class="cx" style="display: block; padding: 0 10px">   # - Builds WordPress.
</span><span class="cx" style="display: block; padding: 0 10px">   # - Checks for changes to versioned files.
</span><span class="cx" style="display: block; padding: 0 10px">   # - Displays the result of git diff for debugging purposes.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-  # - Configures the Git author.
-  # - Stages changes.
-  # - Commits changes.
-  # - Pushes changes.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  # - Saves the diff to a patch file.
+  # - Uploads the patch file as an artifact.
</ins><span class="cx" style="display: block; padding: 0 10px">   update-built-files:
</span><span class="cx" style="display: block; padding: 0 10px">     name: Check and update built files
</span><span class="cx" style="display: block; padding: 0 10px">     runs-on: ubuntu-24.04
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    # This prevents an unnecessary second run after changes are committed back because Dependabot always rebases
-    # updates and force pushes.
-    if: ${{ github.actor != 'dependabot[bot]' || github.event.commits < 2 }}
</del><span class="cx" style="display: block; padding: 0 10px">     timeout-minutes: 10
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    permissions:
-      contents: write
</del><span class="cx" style="display: block; padding: 0 10px">     steps:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-      - name: Generate Installation Token
-        id: generate_token
-        env:
-          GH_APP_ID: ${{ secrets.GH_APP_ID }}
-          GH_APP_PRIVATE_KEY: ${{ secrets.GH_APP_PRIVATE_KEY }}
-        run: |
-          echo "$GH_APP_PRIVATE_KEY" > private-key.pem
-
-          # Generate JWT
-          JWT=$(python3 - <<EOF
-          import jwt, time
-          private_key = open("private-key.pem", "r").read()
-          payload = {
-              "iat": int(time.time()),
-              "exp": int(time.time()) + 600,  # 10-minute expiration
-              "iss": $GH_APP_ID
-          }
-          print(jwt.encode(payload, private_key, algorithm="RS256"))
-          EOF
-          )
-
-          # Get Installation ID
-          INSTALLATION_ID=$(curl -s -X GET -H "Authorization: Bearer $JWT" \
-            -H "Accept: application/vnd.github.v3+json" \
-            https://api.github.com/app/installations | jq -r '.[0].id')
-
-          # Request Installation Access Token
-          ACCESS_TOKEN=$(curl -s -X POST -H "Authorization: Bearer $JWT" \
-            -H "Accept: application/vnd.github.v3+json" \
-            "https://api.github.com/app/installations/$INSTALLATION_ID/access_tokens" | jq -r '.token')
-
-          echo "ACCESS_TOKEN=$ACCESS_TOKEN" >> "$GITHUB_ENV"
-
-          rm -f private-key.pem
-
</del><span class="cx" style="display: block; padding: 0 10px">       - name: Checkout repository
</span><span class="cx" style="display: block; padding: 0 10px">         uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
</span><span class="cx" style="display: block; padding: 0 10px">         with:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-          repository: ${{ github.event.pull_request.head.repo.full_name }}
-          ref: ${{ github.event.pull_request.head.ref }}
</del><span class="cx" style="display: block; padding: 0 10px">           show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-          token: ${{ env.ACCESS_TOKEN }}
</del><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">       - name: Set up Node.js
</span><span class="cx" style="display: block; padding: 0 10px">         uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -144,21 +95,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">         if: ${{ steps.built-file-check.outputs.uncommitted_changes == 'true' }}
</span><span class="cx" style="display: block; padding: 0 10px">         run: git diff
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-      - name: Configure git user name and email
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+      - name: Save diff to a file
</ins><span class="cx" style="display: block; padding: 0 10px">         if: ${{ steps.built-file-check.outputs.uncommitted_changes == 'true' }}
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        run: |
-          git config user.name "wordpress-develop-pr-bot[bot]"
-          git config user.email ${{ secrets.GH_APP_ID }}+wordpress-develop-pr-bot[bot]@users.noreply.github.com
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        run: git diff > ./changes.diff
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-      - name: Stage changes
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+      # Uploads the diff file as an artifact.
+      - name: Upload diff file as artifact
+        uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
</ins><span class="cx" style="display: block; padding: 0 10px">         if: ${{ steps.built-file-check.outputs.uncommitted_changes == 'true' }}
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        run: git add .
-
-      - name: Commit changes
-        if: ${{ steps.built-file-check.outputs.uncommitted_changes == 'true' }}
-        run: |
-          git commit -m "Automation: Updating built files with changes. [dependabot skip]"
-
-      - name: Push changes
-        if: ${{ steps.built-file-check.outputs.uncommitted_changes == 'true' }}
-        run: git push
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        with:
+          name: pr-built-file-changes
+          path: changes.diff
</ins></span></pre>
</div>
</div>

</body>
</html>