From 3ee87aca07aca094366e0aea891fa2d5e9f84a64 Mon Sep 17 00:00:00 2001 From: "Abner C. Paula" Date: Tue, 3 Dec 2024 15:50:12 -0300 Subject: [PATCH] generate-license-file: Move script to scripts folder This commit also adds if condition to check license file change. It is to avoid empty commits. Signed-off-by: Abner C. Paula --- .github/workflows/update-license-file.yml | 10 ++++++---- .../generate-license-file | 0 2 files changed, 6 insertions(+), 4 deletions(-) rename generate-license-file.sh => scripts/generate-license-file (100%) mode change 100644 => 100755 diff --git a/.github/workflows/update-license-file.yml b/.github/workflows/update-license-file.yml index d9967db..5b62ec1 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