Fix workflow update_available check
This commit is contained in:
parent
c41747ba36
commit
0f86860a95
1 changed files with 3 additions and 3 deletions
|
|
@ -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 "")
|
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"
|
echo "Latest published tag: $latest_published_tag"
|
||||||
if [ "$latest_tag" = "$latest_published_tag" ]; then
|
if [ "$latest_tag" = "$latest_published_tag" ]; then
|
||||||
echo "update_available=true" >> $GITHUB_OUTPUT
|
echo "update_available=false" >> $GITHUB_OUTPUT
|
||||||
echo "Image already exists."
|
echo "Image already exists."
|
||||||
else
|
else
|
||||||
echo "update_available=false" >> $GITHUB_OUTPUT
|
echo "update_available=true" >> $GITHUB_OUTPUT
|
||||||
echo "No published tag found."
|
echo "No published tag found."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
build:
|
build:
|
||||||
needs: [check-latest-tag]
|
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
|
runs-on: docker
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/catthehacker/ubuntu:act-22.04
|
image: ghcr.io/catthehacker/ubuntu:act-22.04
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue