mirror of
https://github.com/actions/cache.git
synced 2025-03-14 12:16:59 +00:00
Don't need to mv the file before git diff
This commit is contained in:
parent
c9db520cf3
commit
0becada275
1 changed files with 8 additions and 6 deletions
14
.github/workflows/check-dist.yml
vendored
14
.github/workflows/check-dist.yml
vendored
|
@ -32,14 +32,16 @@ jobs:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Move the committed index.js file
|
- name: Rebuild the dist/ directory
|
||||||
run: mv dist/ /tmp/
|
|
||||||
|
|
||||||
- name: Rebuild the index.js file
|
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
- name: Compare the expected and actual index.js files
|
- name: Compare the expected and actual dist/ directories
|
||||||
run: git diff --ignore-all-space dist/ /tmp/dist
|
run: |
|
||||||
|
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
|
||||||
|
echo "Detected uncommitted changes after build. See status below:"
|
||||||
|
git diff
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
id: diff
|
id: diff
|
||||||
|
|
||||||
# If index.js was different than expected, upload the expected version as an artifact
|
# If index.js was different than expected, upload the expected version as an artifact
|
||||||
|
|
Loading…
Add table
Reference in a new issue