ci: update workflows

This commit is contained in:
2025-02-21 00:55:21 -07:00
parent c77cb97946
commit 1607fb00ab
4 changed files with 188 additions and 29 deletions

View File

@@ -70,7 +70,7 @@ env:
{ "name": "Status 𐄂 Accepted", "color": "2e7539", "description": "This pull request has been accepted" },
{ "name": "Status 𐄂 Autoclosed", "color": "3E0915", "description": "Originally stale and was autoclosed for no activity" },
{ "name": "Status 𐄂 Denied", "color": "ba4058", "description": "Pull request has been denied" },
{ "name": "Status 𐄂 Locked", "color": "550F45", "description": "Automatically locked by AdminServ for a prolonged period of inactivity" },
{ "name": "Status 𐄂 Locked", "color": "550F45", "description": "Automatically locked by EuropaServ for a prolonged period of inactivity" },
{ "name": "Status 𐄂 Need Info", "color": "2E3C4C", "description": "Not enough information to resolve" },
{ "name": "Status 𐄂 No Action", "color": "030406", "description": "Closed without any action being taken" },
{ "name": "Status 𐄂 Pending", "color": "984b12", "description": "Pending pull request" },
@@ -210,7 +210,7 @@ jobs:
embed-color: ${{ job.status == 'success' && '5763719' || '15418782' }}
embed-footer-text: "Completed at ${{ env.NOW }} UTC"
embed-timestamp: "${{ env.NOW_LONG }}"
embed-author-name: "${{steps.embed.outputs.EMBED_AUTHOR_NAME}}"
embed-author-name: "${{ github.event.release.author.name }}"
embed-author-url: "${{ github.event.release.author.html_url }}"
embed-author-icon-url: "${{ github.event.release.author.avatar_url }}"

View File

