name: Mise à jour automatique du programme # on: # schedule: # - cron: '0 * * * *' # Exécute la pipeline toutes les heures on: [workflow_dispatch] jobs: build: runs-on: ubuntu-latest steps: - name: Extraire la valeur HTML spécifique run: | wget -O - https://glpi-project.org/fr/telecharger-glpi/ | grep "
GLPI VERSION" | sed -n 's/.*GLPI VERSION \([0-9.]*\).*/\1/p' > current_version.txt
- name: Comparer les versions
run: |
if ! diff current_version.txt <(echo ${{ secrets.PROGRAM_VERSION }}); then
echo "Une nouvelle version du programme est disponible."
export PROGRAM_VERSION=$(cat current_version.txt)
# Continuer le processus de mise à jour ici
# Envoyer une demande PATCH à l'API GitHub pour mettre à jour la variable secrète
echo -n $PROGRAM_VERSION | base64 --wrap=0 > program_version_base64.txt
curl -X PATCH -H "Authorization: Bearer ${{ secrets.PERSONAL_ACCESS_TOKEN }}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/