Skip to content

Commit

Permalink
Push changes instead of upload-artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
tarikdem committed Apr 5, 2024
1 parent 0cafc73 commit d6598eb
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/check-dist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ name: Check dist

on:
push:
branches:
- master
paths-ignore:
- '**.md'
# branches:
# - master
# paths-ignore:
# - '**.md'
pull_request:
paths-ignore:
- '**.md'
Expand Down Expand Up @@ -44,9 +44,12 @@ jobs:
exit 1
fi
# If dist/ was different than expected, upload the expected version as an artifact
- uses: actions/upload-artifact@v2
if: ${{ failure() && steps.diff.outcome == 'failure' }}
with:
name: dist
path: dist/
# If dist/ was different than expected, push the changes
- if: ${{ failure() && steps.diff.outcome == 'failure' }}
run: |
git config user.name "GitHub Actions"
git config user.email "<>"
git add dist
git commit -m "Build new dist/index.js"
git push origin ${GITHUB_HEAD_REF}

0 comments on commit d6598eb

Please sign in to comment.