feat(ci): minor speed up (#4935)

This commit is contained in:
Daniel Gak Anagrov
2025-06-13 10:32:13 +02:00
committed by GitHub
parent cfa0b249d1
commit b12a37e0bb
3 changed files with 13 additions and 1 deletions
+6
View File
@@ -14,6 +14,12 @@ jobs:
runs-on: blacksmith
steps:
- uses: actions/checkout@v4.2.2
with:
sparse-checkout: |
.github/workflows/scripts/get_version.sh
.github/workflows/scripts/common.sh
fetch-depth: 1
fetch-tags: 1
- run: git fetch origin 'refs/tags/*:refs/tags/*'
- run: chmod +x ./get_version.sh ./common.sh
working-directory: ./.github/workflows/scripts
+6
View File
@@ -22,6 +22,12 @@ jobs:
runs-on: blacksmith
steps:
- uses: actions/checkout@v4.2.2
with:
sparse-checkout: |
.github/workflows/scripts/get_version.sh
.github/workflows/scripts/common.sh
fetch-depth: 1
fetch-tags: 1
- run: git fetch origin 'refs/tags/*:refs/tags/*'
- run: chmod +x ./get_version.sh ./common.sh
working-directory: ./.github/workflows/scripts
+1 -1
View File
@@ -5,7 +5,7 @@ set -eo pipefail
DOCKER_IMAGE_TAG="speckle/speckle-${SPECKLE_SERVER_PACKAGE}"
# shellcheck disable=SC2068,SC2046
LAST_RELEASE="$(git describe --always --tags $(git rev-list --tags) | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1)" # get the last release tag. FIXME: Fails if a commit is tagged with more than one tag: https://stackoverflow.com/questions/8089002/git-describe-with-two-tags-on-the-same-commit/56039163#56039163
LAST_RELEASE="$(git describe --always --tags $(git rev-list --tags --max-count=1) | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1)" # get the last release tag. FIXME: Fails if a commit is tagged with more than one tag: https://stackoverflow.com/questions/8089002/git-describe-with-two-tags-on-the-same-commit/56039163#56039163
# shellcheck disable=SC2034
NEXT_RELEASE="$(echo "${LAST_RELEASE}" | awk -F. -v OFS=. '{$NF += 1 ; print}')"