Skip to content

Commit 513ca36

Browse files
committed
Adjustments.
1 parent 6a001fb commit 513ca36

2 files changed

Lines changed: 11 additions & 15 deletions

File tree

.github/workflows/commit-built-file-changes.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
} );
6363
6464
const matchArtifact = artifacts.data.artifacts.filter( ( artifact ) => {
65-
return artifact.name === 'pr-data'
65+
return artifact.name === 'pr-built-file-changes'
6666
} )[0];
6767
6868
if ( ! matchArtifact ) {
@@ -78,22 +78,22 @@ jobs:
7878
} );
7979
8080
const fs = require( 'fs' );
81-
fs.writeFileSync( '${{ github.workspace }}/pr-data.zip', Buffer.from( download.data ) )
81+
fs.writeFileSync( '${{ github.workspace }}/pr-built-file-changes.zip', Buffer.from( download.data ) )
8282
env:
8383
RUN_ID: ${{ github.event.workflow_run.id }}
8484

8585
- name: Check for artifact
8686
id: artifact-check
8787
run: |
88-
if [ -f "pr-data.zip" ]; then
88+
if [ -f "pr-built-file-changes.zip" ]; then
8989
echo "exists=true" >> "$GITHUB_OUTPUT"
9090
else
9191
echo "exists=false" >> "$GITHUB_OUTPUT"
9292
fi
9393
9494
- name: Unzip the artifact containing the PR data
9595
if: ${{ steps.artifact-check.outputs.exists == 'true' }}
96-
run: unzip pr-data.zip
96+
run: unzip pr-built-file-changes.zip
9797

9898
- name: Generate Installation Token
9999
id: generate_token
@@ -131,6 +131,9 @@ jobs:
131131
132132
rm -f private-key.pem
133133
134+
- name: list directory
135+
run: ls -la
136+
134137
- name: Checkout repository
135138
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
136139
if: ${{ steps.artifact-check.outputs.exists == 'true' }}
@@ -145,7 +148,7 @@ jobs:
145148

146149
- name: Apply patch
147150
if: ${{ steps.artifact-check.outputs.exists == 'true' }}
148-
run: git apply ./pr-data/patch.diff
151+
run: git apply ./pr-built-file-changes/changes.diff
149152

150153
- name: Display changes to versioned files
151154
if: ${{ steps.artifact-check.outputs.exists == 'true' }}

.github/workflows/reusable-check-built-files.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,20 +102,13 @@ jobs:
102102

103103
- name: Save diff to a file
104104
if: ${{ steps.built-file-check.outputs.uncommitted_changes == 'true' }}
105-
run: git diff > ./pr-data/changes.diff
106-
107-
- name: Save PR number
108-
if: ${{ steps.built-file-check.outputs.uncommitted_changes == 'true' }}
109-
run: |
110-
echo "${EVENT_NUMBER}" > ./pr-data/NR
111-
env:
112-
EVENT_NUMBER: ${{ github.event.number }}
105+
run: git diff > ./changes.diff
113106

114107
# Uploads the PR number and diff as an artifact for the Commit Built File Changes workflow to download and then
115108
# commit back for testing.
116109
- name: Upload PR data as artifact
117110
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
118111
if: ${{ steps.built-file-check.outputs.uncommitted_changes == 'true' }}
119112
with:
120-
name: pr-data
121-
path: pr-data/
113+
name: pr-built-file-changes
114+
path: pr-built-file-changes/

0 commit comments

Comments
 (0)