Skip to content

Commit

Permalink
Add --no-ignore to git diff
Browse files Browse the repository at this point in the history
  • Loading branch information
LoomingEcho committed Apr 17, 2024
1 parent 0315e33 commit 35fe2a9
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,30 +79,27 @@ jobs:
- name: Build project
run: npm run build

- name: Setup git user
run: |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "[email protected]"
- name: Add dist and types
run: |
git add -f ./dist
git add -f ./types
- name: Check if dist directory has changed
id: check-dist-changes
run: |
before_commit="${{ github.event.before }}"
if git diff --exit-code; then
if git diff --no-ignore --exit-code; then
echo "dist_changed=false" >> "$GITHUB_ENV"
echo "No changes detected in the dist directory."
else
echo "dist_changed=true" >> "$GITHUB_ENV"
fi
- name: Setup git user
run: |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "[email protected]"
- name: Commit dist and/or types if changed
if: steps.check-dist-changes.outputs.dist_changed == 'true'
run: |
git add -f ./dist
git add -f ./types
git commit -m "${{ env.CI_COMMIT_MESSAGE }}"
git push

0 comments on commit 35fe2a9

Please sign in to comment.