adding gitea runner
This commit is contained in:
36
.github/workflows/apply-kubernetes.yml
vendored
36
.github/workflows/apply-kubernetes.yml
vendored
@@ -1,36 +0,0 @@
|
||||
name: Apply Kuberentes Configs
|
||||
on: [push, workflow_dispatch]
|
||||
jobs:
|
||||
update-repo:
|
||||
runs-on: [home-server]
|
||||
steps:
|
||||
- name: checkout repo
|
||||
working-directory: /home/github/infrastructure
|
||||
run: |
|
||||
if [ -d "infrastructure" ]; then
|
||||
cd infrastructure
|
||||
echo "Infrastructure folder exists. Resetting to the most recent commit."
|
||||
git reset --hard HEAD
|
||||
git pull https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} $(git rev-parse --abbrev-ref HEAD)
|
||||
else
|
||||
git clone https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
|
||||
fi
|
||||
update-infrastructure:
|
||||
runs-on: [home-server]
|
||||
needs: update-repo
|
||||
steps:
|
||||
- name: update home server containers
|
||||
env:
|
||||
KUBECONFIG: /home/github/.kube/config
|
||||
MY_GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
|
||||
HOMEASSISTANT_TOKEN: ${{ secrets.HOMEASSISTANT_TOKEN }}
|
||||
GRAFANA_PASSWORD: ${{ secrets.GRAFANA_PASSWORD }}
|
||||
CLOUDFLARE_CONFIG: ${{ secrets.CLOUDFLARE_CONFIG }}
|
||||
COPILOT_TOKEN: ${{ secrets.COPILOT_TOKEN }}
|
||||
working-directory: /home/github/infrastructure/infrastructure
|
||||
run: |
|
||||
# kubectl apply -f kubernetes/ingress
|
||||
kubectl apply -f kubernetes/proxy-ingress
|
||||
|
||||
kubectl annotate ingressclass nginx \
|
||||
ingressclass.kubernetes.io/is-default-class="true" --overwrite
|
||||
46
.github/workflows/backup-zfs.yml
vendored
46
.github/workflows/backup-zfs.yml
vendored
@@ -1,46 +0,0 @@
|
||||
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
|
||||
23
.github/workflows/beets-sync.yml
vendored
23
.github/workflows/beets-sync.yml
vendored
@@ -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/github/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"
|
||||
18
.github/workflows/libation-sync.yml
vendored
18
.github/workflows/libation-sync.yml
vendored
@@ -1,18 +0,0 @@
|
||||
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/github/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)"
|
||||
50
.github/workflows/update-home-server.yml
vendored
50
.github/workflows/update-home-server.yml
vendored
@@ -1,50 +0,0 @@
|
||||
name: Update home server containers
|
||||
on: [push, workflow_dispatch]
|
||||
jobs:
|
||||
update-repo:
|
||||
runs-on: [home-server]
|
||||
steps:
|
||||
- name: checkout repo
|
||||
working-directory: /home/github/infrastructure
|
||||
run: |
|
||||
if [ -d "infrastructure" ]; then
|
||||
cd infrastructure
|
||||
echo "Infrastructure folder exists. Resetting to the most recent commit."
|
||||
git reset --hard HEAD
|
||||
git pull https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} $(git rev-parse --abbrev-ref HEAD)
|
||||
else
|
||||
git clone https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
|
||||
fi
|
||||
update-infrastructure:
|
||||
runs-on: [home-server]
|
||||
needs: update-repo
|
||||
steps:
|
||||
- name: update home server containers
|
||||
env:
|
||||
MY_GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
|
||||
HOMEASSISTANT_TOKEN: ${{ secrets.HOMEASSISTANT_TOKEN }}
|
||||
GRAFANA_PASSWORD: ${{ secrets.GRAFANA_PASSWORD }}
|
||||
CLOUDFLARE_CONFIG: ${{ secrets.CLOUDFLARE_CONFIG }}
|
||||
COPILOT_TOKEN: ${{ secrets.COPILOT_TOKEN }}
|
||||
working-directory: /home/github/infrastructure/infrastructure
|
||||
run: |
|
||||
# echo "$CLOUDFLARE_CONFIG" > /data/cloudflare/cloudflare.ini
|
||||
cd home-server
|
||||
docker pull -q nextcloud:production
|
||||
docker compose pull -q
|
||||
docker compose build
|
||||
docker compose up -d
|
||||
# docker restart reverse-proxy
|
||||
# docker exec reverse-proxy nginx -t
|
||||
# docker exec reverse-proxy nginx -s reload
|
||||
|
||||
# update-pihole:
|
||||
# runs-on: [home-server]
|
||||
# needs: update-repo
|
||||
# steps:
|
||||
# - working-directory: /home/github/infrastructure/infrastructure
|
||||
# run: |
|
||||
# cd dns
|
||||
# docker compose pull
|
||||
# docker compose up -d
|
||||
|
||||
37
.github/workflows/update-playlist.yml
vendored
37
.github/workflows/update-playlist.yml
vendored
@@ -1,37 +0,0 @@
|
||||
name: Manage Jellyfin Playlists
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 * * * *'
|
||||
jobs:
|
||||
run-python:
|
||||
runs-on: [self-hosted, home-server]
|
||||
steps:
|
||||
- name: checkout repo
|
||||
working-directory: /home/github/infrastructure
|
||||
run: |
|
||||
if [ -d "infrastructure" ]; then
|
||||
cd infrastructure
|
||||
echo "Infrastructure folder exists. Resetting to the most recent commit."
|
||||
git reset --hard HEAD
|
||||
git pull https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} $(git rev-parse --abbrev-ref HEAD)
|
||||
else
|
||||
git clone https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
|
||||
fi
|
||||
- name: Run Python script
|
||||
env:
|
||||
JELLYFIN_USER: ${{ secrets.JELLYFIN_USER }}
|
||||
JELLYFIN_PASSWORD: ${{ secrets.JELLYFIN_PASSWORD }}
|
||||
working-directory: /home/github/infrastructure/infrastructure
|
||||
run: |
|
||||
docker build -t jellyfin_management -f jellyfin/Dockerfile .
|
||||
docker run --rm \
|
||||
-e JELLYFIN_USER=$JELLYFIN_USER \
|
||||
-e JELLYFIN_PASSWORD=$JELLYFIN_PASSWORD \
|
||||
jellyfin_management \
|
||||
-m jellyfin.update_all_songs_playlist
|
||||
docker run --rm \
|
||||
-e JELLYFIN_USER=$JELLYFIN_USER \
|
||||
-e JELLYFIN_PASSWORD=$JELLYFIN_PASSWORD \
|
||||
jellyfin_management \
|
||||
-m jellyfin.update_unindexed
|
||||
Reference in New Issue
Block a user