Add workflow #1
1 changed files with 5 additions and 2 deletions
commit
361be6c6cb
|
|
@ -22,17 +22,19 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
latest_tag=$(curl -s https://api.github.com/repos/Stirling-Tools/Stirling-PDF/tags | jq -r '.[0].name')
|
latest_tag=$(curl -s https://api.github.com/repos/Stirling-Tools/Stirling-PDF/tags | jq -r '.[0].name')
|
||||||
echo "latest_tag=$latest_tag" >> $GITHUB_ENV
|
echo "latest_tag=$latest_tag" >> $GITHUB_ENV
|
||||||
|
echo "Latest tag: $latest_tag"
|
||||||
|
|
||||||
- name: Compare with Latest Published Tag
|
- name: Compare with Latest Published Tag
|
||||||
id: check
|
id: check
|
||||||
run: |
|
run: |
|
||||||
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"
|
||||||
if [ "$latest_tag" = "$latest_published_tag" ]; then
|
if [ "$latest_tag" = "$latest_published_tag" ]; then
|
||||||
echo "update_available=true" >> $GITHUB_ENV
|
echo "update_available=true" >> $GITHUB_ENV
|
||||||
echo "Image already exists. Exiting."
|
echo "Image already exists."
|
||||||
else
|
else
|
||||||
echo "update_available=false" >> $GITHUB_ENV
|
echo "update_available=false" >> $GITHUB_ENV
|
||||||
echo "No published tag found. Proceeding with the build."
|
echo "No published tag found."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
build:
|
build:
|
||||||
|
|
@ -47,6 +49,7 @@ jobs:
|
||||||
|
|
||||||
- name: Clone Stirling-PDF Repository
|
- name: Clone Stirling-PDF Repository
|
||||||
run: |
|
run: |
|
||||||
|
echo "Latest tag: $needs.check-latest-tag.outputs.latest_tag"
|
||||||
git clone --branch ${{ needs.check-latest-tag.outputs.latest_tag }} --depth 1 https://github.com/Stirling-Tools/Stirling-PDF.git
|
git clone --branch ${{ needs.check-latest-tag.outputs.latest_tag }} --depth 1 https://github.com/Stirling-Tools/Stirling-PDF.git
|
||||||
|
|
||||||
- name: Apply Patches
|
- name: Apply Patches
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue