Skip to content

Commit

Permalink
ci: fix commit range in push event (#29755)
Browse files Browse the repository at this point in the history
* fix commit range

* use github.event.before instead of HEAD~1
  • Loading branch information
yihau authored Jan 19, 2023
1 parent c4e43f1 commit e783876
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/crate-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Get commit range (push)
if: ${{ github.event_name == 'push' }}
run: |
echo "COMMIT_RANGE=$GITHUB_SHA" >> $GITHUB_ENV
echo "COMMIT_RANGE=${{ github.event.before }}..$GITHUB_SHA" >> $GITHUB_ENV
- name: Get commit range (pull_request)
if: ${{ github.event_name == 'pull_request' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Get commit range (push)
if: ${{ github.event_name == 'push' }}
run: |
echo "COMMIT_RANGE=$GITHUB_SHA" >> $GITHUB_ENV
echo "COMMIT_RANGE=${{ github.event.before }}..$GITHUB_SHA" >> $GITHUB_ENV
- name: Get commit range (pull_request)
if: ${{ github.event_name == 'pull_request' }}
Expand Down

0 comments on commit e783876

Please sign in to comment.