29 lines
665 B
YAML
29 lines
665 B
YAML
name: Update raspberry pis
|
|
|
|
on:
|
|
schedule:
|
|
- cron: @weekly
|
|
issue_comment:
|
|
|
|
jobs:
|
|
deploy:
|
|
name: Deploy Ansible Playbook
|
|
if: ${{ github.event.comment.body == '!run update-pis'}}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Ansible
|
|
shell: bash
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y ansible
|
|
|
|
- name: Run Ansible
|
|
uses: dawidd6/action-ansible-playbook@v2
|
|
with:
|
|
playbook: playbooks/update-pis.yml
|
|
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
options: |
|
|
--inventory inventory |