-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7ad74aa
commit 8ab7ee6
Showing
5 changed files
with
104 additions
and
26 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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Update-Copyright-Year | ||
|
||
on: | ||
schedule: | ||
- cron: '0 3 1 1 *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
Update-Copyright-Year: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Get current year | ||
id: date | ||
run: echo "year=$(date +'%Y')" >> $GITHUB_OUTPUT | ||
|
||
- name: Check Out Repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Update Copyright | ||
run: sed -i -E 's/(Copyright \(c\) ).+( meisnate12)/\1${{ steps.date.outputs.year }}\2/' LICENSE | ||
|
||
- name: Check Diff | ||
id: verify_diff | ||
run: | | ||
git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT | ||
- name: Commit & Push Changes | ||
if: steps.verify_diff.outputs.changed == 'true' | ||
run: | | ||
git config --local user.email "action@github.com" | ||
git config --local user.name "GitHub Action" | ||
git add -A | ||
git commit -m "Copyright updated to ${{ steps.date.outputs.year }}" -a | ||
git push origin master | ||
- name: Discord Failure Notification | ||
uses: Kometa-Team/discord-notifications@master | ||
if: failure() | ||
with: | ||
webhook_id: ${{ secrets.BUILD_WEBHOOK_ID }} | ||
webhook_token: ${{ secrets.BUILD_WEBHOOK_TOKEN }} | ||
message: <@&1079153184007790652> | ||
title: "${{ secrets.REPO_NAME }}-Copyright: **Failure**" | ||
color: 14879811 | ||
url: https://github.com/Kometa-Team/${{ secrets.REPO_NAME }}/actions/runs/${{ github.run_id }} | ||
username: Kobota | ||
avatar_url: https://raw.githubusercontent.com/Kometa-Team/Kometa/nightly/.github/logo.png | ||
author: GitHub | ||
author_icon_url: https://raw.githubusercontent.com/Kometa-Team/Kometa/nightly/.github/git.png |
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
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
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 |
---|---|---|
@@ -1 +1 @@ | ||
1.4.7 | ||
1.4.8 |
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