forked from OWASP/Nest
-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (27 loc) · 852 Bytes
/
sync.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Sync data
on:
schedule:
- cron: '17 5 * * *'
workflow_dispatch:
env:
FORCE_COLOR: 1
jobs:
update-data:
name: Run data sync
env:
ANSIBLE_HOST_KEY_CHECKING: False
STAGING_HOST_IP_ADDRESS: '${{ secrets.STAGING_HOST_IP_ADDRESS }}'
STAGING_SSH_PRIVATE_KEY_PATH: '~/.ssh/nest_staging_private_key'
environment: staging
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Prepare SSH key
run: |
mkdir -m 700 ~/.ssh
echo "${{ secrets.STAGING_SSH_PRIVATE_KEY }}" > ${{ env.STAGING_SSH_PRIVATE_KEY_PATH }}
chmod 400 ${{ env.STAGING_SSH_PRIVATE_KEY_PATH }}
- name: Run make sync-data
working-directory: .github/ansible
run: ansible-playbook -i inventory.yaml staging/sync-data.yaml