Actualiser .gitea/workflows/ci.yml
This commit is contained in:
@@ -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
|
||||
@@ -48,3 +49,21 @@ jobs:
|
||||
from: RFD Notify
|
||||
body: |
|
||||
${{ 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
|
Reference in New Issue
Block a user