-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (36 loc) · 1.58 KB
/
update-license-year.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Update copyright year(s) in license file
on:
schedule:
- cron: "5 0 1 1 *" # 20xx-01-01 00:05
workflow_dispatch: # Allow manual execution as well, in case the update fails.
jobs:
update-license-year:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Find all LICENSE files
id: find-all-license-files
shell: bash
run: |
delimiter="ghadelimiter_$(openssl rand -hex 32)"
readonly delimiter
{
echo "files<<${delimiter}"
git ls-files ':(glob)**/LICENSE'
echo "${delimiter}"
} >> "${GITHUB_OUTPUT}"
# see https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
# see https://gotohayato.com/content/558/
- uses: FantasticFiasco/action-update-license-year@v2
with:
# Use personal access token instead of GITHUB_TOKEN to execute CI for pull requests.
# see https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token
token: ${{ secrets.TRIGGER_TEST_GITHUB_TOKEN }}
path: |
${{ steps.find-all-license-files.outputs.files }}
commitTitle: |
docs(license): update copyright year(s)
prTitle: |
docs(license): update copyright year(s)
prBody: |
This PR has been generated by [FantasticFiasco/action-update-license-year v2](https://github.com/marketplace/actions/update-license-copyright-year-s?version=v2).