File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626 - ' composer.*'
2727 # Confirm any changes to relevant workflow files.
2828 - ' .github/workflows/check-built-files.yml'
29+ # Changes to the default themes should be handled by the themes workflows.
30+ - ' !src/wp-content/themes/twenty**'
2931
3032# Cancels all previous workflow runs for pull requests that have not completed.
3133concurrency :
Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ name: Commit Built File Changes (PRs)
33
44on :
55 workflow_run :
6- workflows : [ 'Check Built Files (PRs)' ]
6+ workflows :
7+ - ' Check Built Files (PRs)'
8+ - ' Test Default Themes & Create ZIPs'
79 types :
810 - completed
911
3537 update-built-files :
3638 name : Check and update built files
3739 runs-on : ubuntu-24.04
38- if : ${{ github.repository == 'wordpress /wordpress-develop' }}
40+ if : ${{ github.repository == 'desrosj /wordpress-develop' }}
3941 timeout-minutes : 10
4042 permissions :
4143 contents : write
Original file line number Diff line number Diff line change @@ -148,6 +148,32 @@ jobs:
148148 - name : Build theme
149149 run : npm run build
150150
151+ - name : Check for changes to versioned files
152+ id : built-file-check
153+ if : ${{ github.event_name == 'pull_request' }}
154+ run : |
155+ if git diff --quiet; then
156+ echo "uncommitted_changes=false" >> "$GITHUB_OUTPUT"
157+ else
158+ echo "uncommitted_changes=true" >> "$GITHUB_OUTPUT"
159+ fi
160+
161+ - name : Display changes to versioned files
162+ if : ${{ steps.built-file-check.outputs.uncommitted_changes == 'true' }}
163+ run : git diff
164+
165+ - name : Save diff to a file
166+ if : ${{ steps.built-file-check.outputs.uncommitted_changes == 'true' }}
167+ run : git diff > ./changes.diff
168+
169+ # Uploads the diff file as an artifact.
170+ - name : Upload diff file as artifact
171+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
172+ if : ${{ steps.built-file-check.outputs.uncommitted_changes == 'true' }}
173+ with :
174+ name : pr-built-file-changes
175+ path : changes.diff
176+
151177 - name : Ensure version-controlled files are not modified or deleted
152178 run : git diff --exit-code
153179
You can’t perform that action at this time.
0 commit comments