mirror of
https://github.com/docker/build-push-action.git
synced 2025-05-06 21:49:33 +02:00
workflows: add workflow to avoid checking in ungenerated code (#41)
This commit is contained in:
parent
03e2c54ea5
commit
658750494f
3 changed files with 51 additions and 11 deletions
40
.github/workflows/verify-build.yml
vendored
Normal file
40
.github/workflows/verify-build.yml
vendored
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
name: Verify Build Output
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
verify-build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: '16'
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
npm ci
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
|
- name: Check for changes
|
||||||
|
run: |
|
||||||
|
# Ignore yarn.lock changes since we're using npm
|
||||||
|
git update-index --assume-unchanged yarn.lock || true
|
||||||
|
if [[ -n "$(git status --porcelain)" ]]; then
|
||||||
|
echo "::error::Build generated new changes. Please commit the generated files."
|
||||||
|
git status
|
||||||
|
git diff
|
||||||
|
exit 1
|
||||||
|
fi
|
20
dist/index.js
generated
vendored
20
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue