mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Auto-update LICENSE file every year automatically (#1055)
This commit is contained in:
parent
fea1b7b0a3
commit
bce7151d0c
1 changed files with 25 additions and 0 deletions
25
.github/workflows/autoupdate-license.yaml
vendored
Normal file
25
.github/workflows/autoupdate-license.yaml
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
name: Update License Year
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 1 1 *'
|
||||
|
||||
jobs:
|
||||
update-year:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Update year in license file
|
||||
run: |
|
||||
year=$(date +%Y)
|
||||
sed -i "s/2017-[0-9]*/2017-$year/g" LICENSE
|
||||
|
||||
- name: Set git config
|
||||
run: |
|
||||
git config user.name "Automated"
|
||||
git config user.email "actions@users.noreply.github.com"
|
||||
git add LICENSE
|
||||
git commit -m "Update license years" || exit 1
|
||||
git push
|
||||
Loading…
Add table
Add a link
Reference in a new issue