Skip to content

Commit

Permalink
update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
meisnate12 committed Apr 22, 2024
1 parent 27a073d commit 87f2621
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 57 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/copyright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Update Copyright Year

on:
schedule:
- cron: '0 3 1 1 *'
workflow_dispatch:

jobs:
update:
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
with:
ref: nightly

- 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 "Copyright updated to ${{ steps.date.outputs.year }}" -a
git push origin nightly
- name: Discord Failure Notification
uses: Kometa-Team/discord-notifications@master
if: failure()
with:
webhook_id_token: ${{ secrets.BUILD_WEBHOOK }}
message: <@&1079153184007790652>
title: "${{ secrets.REPO_NAME }}: **Copyright Update Failed**"
url: https://github.com/Kometa-Team/${{ secrets.REPO_NAME }}/actions/runs/${{ github.run_id }}
color: 14879811
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
30 changes: 14 additions & 16 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:

docker-develop:
docker:
runs-on: ubuntu-latest
steps:

Expand Down Expand Up @@ -42,7 +42,7 @@ jobs:
"BRANCH_NAME=develop"
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/kometa:develop
tags: kometateam/kometa:develop
cache-from: type=gha
cache-to: type=gha,mode=max

Expand All @@ -56,31 +56,30 @@ jobs:
"BRANCH_NAME=develop"
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/kometa:lxml-develop
tags: kometateam/kometa:lxml-develop
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Send Discord Commit Notification
uses: Kometa-Team/discord-notifications@master
with:
webhook_id: ${{ secrets.DEVELOP_WEBHOOK_ID }}
webhook_token: ${{ secrets.DEVELOP_WEBHOOK_TOKEN }}
title: Develop Commits
webhook_id_token: ${{ secrets.DEVELOP_WEBHOOK }}
title: Commits
message: "<@&954835263731949623> - An update to Kometa has been published and is available to users of the **develop** branch.\n\nWe **strongly** recommend users who previously switched to the `nightly` branch to resolve any previous issues to now switch back to the `develop` branch now."
commits: "true"
username: Kobota
avatar_url: https://raw.githubusercontent.com/Kometa-Team/Kometa/develop/.github/logo.png
author: Kometa Develop Release
author: ${{ secrets.REPO_NAME }} Develop Release
author_icon_url: https://raw.githubusercontent.com/Kometa-Team/Kometa/develop/.github/release.png

- name: Discord Success Notification
uses: Kometa-Team/discord-notifications@master
if: success()
with:
webhook_id: ${{ secrets.BUILD_WEBHOOK_ID }}
webhook_token: ${{ secrets.BUILD_WEBHOOK_TOKEN }}
title: "develop build: **Success**"
url: https://github.com/Kometa-Team/Kometa/actions/runs/${{ github.run_id }}
webhook_id_token: ${{ secrets.BUILD_WEBHOOK }}
title: "${{ secrets.REPO_NAME }} develop: **Build Successful**"
url: https://github.com/Kometa-Team/${{ secrets.REPO_NAME }}/actions/runs/${{ github.run_id }}
color: 844716
username: Kobota
avatar_url: https://raw.githubusercontent.com/Kometa-Team/Kometa/develop/.github/logo.png
author: Docker
Expand All @@ -90,12 +89,11 @@ jobs:
uses: Kometa-Team/discord-notifications@master
if: failure()
with:
webhook_id: ${{ secrets.BUILD_WEBHOOK_ID }}
webhook_token: ${{ secrets.BUILD_WEBHOOK_TOKEN }}
webhook_id_token: ${{ secrets.BUILD_WEBHOOK }}
message: <@&1079153184007790652>
title: "develop build: **Failure**"
color: 0xe30c43
url: https://github.com/Kometa-Team/Kometa/actions/runs/${{ github.run_id }}
title: "${{ secrets.REPO_NAME }} develop: **Build Failed**"
url: https://github.com/Kometa-Team/${{ secrets.REPO_NAME }}/actions/runs/${{ github.run_id }}
color: 14879811
username: Kobota
avatar_url: https://raw.githubusercontent.com/Kometa-Team/Kometa/develop/.github/logo.png
author: Docker
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:

