Skip to content

Commit

Permalink
update git fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
keybraker committed Feb 24, 2024
1 parent 7988543 commit 732dd37
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,17 @@ jobs:
# if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Fetch Tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*

- name: Get commits since last tag
id: get_commits
run: |
LATEST_TAG=$(git describe --tags --abbrev=0)
if [ -z "$LATEST_TAG" ]; then
LATEST_TAG=$(git describe --tags --abbrev=0 --always)
if [ -z "$LATEST_TAG" ] || [[ "$LATEST_TAG" == *"$GITHUB_SHA"* ]]; then
LATEST_TAG=$(git rev-list --max-parents=0 HEAD)
fi
COMMIT_MESSAGES=$(git log $LATEST_TAG..HEAD --pretty=format:"%h - %s")
Expand Down

0 comments on commit 732dd37

Please sign in to comment.