From 68d157ca61a59750acd2db6eeac5bf3e73f0d193 Mon Sep 17 00:00:00 2001 From: Hubert Cornet Date: Sat, 23 Aug 2025 10:26:24 +0200 Subject: [PATCH] Actualiser .gitea/workflows/ci.yml --- .gitea/workflows/ci.yml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 04c3a33..d82dad0 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -5,11 +5,12 @@ on: - cron: "0 */12 * * *" jobs: - run-ansible-playbook: + ansible_lint_and_syntax_check: runs-on: ubuntu-latest steps: - name: Check out repository code uses: actions/checkout@v4 + - name: Install ansible run: | apt update && apt upgrade -y @@ -47,4 +48,22 @@ jobs: to: me@davegallant.ca from: RFD Notify body: | - ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_number }} \ No newline at end of file + ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_number }} + + run-ansible-playbook: + needs: ansible_lint_and_syntax_check # Ce job dépend du succès du précédent + runs-on: ubuntu-latest + if: gitea.ref == 'refs/heads/main' # Ce job ne s'exécute que pour les push sur la branche 'main' + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + + - name: Install Ansible and dependencies + run: | + pip install ansible \ No newline at end of file