Skip to content

Commit

Permalink
Use action/checkout fetch-depth instead of manually fetch (open-telem…
Browse files Browse the repository at this point in the history
…etry#4536)

Signed-off-by: Bogdan Drutu <[email protected]>
  • Loading branch information
bogdandrutu authored Dec 10, 2021
1 parent 4dcb338 commit 5405247
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Check for CHANGELOG changes
run: |
with:
# Only the latest commit of the feature branch is available
# automatically. To diff with the base branch, we need to
# fetch that too (and we only need its latest commit).
git fetch origin ${{ github.base_ref }} --depth=1
fetch-depth: 1

- name: Check for CHANGELOG changes
run: |
if [[ $(git diff --name-only FETCH_HEAD | grep CHANGELOG) ]]
then
echo "A CHANGELOG was modified. Looks good!"
Expand Down

0 comments on commit 5405247

Please sign in to comment.