Fix scheduled docker build for the latest tagged commit (#1116)

* Try to fetch all history

* more debug output

* The final commit

---------

Co-authored-by: Konstantin Koval
This commit is contained in:
Kostiantyn
2024-11-08 17:32:15 +02:00
committed by GitHub
parent 0fb6636ead
commit 7a59f3445f

View File

@@ -29,6 +29,7 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-tags: 'true' fetch-tags: 'true'
fetch-depth: 0
- name: Prepare the Matrix - name: Prepare the Matrix
id: prepare_matrix id: prepare_matrix
@@ -43,7 +44,7 @@ jobs:
;; ;;
schedule) schedule)
git fetch --all git fetch --all
TAG=$(git describe --tags --abbrev=0 || exit 0) TAG=$(git describe --tags --abbrev=0 --always || exit 0)
if [ -z "$TAG" ]; then if [ -z "$TAG" ]; then
echo 'tags=[{"tag": "${{ github.ref_name }}", "ref": "${{ github.ref }}"}]' >> $GITHUB_OUTPUT echo 'tags=[{"tag": "${{ github.ref_name }}", "ref": "${{ github.ref }}"}]' >> $GITHUB_OUTPUT
else else