stop execution after read content-length error #215
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: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- 'releases/*' | |
jobs: | |
build: | |
if: > | |
github.event_name == 'pull_request' && | |
github.event.pull_request.user.login == 'dependabot[bot]' | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- id: ref | |
run: | | |
if [[ -n '${{ github.event.ref }}' ]]; then | |
branch="${{ github.event.ref }}" | |
echo "branch=$branch" >> $GITHUB_OUTPUT | |
else | |
branch="${{ github.event.pull_request.head.ref }}" | |
echo "branch=$branch" >> $GITHUB_OUTPUT | |
fi | |
- name: checkout repo | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ steps.ref.outputs.branch }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '16' | |
- name: Install dependencies | |
run: | | |
npm ci | |
- name: Build Action | |
run: | | |
npm run build | |
- name: Update dist | |
run: | | |
git config user.name 'github-actions[bot]' | |
git config user.email 'github-actions[bot]@users.noreply.github.com' | |
git add ./dist | |
if ! git diff --quiet dist; then | |
git commit -m "Update dist" | |
git push origin HEAD:${{ steps.ref.outputs.branch }} | |
fi | |
integrity: | |
if: > | |
!failure() && | |
!cancelled() | |
needs: | |
- build | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '16.17.0' | |
- name: Build action | |
run: | | |
npm ci | |
npm run build | |
- name: Repository Integrity Check | |
run: | | |
git diff --quiet dist |