infrastructure/.forgejo/workflows/plex_update.yml
Vivian 788b6c9437
Some checks failed
Plex Update / update (push) Failing after 4s
deps 3
2023-09-09 10:38:35 +02:00

39 lines
1.1 KiB
YAML

name: Plex Update
on:
push:
branches:
- main
- ci
schedule:
- cron: '0 0 * * *'
jobs:
update:
runs-on: docker
steps:
- uses: actions/checkout@v3
- env:
VAULT_ADDR: ${{ secrets.VAULT_ADDR }}
VAULT_TOKEN: ${{ secrets.VAULT_TOKEN }}
run: |
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt-get update && sudo apt-get install vault -y
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