docker-latest:
docker:
runs-on: ubuntu-latest
steps:

Expand Down Expand Up @@ -36,7 +36,7 @@ jobs:
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/kometa:latest
tags: kometateam/kometa:latest
cache-from: type=gha
cache-to: type=gha,mode=max

Expand All @@ -48,18 +48,18 @@ jobs:
file: ./Dockerfile.lxml
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/kometa:lxml-latest
tags: kometateam/kometa:lxml-latest
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Discord Success Notification
uses: Kometa-Team/discord-notifications@master
if: success()
with:
webhook_id: ${{ secrets.BUILD_WEBHOOK_ID }}
webhook_token: ${{ secrets.BUILD_WEBHOOK_TOKEN }}
title: "latest build: **Success**"
url: https://github.com/Kometa-Team/Kometa/actions/runs/${{ github.run_id }}
webhook_id_token: ${{ secrets.BUILD_WEBHOOK }}
title: "${{ secrets.REPO_NAME }} latest: **Build Successful**"
url: https://github.com/Kometa-Team/${{ secrets.REPO_NAME }}/actions/runs/${{ github.run_id }}
color: 844716
username: Kobota
avatar_url: https://raw.githubusercontent.com/Kometa-Team/Kometa/master/.github/logo.png
author: Docker
Expand All @@ -69,12 +69,11 @@ jobs:
uses: Kometa-Team/discord-notifications@master
if: failure()
with:
webhook_id: ${{ secrets.BUILD_WEBHOOK_ID }}
webhook_token: ${{ secrets.BUILD_WEBHOOK_TOKEN }}
webhook_id_token: ${{ secrets.BUILD_WEBHOOK }}
message: <@&1079153184007790652>
title: "latest build: **Failure**"
color: 0xe30c43
url: https://github.com/Kometa-Team/Kometa/actions/runs/${{ github.run_id }}
title: "${{ secrets.REPO_NAME }} latest: **Build Failed**"
url: https://github.com/Kometa-Team/${{ secrets.REPO_NAME }}/actions/runs/${{ github.run_id }}
color: 14879811
username: Kobota
avatar_url: https://raw.githubusercontent.com/Kometa-Team/Kometa/master/.github/logo.png
author: Docker
Expand Down
30 changes: 14 additions & 16 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:

docker-nightly:
docker:
runs-on: ubuntu-latest
steps:

Expand Down Expand Up @@ -42,7 +42,7 @@ jobs:
"BRANCH_NAME=nightly"
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/kometa:nightly
tags: kometateam/kometa:nightly
cache-from: type=gha
cache-to: type=gha,mode=max

Expand All @@ -56,31 +56,30 @@ jobs:
"BRANCH_NAME=nightly"
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/kometa:lxml-nightly
tags: kometateam/kometa:lxml-nightly
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Send Discord Commit Notification
uses: Kometa-Team/discord-notifications@master
with:
webhook_id: ${{ secrets.NIGHTLY_WEBHOOK_ID }}
webhook_token: ${{ secrets.NIGHTLY_WEBHOOK_TOKEN }}
title: Nightly Commits
webhook_id_token: ${{ secrets.DEVELOP_WEBHOOK }}
title: Commits
message: "<@&967002147520675840> - An update to Kometa has now been published and is available to users of the **nightly** branch."
commits: "true"
username: Kobota
avatar_url: https://raw.githubusercontent.com/Kometa-Team/Kometa/nightly/.github/logo.png
author: Kometa Nightly Release
author: ${{ secrets.REPO_NAME }} Nightly Release
author_icon_url: https://raw.githubusercontent.com/Kometa-Team/Kometa/nightly/.github/release.png

