From 9e505085d7f29f77f75715cf31db02f4c6a87c8f Mon Sep 17 00:00:00 2001 From: Dixon Sean Low Yan Feng Date: Sun, 15 Sep 2024 12:27:55 +0800 Subject: [PATCH] ci(update): fix run failure when there are no changes from an update [skip ci] --- .github/workflows/update.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update.yaml b/.github/workflows/update.yaml index 43af3d5..06a475c 100644 --- a/.github/workflows/update.yaml +++ b/.github/workflows/update.yaml @@ -33,12 +33,20 @@ jobs: - name: Update flake inputs run: | nix flake update - git commit -am "chore(flake): update inputs" + if [ -z "$(git status --porcelain=v1 2>/dev/null)" ]; then + echo "No changes from update" + else + git commit -am "chore(flake): update inputs" + fi - name: Update npins run: | nix develop .#ci --impure --command npins -d "planet/pkgs/npins" update nix develop .#ci --impure --command npins -d "planet/pkgs/vim-plugins/npins" update - git commit -am "chore(planet/pkgs): update npins" + if [ -z "$(git status --porcelain=v1 2>/dev/null)" ]; then + echo "No changes from update" + else + git commit -am "chore(planet/pkgs): update npins" + fi - if: ${{ !inputs.dry-run }} uses: peter-evans/create-pull-request@v5 with: