File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,14 @@ jobs:
37
37
tag_name=${GITHUB_REF#refs/tags/}
38
38
test "x$GITHUB_REF" != "x$tag_name" || die "Not a tag: $GITHUB_REF"
39
39
40
+ # `actions/checkout` only downloads the peeled tag (i.e. the commit)
41
+ git fetch origin +$GITHUB_REF:$GITHUB_REF
42
+
40
43
train="$(echo "$tag_name" | sed -n 's|^\(v[0-9][0-9]*\)[.0-9]*$|\1|p')"
41
44
test -n "$train" || die "Unexpected tag name: $tag_name"
42
45
echo "$train" >train
43
46
44
- if train_rev="$(git rev-parse --verify "refs/remotes/origin/$train")"
47
+ if train_rev="$(git rev-parse --verify "refs/remotes/origin/$train" 2>/dev/null )"
45
48
then
46
49
test 0 -eq "$(git rev-list --count "$GITHUB_REF..$train_rev")" ||
47
50
die "Branch '$train' does not fast-forward to tag '$tag_name'"
You can’t perform that action at this time.
0 commit comments