Compare commits
3 Commits
565572c869
...
8948970733
| Author | SHA1 | Date | |
|---|---|---|---|
| 8948970733 | |||
| 2596129600 | |||
| 13b2351075 |
@@ -1,23 +0,0 @@
|
|||||||
name: Beets
|
|
||||||
on:
|
|
||||||
# schedule:
|
|
||||||
# # Run 4 times a day: 6am, 12pm, 6pm, 12am UTC
|
|
||||||
# - cron: '0 6,12,18,0 * * *'
|
|
||||||
workflow_dispatch: # Allow manual trigger
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
sync-beets:
|
|
||||||
runs-on: [home-server]
|
|
||||||
steps:
|
|
||||||
- name: Run Beets sync
|
|
||||||
working-directory: /home/gitea-runner/infrastructure/infrastructure/home-server/beets
|
|
||||||
run: |
|
|
||||||
git pull
|
|
||||||
docker compose pull -q
|
|
||||||
docker compose up -d
|
|
||||||
docker compose restart
|
|
||||||
sleep 2
|
|
||||||
docker exec -u 1000 beets bash -c 'beet -v import -i -q /managed/*' || true
|
|
||||||
# Clean up empty directories after import (but not /managed itself)
|
|
||||||
docker exec -u 1000 beets bash -c 'find /managed -mindepth 1 -type d -empty -delete' || true
|
|
||||||
echo "Beets sync completed"
|
|
||||||
46
.github/workflows/backup-zfs.yml
vendored
Normal file
46
.github/workflows/backup-zfs.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
name: ZFS Backup
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: 0 1 * * *
|
||||||
|
workflow_dispatch:
|
||||||
|
jobs:
|
||||||
|
update-infrastructure:
|
||||||
|
runs-on: [self-hosted, home-server]
|
||||||
|
steps:
|
||||||
|
- name: run syncoid
|
||||||
|
run: |
|
||||||
|
zpool status
|
||||||
|
echo ""
|
||||||
|
zfs list
|
||||||
|
echo ""
|
||||||
|
syncoid \
|
||||||
|
--recursive \
|
||||||
|
--no-privilege-elevation \
|
||||||
|
data-ssd/data \
|
||||||
|
backup/data
|
||||||
|
|
||||||
|
syncoid \
|
||||||
|
--recursive \
|
||||||
|
--no-privilege-elevation \
|
||||||
|
data-ssd/media \
|
||||||
|
backup/media
|
||||||
|
# steps:
|
||||||
|
# - name: run syncoid
|
||||||
|
# run: |
|
||||||
|
# zpool status
|
||||||
|
# echo ""
|
||||||
|
# zfs list
|
||||||
|
# echo ""
|
||||||
|
# syncoid \
|
||||||
|
# --recursive \
|
||||||
|
# --no-privilege-elevation \
|
||||||
|
# --no-rollback \
|
||||||
|
# data-ssd/data \
|
||||||
|
# backup/data
|
||||||
|
|
||||||
|
# syncoid \
|
||||||
|
# --recursive \
|
||||||
|
# --no-privilege-elevation \
|
||||||
|
# --no-rollback \
|
||||||
|
# data-ssd/media \
|
||||||
|
# backup/media
|
||||||
18
.github/workflows/libation-sync.yml
vendored
Normal file
18
.github/workflows/libation-sync.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
name: Libation
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
# Run 4 times a day: 6am, 12pm, 6pm, 12am UTC
|
||||||
|
- cron: '0 6,12,18,0 * * *'
|
||||||
|
workflow_dispatch: # Allow manual trigger
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
sync-audiobooks:
|
||||||
|
runs-on: [home-server]
|
||||||
|
steps:
|
||||||
|
- name: Run Libation sync
|
||||||
|
working-directory: /home/gitea-runner/infrastructure/infrastructure/home-server/libation
|
||||||
|
run: |
|
||||||
|
echo "Starting Libation audiobook sync at $(date)"
|
||||||
|
docker compose pull -q
|
||||||
|
docker compose run --rm libation
|
||||||
|
echo "Libation sync completed at $(date)"
|
||||||
@@ -314,11 +314,19 @@
|
|||||||
container = {
|
container = {
|
||||||
enabled = false;
|
enabled = false;
|
||||||
};
|
};
|
||||||
|
runner = {
|
||||||
|
shell = "${pkgs.bashNonInteractive}/bin/bash";
|
||||||
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd.services.gitea-runner-infrastructure.environment = {
|
systemd.services.gitea-runner-infrastructure.environment = {
|
||||||
RUNNER_SHELL = "${pkgs.bashNonInteractive}/bin/bash";
|
RUNNER_SHELL = "${pkgs.bashNonInteractive}/bin/bash";
|
||||||
|
PATH = lib.makeBinPath [
|
||||||
|
pkgs.bashNonInteractive
|
||||||
|
pkgs.coreutils
|
||||||
|
pkgs.git
|
||||||
|
];
|
||||||
};
|
};
|
||||||
systemd.services.gitea-runner-infrastructure.serviceConfig = {
|
systemd.services.gitea-runner-infrastructure.serviceConfig = {
|
||||||
ReadWritePaths = [
|
ReadWritePaths = [
|
||||||
|
|||||||
Reference in New Issue
Block a user