Actualiser .gitea/workflows/ci.yml
This commit is contained in:
@@ -5,11 +5,12 @@ on:
|
|||||||
- cron: "0 */12 * * *"
|
- cron: "0 */12 * * *"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run-ansible-playbook:
|
ansible_lint_and_syntax_check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install ansible
|
- name: Install ansible
|
||||||
run: |
|
run: |
|
||||||
apt update && apt upgrade -y
|
apt update && apt upgrade -y
|
||||||
@@ -47,4 +48,22 @@ jobs:
|
|||||||
to: me@davegallant.ca
|
to: me@davegallant.ca
|
||||||
from: RFD Notify
|
from: RFD Notify
|
||||||
body: |
|
body: |
|
||||||
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_number }}
|
${{ 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