fix(workflows): Correctly use git
Some checks failed
npins update / npins_update (push) Failing after 4m42s

This commit is contained in:
Tom Hubrecht 2023-12-12 14:36:31 +01:00
parent 85c60fb593
commit 86f53a54e6

View file

@ -2,7 +2,7 @@ name: npins update
on:
schedule:
# Run at 11 o'clock every day
- cron: "24 14 * * *"
- cron: "37 14 * * *"
jobs:
npins_update:
@ -12,8 +12,6 @@ jobs:
run: apt-get update && apt-get install sudo
- uses: actions/checkout@v3
with:
path: src
- uses: https://github.com/cachix/install-nix-action@v22
with:
@ -25,13 +23,9 @@ jobs:
- name: Update dependencies and open PR if necessary
run: |
cd src
npins update
git diff-index --quiet HEAD
if [ $? -eq 1 ]; then
if [ ! -z "$(git diff --name-only HEAD)" ]; then
echo "[+] Changes detected, pushing updates."
git add npins