-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (50 loc) · 1.74 KB
/
day.yml
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: day
on:
schedule:
# 12PM UTC --> 8AM EST
- cron: '0 12 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Tailscale
uses: tailscale/github-action@main
with:
authkey: ${{ secrets.TAILSCALE_AUTH_KEY }}
- name: Setup SSH
id: ssh
env:
SSH_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: |
set -x
hosts=("fd7a:115c:a1e0:ab12:4843:cd96:6262:be69" "fd7a:115c:a1e0:ab12:4843:cd96:6249:397d" "fd7a:115c:a1e0:ab12:4843:cd96:6261:8661" "fd7a:115c:a1e0:ab12:4843:cd96:6262:1a73" "fd7a:115c:a1e0:ab12:4843:cd96:624d:675f")
mkdir -p ~/.ssh
for i in ${hosts[@]};
do
ssh-keyscan ${i} >> ~/.ssh/known_hosts
printf "%s" "${SSH_KEY}" > ~/.ssh/key
chmod 600 ~/.ssh/key
done
- name: Run Ansible Playbook
uses: dawidd6/action-ansible-playbook@v2.4.0
with:
playbook: main.yaml
directory: ./
key: ${{secrets.SSH_PRIVATE_KEY}}
inventory: |
[all]
fd7a:115c:a1e0:ab12:4843:cd96:6262:be69 serial=BS039450-3.0
fd7a:115c:a1e0:ab12:4843:cd96:6249:397d serial=BS039442-3.0
fd7a:115c:a1e0:ab12:4843:cd96:6261:8661 serial=BS039438-3.0
fd7a:115c:a1e0:ab12:4843:cd96:6262:1a73 serial=BS039441-3.0
fd7a:115c:a1e0:ab12:4843:cd96:624d:675f serial=BS044917-3.0
[all:vars]
ansible_user=pi
options: |
--verbose
--tag base-config -e color=green -e brightness=30
- name: Confirmation
run: |
echo "Tests completed successfully..."