mirror of
https://github.com/Freescale/meta-freescale-3rdparty.git
synced 2025-07-05 05:15:24 +02:00

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>
36 lines
887 B
YAML
36 lines
887 B
YAML
name: Update LICENSE file
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- "**/*.bb"
|
|
- "**/*.inc"
|
|
schedule:
|
|
- cron: "0 0 * * *" # Runs daily at midnight
|
|
workflow_dispatch: # Allows manual run
|
|
|
|
jobs:
|
|
update-license:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Run license generation script
|
|
run: |
|
|
./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
|
|
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 }}
|