Actualiser .gitea/workflows/check-release.yaml
All checks were successful
Check Calibre-web version / check-version (push) Successful in 13s

This commit is contained in:
2025-04-05 21:12:55 +02:00
parent c7cf3c6747
commit ca3eb9f6f6

View File

@@ -11,12 +11,32 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Retrieve Calibre-web version
- name: Retrieve latest Calibre-web version
run: |
mkdir -p /tmp
curl -s https://api.github.com/repos/janeczku/calibre-web/releases/latest \
| jq -r .tag_name > calibre_web_latest.txt
| jq -r .tag_name > /tmp/calibre_web_latest.txt
if diff calibre_web_latest.txt /tmp/calibre_web_latest.txt ; then
mv /tmp/calibre_web_latest.txt calibre_web_latest.txt
fi
shell: bash
- name: Send version to Haoma
- name: Check if version changed
uses: stefanzweifel/git-auto-commit-action@v5
id: auto-commit-action
- name: Send new version to Haoma
if: steps.auto-commit-action.outputs.changes_detected == 'true'
run: |
curl -fsS -m 10 --retry 5 --data-binary @calibre_web_latest.txt \
'https://haoma.petite-maison-orange.fr/ping/933b9d63-37e1-42a7-9681-241af9c582f1'
curl -fsS -m 10 --retry 5 \
--data-raw "New version avalaible $(cat calibre_web_latest.txt)" \
'https://haoma.petite-maison-orange.fr/ping/933b9d63-37e1-42a7-9681-241af9c582f1'
shell: bash
- name: Send no version to Haoma
if: steps.auto-commit-action.outputs.changes_detected == 'true'
run: |
curl -fsS -m 10 --retry 5 \
--data-raw "No version avalaible stay on $(cat calibre_web_latest.txt)" \
'https://haoma.petite-maison-orange.fr/ping/933b9d63-37e1-42a7-9681-241af9c582f1'
shell: bash