- name: Discord Success Notification
uses: Kometa-Team/discord-notifications@master
if: success()
with:
webhook_id: ${{ secrets.BUILD_WEBHOOK_ID }}
webhook_token: ${{ secrets.BUILD_WEBHOOK_TOKEN }}
title: "nightly build: **Success**"
url: https://github.com/Kometa-Team/Kometa/actions/runs/${{ github.run_id }}
webhook_id_token: ${{ secrets.BUILD_WEBHOOK }}
title: "${{ secrets.REPO_NAME }} nightly: **Build Successful**"
url: https://github.com/Kometa-Team/${{ secrets.REPO_NAME }}/actions/runs/${{ github.run_id }}
color: 844716
username: Kobota
avatar_url: https://raw.githubusercontent.com/Kometa-Team/Kometa/nightly/.github/logo.png
author: Docker
Expand All @@ -90,12 +89,11 @@ jobs:
uses: Kometa-Team/discord-notifications@master
if: failure()
with:
webhook_id: ${{ secrets.BUILD_WEBHOOK_ID }}
webhook_token: ${{ secrets.BUILD_WEBHOOK_TOKEN }}
webhook_id_token: ${{ secrets.BUILD_WEBHOOK }}
message: <@&1079153184007790652>
title: "nightly build: **Failure**"
color: 0xe30c43
url: https://github.com/Kometa-Team/Kometa/actions/runs/${{ github.run_id }}
title: "${{ secrets.REPO_NAME }} nightly: **Build Failed**"
url: https://github.com/Kometa-Team/${{ secrets.REPO_NAME }}/actions/runs/${{ github.run_id }}
color: 14879811
username: Kobota
avatar_url: https://raw.githubusercontent.com/Kometa-Team/Kometa/nightly/.github/logo.png
author: Docker
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:

docker-version:
docker:
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/kometa:${{ steps.get_version.outputs.VERSION }}
tags: kometateam/kometa:${{ steps.get_version.outputs.VERSION }}
cache-from: type=gha
cache-to: type=gha,mode=max

Expand All @@ -56,18 +56,18 @@ jobs:
file: ./Dockerfile.lxml
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/kometa:lxml-${{ steps.get_version.outputs.VERSION }}
tags: kometateam/kometa:lxml-${{ steps.get_version.outputs.VERSION }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Discord Success Notification
uses: Kometa-Team/discord-notifications@master
if: success()
with:
webhook_id: ${{ secrets.BUILD_WEBHOOK_ID }}
webhook_token: ${{ secrets.BUILD_WEBHOOK_TOKEN }}
title: "${{ steps.get_version.outputs.VERSION }} build: **Success**"
url: https://github.com/Kometa-Team/Kometa/actions/runs/${{ github.run_id }}
webhook_id_token: ${{ secrets.BUILD_WEBHOOK }}
title: "${{ secrets.REPO_NAME }} ${{ steps.get_version.outputs.VERSION }}: **Build Successful**"
url: https://github.com/Kometa-Team/${{ secrets.REPO_NAME }}/actions/runs/${{ github.run_id }}
color: 844716
username: Kobota
avatar_url: https://raw.githubusercontent.com/Kometa-Team/Kometa/master/.github/logo.png
author: Docker
Expand All @@ -77,12 +77,11 @@ jobs:
uses: Kometa-Team/discord-notifications@master
if: failure()
with:
webhook_id: ${{ secrets.BUILD_WEBHOOK_ID }}
webhook_token: ${{ secrets.BUILD_WEBHOOK_TOKEN }}
webhook_id_token: ${{ secrets.BUILD_WEBHOOK }}
message: <@&1079153184007790652>
title: "${{ steps.get_version.outputs.VERSION }} build: **Failure**"
color: 0xe30c43
url: https://github.com/Kometa-Team/Kometa/actions/runs/${{ github.run_id }}
title: "${{ secrets.REPO_NAME }} ${{ steps.get_version.outputs.VERSION }}: **Build Failed**"
url: https://github.com/Kometa-Team/${{ secrets.REPO_NAME }}/actions/runs/${{ github.run_id }}
color: 14879811
username: Kobota
avatar_url: https://raw.githubusercontent.com/Kometa-Team/Kometa/master/.github/logo.png
author: Docker
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.21.1!
1.21.1

0 comments on commit 87f2621

Please sign in to comment.