summaryrefslogtreecommitdiffstats
path: root/.github/workflows/update-license-file.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/update-license-file.yml')
-rw-r--r--.github/workflows/update-license-file.yml35
1 files changed, 35 insertions, 0 deletions
diff --git a/.github/workflows/update-license-file.yml b/.github/workflows/update-license-file.yml
new file mode 100644
index 00000000..5b62ec11
--- /dev/null
+++ b/.github/workflows/update-license-file.yml
@@ -0,0 +1,35 @@
1name: Update LICENSE file
2
3on:
4 push:
5 paths:
6 - "**/*.bb"
7 - "**/*.inc"
8 schedule:
9 - cron: "0 0 * * *" # Runs daily at midnight
10 workflow_dispatch: # Allows manual run
11
12jobs:
13 update-license:
14 runs-on: ubuntu-latest
15
16 steps:
17 - name: Checkout repository
18 uses: actions/checkout@v3
19
20 - name: Run license generation script
21 run: |
22 ./scripts/generate-license-file
23
24 - name: Commit and push LICENSE file
25 run: |
26 git config --local user.name "github-actions[bot]"
27 git config --local user.email "github-actions[bot]@users.noreply.github.com"
28 git add LICENSE
29 if ! git diff-index --quiet HEAD; then
30 git commit -m "Auto-update LICENSE file with current recipe licenses"
31 git push
32 fi
33
34 env:
35 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}