Skip to content

Commit

Permalink
add copyright update
Browse files Browse the repository at this point in the history
  • Loading branch information
meisnate12 committed Apr 17, 2024
1 parent 6e7a5ea commit dc832c9
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 2 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/copyright.yml
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 "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git commit -m "Update at ${{ steps.date.outputs.date }} UTC" -a
git push origin master
- name: Discord Failure Notification
uses: meisnate12/discord-notifications@master
if: failure()
with:
webhook_id: ${{ secrets.BUILD_WEBHOOK_ID }}
webhook_token: ${{ secrets.BUILD_WEBHOOK_TOKEN }}
message: <@&1079153184007790652>
title: "Anime IDs Copyright: **Failure**"
color: 16106776
url: https://github.com/Kometa-Team/Anime-IDs/actions/runs/${{ github.run_id }}
username: Metabot
avatar_url: https://raw.githubusercontent.com/Kometa-Team/Kometa/nightly/.github/logo.png
author: IMDb Awards
author_icon_url: https://raw.githubusercontent.com/Kometa-Team/Kometa/nightly/.github/git.png
17 changes: 16 additions & 1 deletion .github/workflows/update-anime-list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,19 @@ jobs:
git config --local user.name "GitHub Action"
git add -A
git commit -m "Update at ${{ steps.date.outputs.date }} UTC" -a
git push origin master
git push origin master
- name: Discord Failure Notification
uses: meisnate12/discord-notifications@master
if: failure()
with:
webhook_id: ${{ secrets.BUILD_WEBHOOK_ID }}
webhook_token: ${{ secrets.BUILD_WEBHOOK_TOKEN }}
message: <@&1079153184007790652>
title: "Anime IDs: **Failure**"
color: 16106776
url: https://github.com/Kometa-Team/Anime-IDs/actions/runs/${{ github.run_id }}
username: Metabot
avatar_url: https://raw.githubusercontent.com/Kometa-Team/Kometa/nightly/.github/logo.png
author: IMDb Awards
author_icon_url: https://raw.githubusercontent.com/Kometa-Team/Kometa/nightly/.github/git.png
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 meisnate12
Copyright (c) 2023 meisnate12

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down

0 comments on commit dc832c9

Please sign in to comment.