@@ -2,10 +2,12 @@
# @type github workflow
# @author Aetherinox
# @url https://github.com/Aetherinox
# @usage deploys docker container to Dockerhub
# @secrets secrets.ADMINSERV_GPG_KEY_ASC gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
# secrets.ADMINSERV_GPG_PASSPHRASE gpg private key passphrase
# secrets.IMAGE_DOCKERHUB_TOKEN hub.docker.com access token
# @usage deploys docker container to Dockerhub and send message to discord
# upload this workflow to both the `main` branch of the tvapp2 repository
# @secrets secrets.ADMINSERV_GPG_KEY_ASC gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
# secrets.ADMINSERV_GPG_PASSPHRASE gpg private key passphrase
# secrets.IMAGE_GHCR_TOKEN github personal access token (classic) with package:write permission
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES Discord webhook to report releases from github to discord
# #
name: "📦 Deploy Docker Dockerhub"
@@ -36,7 +38,7 @@ on:
IMAGE_NAME:
description: '📦 Image Name'
required: true
default: 'keeweb'
default: 'tvapp2'
type: string
# #
@@ -47,10 +49,10 @@ on:
# #
IMAGE_AUTHOR:
description: '🪪 Image Author'
required: true
default: 'antelle'
type: string
description: '🪪 Image Author'
required: true
default: 'TheBinaryNinja'
type: string
# #
# Image Version
@@ -59,10 +61,10 @@ on:
# #
IMAGE_VERSION:
description: '🏷️ Image Version'
required: true
default: '1.19.0'
type: string
description: '🏷️ Image Version'
required: true
default: '1.19.0'
type: string
# #
# Image Dockerhub username
@@ -73,7 +75,7 @@ on:
IMAGE_DOCKERHUB_USERNAME:
description: '🪪 Dockerhub Username'
required: true
default: 'antelle'
default: 'TheBinaryNinja'
type: string
# #
@@ -111,10 +113,10 @@ on:
# #
env:
IMAGE_NAME: ${{ github.event.inputs.IMAGE_NAME || 'keeweb' }}
IMAGE_AUTHOR: ${{ github.event.inputs.IMAGE_AUTHOR || 'antelle' }}
IMAGE_VERSION: ${{ github.event.inputs.IMAGE_VERSION || '1.19.0' }}
IMAGE_DOCKERHUB_USERNAME: ${{ github.event.inputs.IMAGE_DOCKERHUB_USERNAME || 'antelle' }}
IMAGE_NAME: ${{ github.event.inputs.IMAGE_NAME || 'tvapp2' }}
IMAGE_AUTHOR: ${{ github.event.inputs.IMAGE_AUTHOR || 'TheBinaryNinja' }}
IMAGE_VERSION: ${{ github.event.inputs.IMAGE_VERSION || '1.0.0' }}
IMAGE_DOCKERHUB_USERNAME: ${{ github.event.inputs.IMAGE_DOCKERHUB_USERNAME || 'TheBinaryNinja' }}
BOT_NAME_1: EuropaServ
BOT_NAME_DEPENDABOT: dependabot[bot]
@@ -222,6 +224,18 @@ jobs:
run: |
echo "Starting Dockerhub arm64"
# #
# Release Dockerhub Get Timestamp
# #
- name: '🕛 Get Timestamp'
id: task_release_set_timestamp
run: |
echo "NOW=$(date +'%m-%d-%Y %H:%M:%S')" >> $GITHUB_ENV
echo "NOW_SHORT=$(date +'%m-%d-%Y')" >> $GITHUB_ENV
echo "NOW_LONG=$(date +'%m-%d-%Y %H:%M')" >> $GITHUB_ENV
echo "NOW_DOCKER_LABEL=$(date +'%Y%m%d')" >> $GITHUB_ENV
# #
# Release Dockerhub Checkout Arm64
# #
@@ -325,6 +339,13 @@ jobs:
type=ref,enable=${{ github.event_name == 'pull_request' || github.event_name == 'push' }},priority=600,prefix=,suffix=-arm64,event=tag
flavor: |
latest=false
labels: |
org.opencontainers.image.VERSION=${{ env.IMAGE_VERSION }}
org.opencontainers.image.BUILDDATE=${{ env.NOW_DOCKER_LABEL }}
org.opencontainers.image.licenses=MIT
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.vendor=${{ env.IMAGE_AUTHOR }}
org.opencontainers.image.ref.name=${{ env.GIT_REF }}
# #
# Release Dockerhub Checkpoint Arm64
@@ -359,6 +380,65 @@ jobs:
tags: ${{ steps.task_release_dh_meta.outputs.tags }}
labels: ${{ steps.task_release_dh_meta.outputs.labels }}
# #
# Release Dockerhub Get Weekly Commits
# #
- name: '🕛 Get Weekly Commit List'
id: task_release_set_weekly_commit_list
run: |
echo 'WEEKLY_COMMITS<<EOF' >> $GITHUB_ENV
git log --format="[\`%h\`](${{ github.server_url }}/${{ github.repository }}/commit/%H) %s - %an" --since=7.days >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
# #
# Release Dockerhub Notify Github
# #
- name: '🔔 Send Discord Webhook Message'
id: task_release_notifications_discord_send
uses: tsickert/discord-webhook@v6.0.0
if: success()
with:
username: 'Io'
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES }}
embed-title: "📦 **Deploy Docker Github Workflow Ran**"
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg'
embed-description: |
## 📦 Docker Deploy ${{ job.status == 'success' && '✅' || '❌' }} `${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}`
A new version of the docker container `${{ env.IMAGE_NAME }}` has been released from Github. The image is available at:
- https://github.com/${{ github.repository }}/pkgs/container/${{ env.IMAGE_NAME }}
- Docker Image: `${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}`
- Version: `${{ env.IMAGE_VERSION }}`
- Pull URL: https://ghcr.io/${{ env.IMAGE_AUTHOR }}/${{ env.IMAGE_NAME }}
- Branch: `${{ github.ref_name }}`
- Workflow: `${{ github.workflow }} (#${{github.run_number}})`
- Triggered By: `${{ github.actor }}`
### Tags
-# This docker image will use the following tags:
```
${{ steps.task_release_dh_meta.outputs.tags }}
```
### Labels
-# This docker image embeds the following labels:
```
${{ steps.task_release_dh_meta.outputs.labels }}
```
embed-color: ${{ job.status == 'success' && '5763719' || '15418782' }}
embed-footer-text: "Completed at ${{ env.NOW }} UTC"
embed-timestamp: "${{ env.NOW_LONG }}"
embed-author-name: "${{ github.event.release.author.name }}"
embed-author-url: "${{ github.event.release.author.html_url }}"
embed-author-icon-url: "${{ github.event.release.author.avatar_url }}"
# #
# Job Docker Release Dockerhub Amd64
# #
@@ -384,6 +464,18 @@ jobs:
run: |
echo "Starting Dockerhub docker release"
# #
# Release Dockerhub Get Timestamp
# #
- name: '🕛 Get Timestamp'
id: task_release_set_timestamp
run: |
echo "NOW=$(date +'%m-%d-%Y %H:%M:%S')" >> $GITHUB_ENV
echo "NOW_SHORT=$(date +'%m-%d-%Y')" >> $GITHUB_ENV
echo "NOW_LONG=$(date +'%m-%d-%Y %H:%M')" >> $GITHUB_ENV
echo "NOW_DOCKER_LABEL=$(date +'%Y%m%d')" >> $GITHUB_ENV
# #
# Release Dockerhub Checkout Amd64
# #
@@ -488,6 +580,13 @@ jobs:
type=raw,enable=${{ inputs.DEV_RELEASE }},priority=400,prefix=,suffix=,value=development
flavor: |
latest=${{ !inputs.DEV_RELEASE }}
labels: |
org.opencontainers.image.VERSION=${{ env.IMAGE_VERSION }}
org.opencontainers.image.BUILDDATE=${{ env.NOW_DOCKER_LABEL }}
org.opencontainers.image.licenses=MIT
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.vendor=${{ env.IMAGE_AUTHOR }}
org.opencontainers.image.ref.name=${{ env.GIT_REF }}
# #
# Release Dockerhub Checkpoint Amd64
@@ -521,3 +620,62 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.task_release_dh_meta.outputs.tags }}
labels: ${{ steps.task_release_dh_meta.outputs.labels }}
# #
# Release Dockerhub Get Weekly Commits
# #
- name: '🕛 Get Weekly Commit List'
id: task_release_set_weekly_commit_list
run: |
echo 'WEEKLY_COMMITS<<EOF' >> $GITHUB_ENV
git log --format="[\`%h\`](${{ github.server_url }}/${{ github.repository }}/commit/%H) %s - %an" --since=7.days >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
# #
# Release Dockerhub Notify Github
# #
- name: '🔔 Send Discord Webhook Message'
uses: tsickert/discord-webhook@v6.0.0
if: success()
with:
username: 'Io'
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES }}
embed-title: "📦 **Deploy Docker Github Workflow Ran**"
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg'
embed-description: |
## 📦 Docker Deploy ${{ job.status == 'success' && '✅' || '❌' }} `${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}`
A new version of the docker container `${{ env.IMAGE_NAME }}` has been released from Github. The image is available at:
- https://github.com/${{ github.repository }}/pkgs/container/${{ env.IMAGE_NAME }}
- Docker Image: `${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}`
- Version: `${{ env.IMAGE_VERSION }}`
- Pull URL: https://ghcr.io/${{ env.IMAGE_AUTHOR }}/${{ env.IMAGE_NAME }}
- Branch: `${{ github.ref_name }}`
- Workflow: `${{ github.workflow }} (#${{github.run_number}})`
- Triggered By: `${{ github.actor }}`
### Tags
-# This docker image will use the following tags:
```
${{ steps.task_release_dh_meta.outputs.tags }}
```
### Labels
-# This docker image embeds the following labels:
```
${{ steps.task_release_dh_meta.outputs.labels }}
```
embed-color: ${{ job.status == 'success' && '5763719' || '15418782' }}
embed-footer-text: "Completed at ${{ env.NOW }} UTC"
embed-timestamp: "${{ env.NOW_LONG }}"
embed-author-name: "${{ github.event.release.author.name }}"
embed-author-url: "${{ github.event.release.author.html_url }}"
embed-author-icon-url: "${{ github.event.release.author.avatar_url }}"

