Fix workflow update_available check
Some checks failed
Build and Patch Releases / check-latest-tag (push) Successful in 1s
Build and Patch Releases / build (push) Has been cancelled

This commit is contained in:
Sean Greenawalt 2025-09-21 20:29:24 -04:00
commit 0f86860a95

View file

@ -31,16 +31,16 @@ jobs:
latest_published_tag=$(curl -s -u :${{ secrets.TOKEN }} https://git.spgrn.com/v2/seang96/stirling-pdf/tags/list 2>/dev/null | jq -r '.tags[]' 2>/dev/null | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+-fat$' 2>/dev/null | sed 's/-fat$//' 2>/dev/null | sort -V | tail -1 || echo "")
echo "Latest published tag: $latest_published_tag"
if [ "$latest_tag" = "$latest_published_tag" ]; then
echo "update_available=true" >> $GITHUB_OUTPUT
echo "update_available=false" >> $GITHUB_OUTPUT
echo "Image already exists."
else
echo "update_available=false" >> $GITHUB_OUTPUT
echo "update_available=true" >> $GITHUB_OUTPUT
echo "No published tag found."
fi
build:
needs: [check-latest-tag]
if: needs.check-latest-tag.outputs.update_available == 'false' || github.event_name != 'schedule'
if: needs.check-latest-tag.outputs.update_available == 'true' || github.event_name != 'schedule'
runs-on: docker
container:
image: ghcr.io/catthehacker/ubuntu:act-22.04