Skip to content

.github/workflows/run_weekly.yml #113

.github/workflows/run_weekly.yml

.github/workflows/run_weekly.yml #113

Workflow file for this run

on:
workflow_dispatch:
schedule:
- cron: '0 8 * * 0'
env:
ANSIBLE_HOST_KEY_CHECKING: False
jobs:
run-weekly:
strategy:
fail-fast: false
matrix:
playbook:
- "backup-cornelius.yml"
runs-on: arc-runner-set
steps:
- uses: actions/checkout@v2
- run: echo "${HOME}/.local/bin" >> $GITHUB_PATH
- name: Set up vault secret
run: echo ${{ secrets.VAULT_PASSWORD }} | base64 -d > .vault_password
- name: Install SSH key
uses: shimataro/[email protected]
with:
key: ${{ secrets.SSH_KEY }}
known_hosts: unnecessary
if_key_exists: ignore
- name: Set up Python 3
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: pip3 install ansible
- name: Run playbook
run: |
ansible-playbook -i hosts.yml \
--vault-password-file .vault_password \
playbooks/${{ matrix.playbook }}