diff --git a/.github/workflows/update-pis.yml b/.github/workflows/update-pis.yml new file mode 100644 index 0000000..4df76a8 --- /dev/null +++ b/.github/workflows/update-pis.yml @@ -0,0 +1,23 @@ +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 \ No newline at end of file