Skip to content

.github/workflows/run_nightly.yml #1250

.github/workflows/run_nightly.yml

.github/workflows/run_nightly.yml #1250

Workflow file for this run

on:
workflow_dispatch:
schedule:
- cron: '0 8 * * *'
env:
ANSIBLE_HOST_KEY_CHECKING: False
jobs:
run-nightly:
strategy:
fail-fast: false
matrix:
playbook:
- "dst_backup.yml"
- "backup-oca1.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 }}