infrastructure/.forgejo/workflows/plex_update.yml

39 lines
944 B
YAML

name: Plex Update
on:
push:
branches:
- main
- ci
schedule:
- cron: '0 0 * * *'
jobs:
update:
runs-on: docker
container:
image: ghcr.io/catthehacker/ubuntu:js-20.04
steps:
- uses: actions/checkout@v3
- uses: https://github.com/cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
- env:
VAULT_ADDR: ${{ secrets.VAULT_ADDR }}
VAULT_TOKEN: ${{ secrets.VAULT_TOKEN }}
NIXPKGS_ALLOW_UNFREE: 1
run: |
git config user.name "Forgejo Actions Bot"
git config user.email "<>"
# Run Update script
./nixos/pkgs/plex-pass/update.sh
git add ./nixos/pkgs/plex-pass/
# Push if changed
if git status ./nixos/pkgs/plex-pass/ | grep -q "to be committed"; then
git commit -m "Update Plex"
git push origin main
fi