Skip to content

Commit bb16dd3

Browse files
Not-Nikclaude
andcommitted
Sparse-checkout min_version.txt and fetch tags only
Avoid a full clone in the calling workflow: only check out min_version.txt (needed by the nss action) and fetch tag refs to resolve the latest tag. The semver action does its own full checkout afterwards. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5a84b86 commit bb16dd3

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/semver.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,15 @@ jobs:
2323
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2424
with:
2525
persist-credentials: false
26-
fetch-depth: 0
26+
fetch-depth: 1
27+
fetch-tags: true
28+
sparse-checkout: min_version.txt
29+
sparse-checkout-cone-mode: false
2730

2831
- name: Get latest tag
2932
id: tag
3033
run: |
31-
echo "ref=$(git describe --tags --abbrev=0)" >> "$GITHUB_OUTPUT"
34+
echo "ref=$(git tag --sort=-creatordate | head -n 1)" >> "$GITHUB_OUTPUT"
3235
3336
- uses: mozilla/actions/nss@25cb84d060946c0ad6d2c3f79da479b16d180d71 # v1.1.0
3437
with:

0 commit comments

Comments
 (0)