Update copyright year #6
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
name: Update copyright year | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 3 1 1 *" # 03:00 AM on January 1 | |
jobs: | |
update-years: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Change global git configurations | |
run: | | |
git config --global push.default current | |
git config --global user.name "github-actions" | |
git config --global user.email "[email protected]" | |
- name: Update CVEScannerV2 year | |
run: | | |
export year=$(date +"%Y") | |
perl -i -pe 's/(?<=\([cC]\)\s)(?<from>\d+)(-\d+)?/$+{from}-$ENV{"year"}/' README.md cvescannerv2.nse extra/database.py | |
git add -u | |
git commit -m "Copyright year update" | |
git push |