forked from checkstyle/contribution
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (33 loc) · 1.1 KB
/
bump_license_year.yml
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
#############################################################################
# GitHub Action to bump license year
#
# Workflow starts every new year.
#
#############################################################################
name: "Bump license year"
on:
schedule:
- cron: "0 2 1 1 *"
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
bump:
name: Bump license year
runs-on: ubuntu-latest
steps:
- name: Checkout the latest code
uses: actions/checkout@v3
- name: Set Current Year
run: |
echo "YEAR=$(date +'%Y')" >> "$GITHUB_ENV"
- name: Modify Files
run: |
./.ci/bump-license-year.sh $(("${{ env.YEAR }}" - 1)) ${{ env.YEAR }} .
- name: Push commit
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git commit -am "minor: Bump year to ${{ env.YEAR }}"
git push