dist: cat buildkit log file if build fails #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |