All checks were successful
Check Calibre-web version / check-version (push) Successful in 13s
43 lines
1.5 KiB
YAML
43 lines
1.5 KiB
YAML
name: Check Calibre-web version
|
|
on:
|
|
push:
|
|
branches:
|
|
- main # Changez cela si votre branche principale a un autre nom
|
|
|
|
jobs:
|
|
check-version:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
- 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 > /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: 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-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
|