Skip to content

Commit 1749e11

Browse files
committed
Fetch Git tags before running actions/version/entrypoint.sh
1 parent 621a37d commit 1749e11

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

.github/actions/version/action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ outputs:
3737
runs:
3838
using: "composite"
3939
steps:
40+
- name: Fetch Git tags
41+
run: git fetch --prune --unshallow --tags > /dev/null
42+
shell: bash
4043
- run: ${{ github.action_path }}/entrypoint.sh
4144
id: entrypoint
4245
shell: bash

.github/actions/version/entrypoint.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ parse_semver_component() {
5858
}
5959

6060
check_git_tag_exists() {
61-
git fetch --prune --unshallow --tags > /dev/null || {
62-
echo "Failed to fetch git tags. Make sure 'actions/checkout' was used before this action."
63-
exit 1
64-
}
6561
git show-ref --tags "v$1" --quiet && echo "true" || echo "false"
6662
}
6763

0 commit comments

Comments
 (0)