@@ -205,3 +205,46 @@ jobs:
205205 branch : ${{ github.event.pull_request.head.ref }}
206206 command : push
207207 commits : " ${{ steps.create-commit.outputs.commits }}"
208+
209+ vendor-validate :
210+ # Run validation after the generated vendor patch has been pushed, to ensure the PR contains
211+ # the committed `vendor/dist/*` outputs. This runs inside the same workflow as the push, so it
212+ # doesn't rely on additional workflows being triggered by that push.
213+ if : github.event.pull_request.user.login == 'dependabot[bot]' && needs.vendor-build.outputs.is_vendor_group == 'true' && needs.vendor-build.outputs.has_changes == 'true'
214+ runs-on : ubuntu-latest
215+ needs :
216+ - vendor-build
217+ - vendor-push
218+ permissions :
219+ contents : read
220+ pull-requests : read
221+ steps :
222+ - uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
223+ with :
224+ repository : ${{ github.event.pull_request.head.repo.full_name }}
225+ ref : ${{ github.event.pull_request.head.ref }}
226+ fetch-depth : 1
227+ persist-credentials : false
228+ - name : Restore trusted Node setup actions
229+ run : |
230+ git fetch --no-tags --depth=1 origin "${{ github.event.pull_request.base.sha }}"
231+ git checkout "${{ github.event.pull_request.base.sha }}" -- .github/actions/node
232+ - name : Restore trusted vendoring scripts
233+ run : |
234+ git fetch --no-tags --depth=1 origin "${{ github.event.pull_request.base.sha }}"
235+ git checkout "${{ github.event.pull_request.base.sha }}" -- vendor/rspack.js vendor/rspack.config.js
236+ - uses : ./.github/actions/node/active-lts
237+ # Running `yarn` also automatically runs Rspack as a postinstall script.
238+ - run : yarn --frozen-lockfile
239+ working-directory : vendor
240+ - name : Ensure no untracked outputs
241+ run : |
242+ set -euo pipefail
243+
244+ if [ -n "$(git status --porcelain)" ]; then
245+ echo "Working tree is dirty after vendoring:"
246+ git status --porcelain
247+ exit 1
248+ fi
249+ - name : Diff only expected paths
250+ run : git diff --exit-code -- vendor/dist vendor/package.json vendor/yarn.lock
0 commit comments