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 <abner.cordeiro@ossystems.com.br>
This commit is contained in:
Abner C. Paula 2024-12-03 15:50:12 -03:00
parent 2291cfad43
commit 3ee87aca07
2 changed files with 6 additions and 4 deletions

View File

@ -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 }}

View File