Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #11194: Automate bumping license year
- Loading branch information
1 parent
bbbdaa8
commit 574b7e7
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -916,6 +916,7 @@ nonrequiredjavadoc | |
nonvalidating | ||
noparentfile | ||
NOPMD | ||
noreply | ||
noscript | ||
NOSONAR | ||
nospace | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
############################################################################# | ||
# Github Action to bump license year | ||
# | ||
# Workflow starts every new year. | ||
# | ||
############################################################################# | ||
name: "Bump license year" | ||
on: | ||
schedule: | ||
- cron: "0 0 1 1 *" | ||
# So we can manually trigger if required | ||
workflow_dispatch: | ||
jobs: | ||
bump: | ||
name: Bump license year | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the latest code | ||
uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set Current Year | ||
id: CURRENT_YEAR | ||
run: | | ||
echo "::set-output name=year::$(date +'%Y')" | ||
- name: Modify File | ||
run: | | ||
./.ci/bump-license-year.sh $(expr ${{ env.YEAR }} - 1) ${{ env.YEAR }} . | ||
env: | ||
YEAR: ${{ steps.CURRENT_YEAR.outputs.year }} | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v3 | ||
env: | ||
YEAR: ${{ steps.CURRENT_YEAR.outputs.year }} | ||
with: | ||
commit-message: "minor: Bump year to ${{ env.YEAR }}" | ||
committer: github-actions[bot] <github-actions[bot]@users.noreply.github.com> | ||
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com> | ||
branch: bump-year | ||
delete-branch: true | ||
body: "minor: Bump year to ${{ env.YEAR }}" | ||
title: "minor: Bump year to ${{ env.YEAR }}" |