View File

@@ -3,7 +3,7 @@
# @author Aetherinox
# @url https://github.com/Aetherinox
# @usage deploys docker container to github and send message to discord
# upload this workflow to both the `main` branch of the tvapp repository
# upload this workflow to both the `main` branch of the tvapp2 repository
# @secrets secrets.ADMINSERV_GPG_KEY_ASC gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
# secrets.ADMINSERV_GPG_PASSPHRASE gpg private key passphrase
# secrets.IMAGE_GHCR_TOKEN github personal access token (classic) with package:write permission
@@ -225,7 +225,7 @@ jobs:
echo "Starting Github Docker arm64"
# #
# Release Get Timestamp
# Release Github Get Timestamp
# #
- name: '🕛 Get Timestamp'
@@ -379,7 +379,7 @@ jobs:
labels: ${{ steps.task_release_gh_meta.outputs.labels }}
# #
# Release Get Weekly Commits
# Release Github Get Weekly Commits
# #
- name: '🕛 Get Weekly Commit List'
@@ -390,10 +390,11 @@ jobs:
echo 'EOF' >> $GITHUB_ENV
# #
# Release Notify Github
# Release Github Notify Github
# #
- name: '🔔 Send Discord Webhook Message'
id: task_release_notifications_discord_send
uses: tsickert/discord-webhook@v6.0.0
if: success()
with:
@@ -616,7 +617,7 @@ jobs:
labels: ${{ steps.task_release_gh_meta.outputs.labels }}
# #
# Release Get Weekly Commits
# Release Github Get Weekly Commits
# #
- name: '🕛 Get Weekly Commit List'
@@ -627,7 +628,7 @@ jobs:
echo 'EOF' >> $GITHUB_ENV
# #
# Release Notify Github
# Release Github Notify Github
# #
- name: '🔔 Send Discord Webhook Message'

View File

@@ -55,7 +55,7 @@ env:
{ "name": "Status 𐄂 Accepted", "color": "2e7539", "description": "This pull request has been accepted" },
{ "name": "Status 𐄂 Autoclosed", "color": "3E0915", "description": "Originally stale and was autoclosed for no activity" },
{ "name": "Status 𐄂 Denied", "color": "ba4058", "description": "Pull request has been denied" },
{ "name": "Status 𐄂 Locked", "color": "550F45", "description": "Automatically locked by AdminServ for a prolonged period of inactivity" },
{ "name": "Status 𐄂 Locked", "color": "550F45", "description": "Automatically locked by EuropaServ for a prolonged period of inactivity" },
{ "name": "Status 𐄂 Need Info", "color": "2E3C4C", "description": "Not enough information to resolve" },
{ "name": "Status 𐄂 No Action", "color": "030406", "description": "Closed without any action being taken" },
{ "name": "Status 𐄂 Pending", "color": "984b12", "description": "Pending pull request" },