23 lines
510 B
YAML
23 lines
510 B
YAML
name: Update raspberry pis
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
types: [closed]
|
|
|
|
jobs:
|
|
deploy:
|
|
name: Deploy Ansible Playbook
|
|
if: github.event.pull_request.merged == true
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- name: Run Ansible
|
|
uses: dawidd6/action-ansible-playbook@v2
|
|
with:
|
|
playbook: update-pis.yml
|
|
directory: playbooks
|
|
options: |
|
|
--inventory inventory |