Skip to content

Commit 3207ce4

Browse files
committed
[skip ci] fix
1 parent d4eeef0 commit 3207ce4

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.github/workflows/copyright-update.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818

1919
name: Copyright Update
2020
on:
21+
workflow_dispatch:
2122
schedule:
22-
- cron: '0 0 31 12 *' # Repeats December 31st every year
23+
- cron: '0 0 1 1 *' # Repeats January 1st every year
2324

2425
permissions:
2526
contents: read
@@ -30,9 +31,9 @@ jobs:
3031
contents: write # for peter-evans/create-pull-request to create branch
3132
pull-requests: write # for peter-evans/create-pull-request to create a PR
3233
name: copyright update
33-
if: github.repository == 'jhipster/generator-jhipster'
34+
if: github.repository == 'jhipster/generator-jhipster' || github.event_name == 'workflow_dispatch'
3435
runs-on: ubuntu-latest
35-
timeout-minutes: 40
36+
timeout-minutes: 6
3637
steps:
3738
# Checkout
3839
- uses: actions/checkout@v5
@@ -42,9 +43,8 @@ jobs:
4243
# Update the copyright headers
4344
- name: Find and Replace
4445
run: |
45-
CURRENT_YEAR=$(date +'%Y')
46-
NEW_YEAR=$(($CURRENT_YEAR + 1))
47-
grep -rlZE "Copyright ([0-9]+)-$CURRENT_YEAR" . | xargs -0 sed -i -E "s/Copyright ([0-9]+)-$CURRENT_YEAR/Copyright \1-$NEW_YEAR/g"
46+
grep -rlZE "Copyright 20[0-9]{2}" . | xargs -0 sed -i -E "s/Copyright ([0-9]{4})-([0-9]{4})/Copyright \1-$(date +'%Y')/g"
47+
git diff
4848
# Create PR
4949
- name: Create Pull Request
5050
uses: peter-evans/create-pull-request@v7

.github/workflows/docker-image-publish-github-registry.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ env:
3333
jobs:
3434
build:
3535
runs-on: ubuntu-latest
36+
if: github.repository == 'jhipster/generator-jhipster'
3637
permissions:
3738
contents: read
3839
packages: write

0 commit comments

Comments
 (0)