Ajouter .gitea/workflows/check-release.yaml
Some checks failed
Build and Push Docker Image / build (push) Successful in 1m35s
Check BlueSky Crossposter version / check-version (push) Failing after 11s

This commit is contained in:
2025-04-05 21:42:32 +02:00
parent 105494ef18
commit 915ff89c50

View File

@@ -0,0 +1,49 @@
name: Check BlueSky Crossposter version
on:
schedule:
- cron: "0 */6 * * *"
push:
branches:
- main # Changez cela si votre branche principale a un autre nom
jobs:
check-version:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Retrieve latest BlueSky-Crossposter version
run: |
mkdir -p /tmp
git ls-remote https://github.com/Linus2punkt0/bluesky-crossposter.git HEAD \
| cut -f 1 > /tmp/bluesky_crossposter_latest.txt
diff calibre_web_latest.txt /tmp/bluesky_crossposter_latest.txt \
|| mv /tmp/calibre_web_latest.txt bluesky_crossposter_latest.txt
shell: bash
- name: Check if version changed
uses: stefanzweifel/git-auto-commit-action@v5
id: auto-commit-action
commit_user_name: My Gitea Actions Bot
commit_user_email: eric@petite-maison-orange.fr
commit_author: Gitea Action <servers@coissac.eu>
commit_message: New bluesky_crossposter_latest version avalaible
- 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 bluesky_crossposter_latest.txt)" \
'https://haoma.petite-maison-orange.fr/ping/4f109c94-61e4-4455-9bbd-629431b41ae4'
shell: bash
- name: Send no version to Haoma
if: steps.auto-commit-action.outputs.changes_detected == 'false'
run: |
curl -fsS -m 10 --retry 5 \
--data-raw "No version avalaible stay on $(cat bluesky_crossposter_latest.txt)" \
'https://haoma.petite-maison-orange.fr/ping/4f109c94-61e4-4455-9bbd-629431b41ae4'
shell: bash