infrastructure/.forgejo/workflows/plex_update.yml

40 lines
1,004 B
YAML
Raw Normal View History

name: Plex Update
2023-05-26 22:35:14 +02:00
on:
2023-05-27 13:50:41 +02:00
push:
2023-05-28 10:33:52 +02:00
branches:
- main
- ci
2023-05-26 22:35:14 +02:00
schedule:
- cron: '0 0 * * *'
jobs:
2023-05-26 22:35:14 +02:00
update:
runs-on: docker
container:
image: ghcr.io/catthehacker/ubuntu:js-20.04
steps:
- uses: actions/checkout@v3
2023-09-10 09:22:55 +02:00
- name: Check Nix flake inputs
uses: DeterminateSystems/flake-checker-action@v5
- 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 }}
run: |
git config user.name "Forgejo Actions Bot"
git config user.email "<>"
2023-05-26 22:26:33 +02:00
# Run Update script
./nixos/pkgs/plex-pass/update.sh
2023-05-26 22:26:33 +02:00
git add ./nixos/pkgs/plex-pass/
2023-05-26 22:30:44 +02:00
# Push if changed
2023-05-26 22:32:12 +02:00
if git status ./nixos/pkgs/plex-pass/ | grep -q "to be committed"; then
2023-05-26 22:26:33 +02:00
git commit -m "Update Plex"
git push origin main
fi