diff --git a/.github/workflows/update-license-file.yml b/.github/workflows/update-license-file.yml index d9967dba..5b62ec11 100644 --- a/.github/workflows/update-license-file.yml +++ b/.github/workflows/update-license-file.yml @@ -19,15 +19,17 @@ jobs: - name: Run license generation script run: | - chmod +x ./generate-license-file.sh - ./generate-license-file.sh + ./scripts/generate-license-file - name: Commit and push LICENSE file run: | git config --local user.name "github-actions[bot]" git config --local user.email "github-actions[bot]@users.noreply.github.com" git add LICENSE - git commit -m "Auto-update LICENSE file with current recipe licenses" - git push + if ! git diff-index --quiet HEAD; then + git commit -m "Auto-update LICENSE file with current recipe licenses" + git push + fi + env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/generate-license-file.sh b/scripts/generate-license-file old mode 100644 new mode 100755 similarity index 100% rename from generate-license-file.sh rename to scripts/generate-license-file