-
Notifications
You must be signed in to change notification settings - Fork 0
28 lines (24 loc) · 806 Bytes
/
validate.yml
File metadata and controls
28 lines (24 loc) · 806 Bytes
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
name: Validate
on:
push:
pull_request:
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate shell scripts
run: |
bash -n backup.sh
bash -n restore.sh
bash -n install.sh
- name: Smoke test backup/restore scripts
run: |
TMP_MEDIA="$(mktemp -d)"
mkdir -p "$TMP_MEDIA/config/sonarr" "$TMP_MEDIA/logs"
printf '<Config>ok</Config>\n' > "$TMP_MEDIA/config/sonarr/config.xml"
printf 'db\n' > "$TMP_MEDIA/config/sonarr/sonarr.db"
printf 'WIREGUARD_PRIVATE_KEY=secret\n' > "$TMP_MEDIA/.env"
bash backup.sh --path "$TMP_MEDIA" --stack-dir "$TMP_MEDIA" --keep 1
bash restore.sh --list --path "$TMP_MEDIA"