Compare commits

..

2 Commits

Author SHA1 Message Date
ea543a1353 docs(readme): update legacy readme message
add warning message at top of readme explaining the discontinuation of the legacy app
2025-05-31 03:48:57 -07:00
03025c13fd docs(readme): update with warning message 2025-05-31 03:47:04 -07:00
13826 changed files with 3711 additions and 180169 deletions

23
.all-contributorsrc Executable file → Normal file
View File

@@ -1,5 +1,5 @@
{ {
"projectName": "tvapp2", "projectName": "thetvapp-docker",
"projectOwner": "Aetherinox", "projectOwner": "Aetherinox",
"repoType": "github", "repoType": "github",
"repoHost": "https://github.com", "repoHost": "https://github.com",
@@ -12,22 +12,15 @@
"login": "Aetherinox", "login": "Aetherinox",
"name": "Aetherinox", "name": "Aetherinox",
"avatar_url": "https://avatars.githubusercontent.com/u/118329232?v=4", "avatar_url": "https://avatars.githubusercontent.com/u/118329232?v=4",
"profile": "https://github.com/Aetherinox", "profile": "https://gitlab.com/Aetherinox",
"contributions": ["code"] "contributions": ["code", "projectManagement"]
}, },
{ {
"login": "iFlip721", "login": "dtankdempse",
"name": "iFlip721", "name": "dtankdempse",
"avatar_url": "https://avatars.githubusercontent.com/u/28721588?v=4", "avatar_url": "https://avatars.githubusercontent.com/u/175421607?v=4",
"profile": "https://github.com/iFlip721", "profile": "https://gitlab.com/dtankdempse",
"contributions": ["code"] "contributions": ["tools"]
},
{
"login": "Optx",
"name": "Optx",
"avatar_url": "https://avatars.githubusercontent.com/u/32874812?v=4",
"profile": "https://github.com/Nvmdfth",
"contributions": ["code"]
} }
], ],
"contributorsPerLine": 7, "contributorsPerLine": 7,

6
.dockerignore Normal file
View File

@@ -0,0 +1,6 @@
.git
.gitignore
.github
.gitattributes
READMETEMPLATE.md
README.md

21
.editorconfig Executable file → Normal file
View File

@@ -1,20 +1,9 @@
# # # http://editorconfig.org
# @file .editorconfig
# @author Aetherinox https://github.com/Aetherinox
# https://git.binaryninja.net/Aetherinox
# @ref http://editorconfig.org
# #
# #
# Is top-most EditorConfig file
# #
# is top-most EditorConfig file
root = true root = true
# #
# All Files # All Files
# #
[*] [*]
indent_style = space indent_style = space
indent_size = 4 indent_size = 4
@@ -23,17 +12,11 @@ charset = utf-8
trim_trailing_whitespace = true trim_trailing_whitespace = true
insert_final_newline = true insert_final_newline = true
# #
# Markdown Files # Markdown Files
# #
[*.md] [*.md]
trim_trailing_whitespace = false trim_trailing_whitespace = false
# #
# Other # Other
# #
[{*.nsh,*.yml,*.yaml,*.json}] [{*.nsh,*.yml,*.yaml,*.json}]
indent_style = space indent_style = space
indent_size = 2 indent_size = 2

21
.gitattributes vendored Executable file → Normal file
View File

@@ -1,25 +1,10 @@
# # # Auto detect text files and perform LF normalization
# @file .gitattritutes
# @author Aetherinox https://github.com/Aetherinox
# https://git.binaryninja.net/Aetherinox
# #
# #
# Auto detect text files and set LF
# #
* text=auto * text=auto
# # # Custom for Visual Studio
# Visual Studio
# #
*.cs diff=csharp *.cs diff=csharp
# # # Standard to msysgit
# msysgit
# #
*.doc diff=astextplain *.doc diff=astextplain
*.DOC diff=astextplain *.DOC diff=astextplain
*.docx diff=astextplain *.docx diff=astextplain

10
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,10 @@
custom: ["https://buymeacoffee.com/aetherinox"]
github: # [repo-name, aetherinox]
patreon: # Replace with a single Patreon username
open_collective: # name
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username

View File

@@ -10,10 +10,8 @@ body:
value: | value: |
1. Please speak `English`. 1. Please speak `English`.
2. Make sure you are using the latest version and take a moment to check that your issue hasn't been reported before. 2. Make sure you are using the latest version and take a moment to check that your issue hasn't been reported before.
3. It's really important to provide pertinent details and logs, incomplete details will be handled as an invalid report. 3. It's really important to provide pertinent details and logs,
4. Before creating this bug report, ensure you updated your applications to the latest versions. incomplete details will be handled as an invalid report.
Check your configurations to ensure there are no typos or errors.
Docker users should attempt to re-pull the TVApp2 image to ensure caching is not the cause of an issue.
<br /> <br />
@@ -41,12 +39,11 @@ body:
required: true required: true
- type: input - type: input
id: version-tvapp2 id: version-thetvapp
attributes: attributes:
label: "Version - Tag" label: "Version - Tag"
description: | description: |
Version / tag you are pulling for `TVApp2`. Version / tag you are pulling for `thetvapp`
You can view your build version in terminal by typing `docker inspect tvapp2 | grep BUILDVERSION`
placeholder: "Ex: 1.0.0" placeholder: "Ex: 1.0.0"
validations: validations:
required: true required: true
@@ -61,50 +58,15 @@ body:
required: true required: true
- type: dropdown - type: dropdown
id: image-registry id: image-source
attributes: attributes:
label: Docker Image Registry label: Docker Image Source
description: | description: |
Select which docker image you are pulling from. Select which docker image you are pulling from
If you custom built your image, ensure it's not a problem with your code before submitting this bug report.
options: options:
- "Dockerhub"
- "Gitea"
- "Github" - "Github"
- "Manual Build" - "Dockerhub"
validations: - "Custom Built"
required: true
- type: dropdown
id: app-parent
attributes:
label: Parent App
description: |
Select the application you are using TVApp2 with. Jellyfin, Plex, Emby, etc.
options:
- "Dim"
- "Emby"
- "Jellyfin"
- "KODI"
- "Plex"
- "Other (specify in description)"
validations:
required: true
- type: dropdown
id: app-proxy
attributes:
label: Proxy App
description: |
Select the plugin / app (if any) you are using as a m3u "Proxy" between your parent streaming app and TVApp2.
options:
- "❌ No Proxy"
- "Cabernet"
- "IPTVBoss"
- "IPTV-Solution"
- "Threadfin"
- "xTeVe"
- "Other (specify in description)"
validations: validations:
required: true required: true
@@ -136,7 +98,7 @@ body:
label: Logs label: Logs
description: | description: |
Paste your docker logs here. Paste your docker logs here.
You can get your docker logs by opening terminal and running `docker logs tvapp2` Paste logs from inside mounted volume `/config/log/*`
- type: textarea - type: textarea
id: screenshots id: screenshots

View File

@@ -1 +0,0 @@
blank_issues_enabled: true

View File

@@ -1,69 +0,0 @@
name: "🗺️ Roadmap"
description: Planned projects in the future to do. (⚠️ For contributors only)
title: "🗺️ Roadmap: <title>"
labels: [
"Type ◦ Roadmap"
]
body:
- type: markdown
attributes:
value: |
1. This issue type is different from feature requests.
2. This issue type is typically used by the developers of this repository to create and track new features
that have been planned in a future version of TVApp2.
3. Only use this issue type if you have been instructed to do so by a repository contributor.
4. Describe the benefits of this plan, and what needs to be taken into consideration during implementation.
5. Be detailed but to the point.
<br />
- type: input
id: roadmap-version-target
attributes:
label: Target Version
description: |
Which version are we aiming to introduce this into TVApp2?
placeholder: "v1.0.0"
validations:
required: true
- type: dropdown
id: roadmap-category
attributes:
label: Category
description: |
Select which aspect of TVApp2 this roadmap is designed for.
options:
- API
- Build Process
- CI (Continuous integration)
- Dependency / NodeJS Package
- Distribution
- Documentation
- M3U / EPG Functionality
- Repository
- S6-Overlay
default: 0
validations:
required: true
- type: textarea
id: roadmap-details
attributes:
label: Roadmap Details
description: |
Explain the vital steps in a bullet-point breakdown
placeholder: |
- Requires package update
- Must first integrate item A
validations:
required: true
- type: textarea
id: roadmap-screenshots
attributes:
label: 'Additional Info / Examples / Screenshots'
description: |
If available, provide mockups or examples.
Any further details you want to add.
Example snippets of code.

5
.github/PULL_REQUEST_TEMPLATE.md vendored Executable file → Normal file
View File

@@ -9,14 +9,13 @@
For your pull request title, use the format: For your pull request title, use the format:
[BUG]: Brief title of the bug being fixed [BUG]: Brief title of the bug being fixed
[FEATURE]: Brief title of the feature being added [FEATURE]: Brief title of the feature being added
[DOCS]: Brief title of the feature being added
Failure to follow the above title format will result in your PR being ignored. Failure to follow the above title format will result in your PR being ignored.
--> -->
# Pull Request # Pull Request
<small>Select which topic best describes your contribution:</small> <small>Checkmark which topic best describes your contribution:</small>
- [ ] Feature - [ ] Feature
- [ ] Bug - [ ] Bug
@@ -44,7 +43,7 @@
### Before You Submit ### Before You Submit
<small>Please ensure you check the following items to indicate that you've read this section and completed each task</small> <small>Please ensure you check the following items to indicate that you've read this section and completed each task</small>
- [ ] My code follows the [Contribution Guidelines](https://github.com/TheBinaryNinja/tvapp2/blob/main/CONTRIBUTING.md) - [ ] My code follows the [Contribution Guidelines](https://github.com/Aetherinox/thetvapp-docker/blob/main/CONTRIBUTING.md)
- [ ] I give expressed consent for my work to be used in this repo - [ ] I give expressed consent for my work to be used in this repo
- [ ] I have tested my work and it functions as intended - [ ] I have tested my work and it functions as intended
- [ ] I have included documentation if the change requires such - [ ] I have included documentation if the change requires such

0
.github/changelog-configuration.json vendored Executable file → Normal file
View File

2
.github/dependabot.yml vendored Executable file → Normal file
View File

@@ -1,7 +1,7 @@
# # # #
# MIT License # MIT License
# #
# Copyright (c) 2024-2025 Aetherinox # Copyright (c) 2025 Aetherinox
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy # Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal # of this software and associated documentation files (the "Software"), to deal

24
.github/labeler.yml vendored Executable file → Normal file
View File

@@ -1,27 +1,3 @@
# #
# MIT License
#
# Copyright (c) 2024-2025 Aetherinox
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# #
# Number of labels to fetch (optional). Defaults to 100 # Number of labels to fetch (optional). Defaults to 100
numLabels: 40 numLabels: 40
# These labels will not be used even if the issue contains them (optional). # These labels will not be used even if the issue contains them (optional).

188
.github/workflows/deploy-clean.yml vendored Executable file → Normal file
View File

@@ -1,35 +1,8 @@
# # # #
# @type github workflow # @type github workflow
# @desc cleans up the list of deployments in the environment history
# @author Aetherinox # @author Aetherinox
# @url https://github.com/Aetherinox # @url https://github.com/Aetherinox
# @usage cleans up the list of deployments in the environment history
# edit the 'environment:' to determine which deployment to keep clean
# - can be ran manually
#
# @secrets secrets.SELF_TOKEN self github personal access token (fine-grained)
# secrets.SELF_TOKEN_CL self github personal access token (classic)
# secrets.NPM_TOKEN self npmjs access token
# secrets.PYPI_API_TOKEN self Pypi API token (production site) - https://pypi.org/
# secrets.PYPI_API_TEST_TOKEN self Pypi API token (test site) - https://test.pypi.org/
# secrets.SELF_DOCKERHUB_TOKEN self Dockerhub token
# secrets.ORG_BINARYNINJA_TOKEN org github personal access token (fine-grained)
# secrets.ORG_BINARYNINJA_TOKEN_CL org github personal access token (classic)
# secrets.ORG_BINARYNINJA_DOCKERHUB_TOKEN org dockerhub secret
# secrets.ORG_BINARYNINJA_GITEA_TOKEN org gitea personal access token (classic) with package:write permission
# secrets.BINARYSERV_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
# secrets.BINARYSERV_GPG_PASSPHRASE bot gpg private key passphrase
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES discord webhook to report release notifications from github to discord
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKFLOWS discord webhook to report workflow notifications from github to discord
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_UPDATES discord webhook to report activity notifications from github to discord
#
# @local these workflows can be tested locally through the use of `act`
# https://github.com/nektos/act
# Extract act to folder
# Add system env var with path to act.exe
# Run the commands:
# git pull https://github.com/username/repo
# act -W .github/workflows/deploy-clean.yml -P ubuntu-latest=catthehacker/ubuntu:full-22.04
# act -W .github/workflows/deploy-clean.yml -s TOKEN_CL=XXXXXXXXXX --pull=false
# # # #
name: "⚙️ Deploy Clean" name: "⚙️ Deploy Clean"
@@ -41,43 +14,16 @@ run-name: "⚙️ Deploy Clean"
on: on:
workflow_dispatch: workflow_dispatch:
inputs:
# #
# Deployment Environment Name
#
# this is the name of the deployment item
# #
DEPLOYMENT_ENV:
description: '📦 Deployment Environment'
required: true
default: 'orion'
type: string
# #
# Delay
#
# Milliseconds to wait between cleaning up each action in history. Avoids secondary rate limit. Default: 500
# #
DEPLOYMENT_DELAY:
description: '🕛 Delete Delay'
required: true
default: '1000'
type: string
# # # #
# environment variables # environment variables
# # # #
env: env:
DEPLOYMENT_ENV: ${{ github.event.inputs.DEPLOYMENT_ENV || 'orion' }} BOT_NAME_1: AdminServ
DEPLOYMENT_DELAY: ${{ github.event.inputs.DEPLOYMENT_DELAY || '1000' }} BOT_NAME_2: AdminServX
BOT_NAME_1: EuropaServ BOT_NAME_3: EuropaServ
BOT_NAME_2: BinaryServ
BOT_NAME_DEPENDABOT: dependabot[bot] BOT_NAME_DEPENDABOT: dependabot[bot]
BOT_NAME_RENOVATE: renovate[bot]
LABELS_JSON: | LABELS_JSON: |
[ [
{ "name": "AC Changes Made", "color": "8F1784", "description": "Requested changes have been made and are pending a re-scan" }, { "name": "AC Changes Made", "color": "8F1784", "description": "Requested changes have been made and are pending a re-scan" },
@@ -92,7 +38,7 @@ env:
{ "name": "Status 𐄂 Accepted", "color": "2e7539", "description": "This pull request has been accepted" }, { "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 𐄂 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 𐄂 Denied", "color": "ba4058", "description": "Pull request has been denied" },
{ "name": "Status 𐄂 Locked", "color": "550F45", "description": "Automatically locked by EuropaServ for a prolonged period of inactivity" }, { "name": "Status 𐄂 Locked", "color": "550F45", "description": "Automatically locked by AdminServ for a prolonged period of inactivity" },
{ "name": "Status 𐄂 Need Info", "color": "2E3C4C", "description": "Not enough information to resolve" }, { "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 𐄂 No Action", "color": "030406", "description": "Closed without any action being taken" },
{ "name": "Status 𐄂 Pending", "color": "984b12", "description": "Pending pull request" }, { "name": "Status 𐄂 Pending", "color": "984b12", "description": "Pending pull request" },
@@ -146,131 +92,15 @@ env:
jobs: jobs:
cleanup: cleanup:
# runs-on: ubuntu-latest runs-on: ubuntu-latest
runs-on: apollo-x64
timeout-minutes: 20
permissions: write-all permissions: write-all
steps: steps:
# #
# Cleanup Set Env Variables
# #
- name: >-
🕛 Get Timestamp
id: task_cleanup_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 Github Checkout Arm64
# #
- name: >-
✅ Checkout
id: task_cleanup_gh_checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# #
# Cleanup Start
# #
- name: >- - name: >-
⚙️ Deployments Clean ⚙️ Deployments Clean
id: task_cleanup_start
uses: Aetherinox/delete-deploy-env-action@v3 uses: Aetherinox/delete-deploy-env-action@v3
with: with:
token: ${{ secrets.SELF_TOKEN_CL }} token: ${{ secrets.SELF_TOKEN_CL }}
environment: '${{ env.DEPLOYMENT_ENV }}' environment: orion
onlyRemoveDeployments: true onlyRemoveDeployments: true
delay: "${{ env.DEPLOYMENT_DELAY }}" delay: "1000"
# #
# Cleanup Get Weekly Commits
# #
- name: >-
🕛 Get Weekly Commit List
id: task_cleanup_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
# #
# Cleanup Notify Github Success
# #
- name: >-
🔔 Send Discord Webhook Message (Success)
id: task_cleanup_notify_discord_success
uses: tsickert/discord-webhook@v7.0.0
if: success()
with:
username: 'Io'
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKfLOWS }}
embed-title: "⚙️ ${{ github.workflow_ref }}"
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg'
embed-description: |
## 📦 Deployment Cleanup ${{ job.status == 'success' && '✅' || '❌' }}
A **successful** deployment cleanup was triggered on your repository. The history for this environment has been wiped
and will no longer list previous deployments you've made.
- Environment: `${{ env.DEPLOYMENT_ENV }}`
- Cleanup Delay: `${{ env.DEPLOYMENT_DELAY }}`
- Workflow: `${{ github.workflow }} (#${{github.run_number}})`
- Runner: `${{ runner.name }}`
- Triggered By: `${{ github.actor }}`
- Status: `${{ job.status == 'success' && '✅ Successful' || '❌ Failed' }}`
embed-color: ${{ job.status == 'success' && '5763719' || '15418782' }}
embed-footer-text: "Completed at ${{ env.NOW }} UTC"
embed-timestamp: "${{ env.NOW_LONG }}"
embed-author-name: "${{ github.repository_owner }}"
embed-author-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-author-icon-url: "https://avatars.githubusercontent.com/u/200161462"
# #
# Cleanup Notify Github Failure
# #
- name: >-
🔔 Send Discord Webhook Message (Failure)
id: task_cleanup_notify_discord_failure
uses: tsickert/discord-webhook@v7.0.0
if: failure()
with:
username: 'Io'
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKfLOWS }}
embed-title: "⚙️ ${{ github.workflow_ref }}"
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg'
embed-description: |
## 📦 Deployment Cleanup ${{ job.status == 'success' && '✅' || '❌' }}
A **failed** deployment cleanup was triggered on your repository. Since the action failed; no entries of your repo's
deployment history have been removed.
- Environment: `${{ env.DEPLOYMENT_ENV }}`
- Cleanup Delay: `${{ env.DEPLOYMENT_DELAY }}`
- Workflow: `${{ github.workflow }} (#${{github.run_number}})`
- Runner: `${{ runner.name }}`
- Triggered By: `${{ github.actor }}`
- Status: `${{ job.status == 'success' && '✅ Successful' || '❌ Failed' }}`
embed-color: ${{ job.status == 'success' && '5763719' || '15418782' }}
embed-footer-text: "Completed at ${{ env.NOW }} UTC"
embed-timestamp: "${{ env.NOW_LONG }}"
embed-author-name: "${{ github.repository_owner }}"
embed-author-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-author-icon-url: "https://avatars.githubusercontent.com/u/200161462"

File diff suppressed because it is too large Load Diff

View File

@@ -1,672 +0,0 @@
# #
# @type github workflow
# @author Aetherinox
# @url https://github.com/Aetherinox
# @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.SELF_TOKEN self github personal access token (fine-grained)
# secrets.SELF_TOKEN_CL self github personal access token (classic)
# secrets.NPM_TOKEN self npmjs access token
# secrets.PYPI_API_TOKEN self Pypi API token (production site) - https://pypi.org/
# secrets.PYPI_API_TEST_TOKEN self Pypi API token (test site) - https://test.pypi.org/
# secrets.SELF_DOCKERHUB_TOKEN self Dockerhub token
# secrets.ORG_BINARYNINJA_TOKEN org github personal access token (fine-grained)
# secrets.ORG_BINARYNINJA_TOKEN_CL org github personal access token (classic)
# secrets.ORG_BINARYNINJA_DOCKERHUB_TOKEN org dockerhub secret
# secrets.ORG_BINARYNINJA_GITEA_TOKEN org gitea personal access token (classic) with package:write permission
# secrets.BINARYSERV_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
# secrets.BINARYSERV_GPG_PASSPHRASE bot gpg private key passphrase
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES discord webhook to report release notifications from github to discord
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKFLOWS discord webhook to report workflow notifications from github to discord
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_UPDATES discord webhook to report activity notifications from github to discord
#
# @local these workflows can be tested locally through the use of `act`
# https://github.com/nektos/act
# Extract act to folder
# Add system env var with path to act.exe
# Run the commands:
# git pull https://github.com/username/repo
# act -W .github/workflows/deploy-docker-dockerhub.yml -P ubuntu-latest=catthehacker/ubuntu:full-22.04
# act -W .github/workflows/deploy-docker-dockerhub.yml -s TOKEN_CL=XXXXXXXXXX --pull=false
# #
name: "📦 Deploy Docker Dockerhub"
run-name: "📦 Deploy Docker Dockerhub"
# #
# Triggers
# #
on:
# #
# Trigger Workflow Dispatch
#
# If any values are not provided, will use fallback env variable
# #
workflow_dispatch:
inputs:
# #
# Image Name
#
# used in dockerhub image path
# ${{ env.IMAGE_DOCKERHUB_AUTHOR }}/${{ env.IMAGE_NAME }}
# #
IMAGE_NAME:
description: '📦 Image Name'
required: true
default: 'tvapp2'
type: string
# #
# Image Version
#
# used to create new release tag, and add version to docker image name
# #
IMAGE_VERSION:
description: '🏷️ Image Version'
required: true
default: '1.0.0'
type: string
# #
# Dockerhub Author
#
# used in dockerhub image path
# hub.docker.com/r/${{ env.IMAGE_DOCKERHUB_AUTHOR }}/${{ env.IMAGE_NAME }}
# #
IMAGE_DOCKERHUB_AUTHOR:
description: '🪪 Image Author'
required: true
default: 'TheBinaryNinja'
type: string
# #
# Dockerhub Username
#
# this is the user to sign into Dockerhub as.
# this username MUST be lowercase or you will get `unauthorized: incorrect username or password`
# #
IMAGE_DOCKERHUB_USERNAME:
description: '🪪 Dockerhub Username'
required: true
default: 'thebinaryninja'
type: string
# #
# true no changes to the repo will be made
# false workflow will behave normally, and push any changes detected to the files
# #
DRY_RUN:
description: '🐛 Dry Run (Debug)'
required: true
default: false
type: boolean
# #
# true released version will be marked as a development build and will have the v1.x.x-development tag instead of -latest
# false release version will be marked with -latest docker tag
# #
DEV_RELEASE:
description: '🧪 Development Release'
required: true
default: false
type: boolean
# #
# Trigger Push
# #
push:
tags:
- '*'
# #
# Environment Vars
# #
env:
IMAGE_NAME: ${{ github.event.inputs.IMAGE_NAME || 'tvapp2' }}
IMAGE_VERSION: ${{ github.event.inputs.IMAGE_VERSION || '1.0.0' }}
IMAGE_DOCKERHUB_AUTHOR: ${{ github.event.inputs.IMAGE_DOCKERHUB_AUTHOR || 'thebinaryninja' }}
IMAGE_DOCKERHUB_USERNAME: ${{ github.event.inputs.IMAGE_DOCKERHUB_USERNAME || 'thebinaryninja' }}
BOT_NAME_1: EuropaServ
BOT_NAME_2: BinaryServ
BOT_NAME_DEPENDABOT: dependabot[bot]
BOT_NAME_RENOVATE: renovate[bot]
# #
# Jobs
#
# The way pushed docker containers on Dockerhub work, the most recent image built goes at the top.
# We will use the order below which builds the :latest image last so that it appears at the very
# top of the packages page.
# #
jobs:
# #
# Job Create Tag
# #
job-docker-release-tags-create:
name: >-
📦 Release Create Tag
# runs-on: ubuntu-latest
runs-on: apollo-x64
timeout-minutes: 4
permissions:
contents: write
packages: write
attestations: write
id-token: write
steps:
# #
# Release Tags Start
# #
- name: '🏳️ Start'
id: task_release_tags_start
run: |
echo "Creating Tag"
# #
# Release Tags Checkout
# #
- name: '✅ Checkout'
id: task_release_tags_checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# #
# Release Tags Fix Permissions
# #
- name: '#️⃣ Manage Permissions'
id: task_release_tags_permissions
run: |
find ./ -name 'run' -exec chmod 755 {} \;
WRONG_PERM=$(find ./ -path "./.git" -prune -o \( -name "run" -o -name "finish" -o -name "check" \) -not -perm -u=x,g=x,o=x -print)
if [ -n "${WRONG_PERM}" ]; then
echo "⚠️⚠️⚠️ Permissions are invalid ⚠️⚠️⚠️"
for i in ${WRONG_PERM}; do
echo "::error file=${i},line=1,title=Missing Executable Bit::This file needs to be set as executable!"
done
exit 1
else
echo "✅✅✅ Executable permissions are OK ✅✅✅"
fi
# #
# Release Tags Create Tag
#
# only called in dispatch mode
# #
- uses: rickstaa/action-create-tag@v1
id: task_release_tags_create
if: ( github.event_name != 'workflow_dispatch' && inputs.DRY_RUN == false )
with:
tag: "${{ env.IMAGE_VERSION }}"
tag_exists_error: false
message: '${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}'
gpg_private_key: ${{ secrets.ADMINSERV_GPG_KEY_ASC }}
gpg_passphrase: ${{ secrets.ADMINSERV_GPG_PASSPHRASE }}
# #
# Job Docker Release Dockerhub
# #
job-docker-release-dockerhub:
name: >-
📦 Release Dockerhub
# runs-on: ubuntu-latest
runs-on: apollo-x64
timeout-minutes: 10
permissions:
contents: write
packages: write
attestations: write
id-token: write
needs: [ job-docker-release-tags-create ]
steps:
# #
# Release Dockerhub Start Amd64
# #
- name: '🏳️ Start'
id: task_release_dh_start
run: |
echo "Starting Dockerhub docker release"
# #
# Release Dockerhub Checkout Amd64
# #
- name: '✅ Checkout'
id: task_release_gh_checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# #
# Release Dockerhub Get Timestamp
# #
- name: '🕛 Get Timestamp'
id: task_release_set_timestamp
run: |
echo "IMAGE_VERSION_1DIGIT=`echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-1`" >> ${GITHUB_ENV} # 1
echo "IMAGE_VERSION_2DIGIT=`echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-2`" >> ${GITHUB_ENV} # 1.0
echo "REGISTRY_REPO_ORG_AUTHOR_LC=`echo ${{ env.IMAGE_DOCKERHUB_AUTHOR }}/${{ env.IMAGE_NAME }} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} # thebinaryninja/tvapp2
echo "REGISTRY_REPO_AUTHOR_LC=`echo ${{ env.IMAGE_DOCKERHUB_AUTHOR }} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} # thebinaryninja
echo "DOCKER_SHA=${GITHUB_SHA}" >> $GITHUB_ENV # 71fad013cfce9116ec62779e4a7e627fe4c33627
echo "NOW=$(date +'%m-%d-%Y %H:%M:%S')" >> $GITHUB_ENV # 02-25-2025 12:49:48
echo "NOW_SHORT=$(date +'%m-%d-%Y')" >> $GITHUB_ENV # 02-25-2025
echo "NOW_LONG=$(date +'%m-%d-%Y %H:%M')" >> $GITHUB_ENV # 02-25-2025 12:49
echo "NOW_DOCKER_LABEL=$(date +'%Y%m%d')" >> $GITHUB_ENV # 20250225
echo "NOW_DOCKER_TS=$(date -u +'%FT%T.%3NZ')" >> $GITHUB_ENV # 2025-02-25T12:50:11.569Z
# #
# Release Dockerhub Install Dependencies
# #
- name: '📦 Install Dependencies'
id: task_release_dh_dependencies
run:
sudo apt-get install -qq dos2unix
# #
# Release Dockerhub Execute dos2unix
# #
- name: '🔐 Apply dos2unix'
id: task_release_dh_dos2unix
run: |
echo "⚠️⚠️⚠️ Running DOS2UNIX ⚠️⚠️⚠️"
find ./ \( -path "./.git" -o -path "./docs" -o -path "./.github" -o -path "*.png" -o -path "*.jpg" \) -prune -o -name '*' -print | xargs dos2unix --
echo "✅✅✅ Completed DOS2UNIX ✅✅✅"
# #
# Release Dockerhub Fix Permissions
# #
- name: '#️⃣ Manage Permissions'
id: task_release_dh_permissions
run: |
find ./ -name 'run' -exec chmod 755 {} \;
WRONG_PERM=$(find ./ -path "./.git" -prune -o \( -name "run" -o -name "finish" -o -name "check" \) -not -perm -u=x,g=x,o=x -print)
if [ -n "${WRONG_PERM}" ]; then
echo "⚠️⚠️⚠️ Permissions are invalid ⚠️⚠️⚠️"
for i in ${WRONG_PERM}; do
echo "::error file=${i},line=1,title=Missing Executable Bit::This file needs to be set as executable!"
done
exit 1
else
echo "✅✅✅ Executable permissions are OK ✅✅✅"
fi
# #
# Release Dockerhub QEMU Amd64
# #
- name: '⚙️ Set up QEMU'
id: task_release_dh_qemu
uses: docker/setup-qemu-action@v3
# #
# Release Dockerhub Setup BuildX Amd64
# #
- name: '⚙️ Setup Buildx'
id: task_release_dh_buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
driver-opts: 'image=moby/buildkit:latest'
# #
# Release Dockerhub Registry Login Amd64
# #
- name: '⚙️ Login to Dockerhub'
id: task_release_dh_registry
uses: docker/login-action@v3
with:
username: ${{ env.IMAGE_DOCKERHUB_USERNAME }}
password: ${{ secrets.ORG_BINARYNINJA_DOCKERHUB_TOKEN }}
# #
# Release Dockerhub Read Readme
#
# @usage org.opencontainers.image.description=${{ steps.task_release_dh_readme_cache.outputs.content }}
# #
- name: '📄 Cache README.md'
id: task_release_dh_readme_cache
uses: actions/github-script@v7
with:
github-token: ${{ secrets.ORG_BINARYNINJA_TOKEN_CL }}
script: |
'use strict'
const { promises: fs } = require('fs')
const main = async () => {
const path = "README.md"
let content = await fs.readFile(path, 'utf8')
core.setOutput('content', content)
}
main().catch(err => core.setFailed(err.message))
# #
# Release Dockerhub Meta
#
# this version of meta does not need one for amd64 and one for arm64 because both
# platforms are combined into one release, all sharing the same tags
# #
- name: '🔨 Dockerhub: Meta'
id: task_release_dh_meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.REGISTRY_REPO_AUTHOR_LC }}/${{ env.IMAGE_NAME }}
tags: |
# tag latest = yes ( no dev )
type=raw,value=latest,enable=${{ !inputs.DEV_RELEASE }}
# tag add pr tag ( PR or push only )
type=ref,enable=${{ github.event_name == 'pull_request' || github.event_name == 'push' }},priority=600,prefix=,suffix=,event=tag
# tag add 1.0.0 ( dispatch only + no dev )
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=450,prefix=,suffix=,value=${{ env.IMAGE_VERSION }}
# tag add 1.0 ( dispatch only + no dev )
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=425,prefix=,suffix=,value=${{ env.IMAGE_VERSION_2DIGIT }}
# tag add 1 ( dispatch only + no dev )
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=400,prefix=,suffix=,value=${{ env.IMAGE_VERSION_1DIGIT }}
# tag add development ( dispatch only + only dev )
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == true }},priority=300,prefix=,suffix=,value=development
# tag add development ( amd64 + only dev )
type=raw,enable=${{ inputs.DEV_RELEASE }},priority=400,prefix=,suffix=,value=development
flavor: |
latest=false
labels: |
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
org.opencontainers.image.licenses=MIT
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.vendor=${{ env.REGISTRY_REPO_AUTHOR_LC }}
org.opencontainers.image.ref.name=${{ github.ref_name }}
org.opencontainers.image.development=${{ inputs.DEV_RELEASE == true && 'true' || 'false' }}
org.opencontainers.image.registry=dockerhub
org.tvapp2.image.build-version="Version:- ${{ env.IMAGE_VERSION }} Date:- ${{ env.NOW_DOCKER_LABEL }}"
annotations: |
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
org.opencontainers.image.licenses=MIT
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.vendor=${{ env.REGISTRY_REPO_AUTHOR_LC }}
org.opencontainers.image.ref.name=${{ github.ref_name }}
org.opencontainers.image.development=${{ inputs.DEV_RELEASE == true && 'true' || 'false' }}
org.opencontainers.image.registry=dockerhub
org.tvapp2.image.build-version="Version:- ${{ env.IMAGE_VERSION }} Date:- ${{ env.NOW_DOCKER_LABEL }}"
# #
# Release Dockerhub Build and Push Amd64
# #
- name: '📦 Build & Push (linux/amd64)'
id: task_release_dh_push_amd64
uses: docker/build-push-action@v6
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
with:
context: .
file: Dockerfile
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.task_release_dh_meta.outputs.labels }}
tags: |
${{ steps.task_release_dh_meta.outputs.tags }}
provenance: false
sbom: false
build-args: |-
ARCH=amd64
VERSION=${{ env.IMAGE_VERSION }}
BUILDDATE=${{ env.NOW_DOCKER_LABEL }}
# #
# Release Dockerhub Export Digest Amd64
# #
- name: '📄 Export Digest (linux/amd64)'
id: task_release_dh_digest_export_amd64
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
run: |
mkdir -p /tmp/build-digest-amd64
digest="${{ steps.task_release_dh_push_amd64.outputs.digest }}"
digest="${digest#sha256:}"
touch "/tmp/build-digest-amd64/$digest"
shell: bash
# #
# Release Dockerhub Upload Digest Amd64
# #
- name: '🔼 Upload Digest (linux/amd64)'
id: task_release_dh_digest_upload_amd64
uses: actions/upload-artifact@v4
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
with:
name: digest-amd64
path: /tmp/build-digest-amd64/*
if-no-files-found: error
retention-days: 10
# #
# Release Dockerhub Build and Push Arm64
# #
- name: '📦 Build & Push (linux/arm64)'
id: task_release_dh_push_arm64
uses: docker/build-push-action@v6
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
with:
context: .
file: Dockerfile
platforms: linux/arm64
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.task_release_dh_meta.outputs.labels }}
tags: |
${{ steps.task_release_dh_meta.outputs.tags }}
provenance: false
sbom: false
build-args: |-
ARCH=arm64
VERSION=${{ env.IMAGE_VERSION }}
BUILDDATE=${{ env.NOW_DOCKER_LABEL }}
# #
# Release Dockerhub Export Digest Arm64
# #
- name: '📄 Export Digest (linux/arm64)'
id: task_release_dh_digest_export_arm64
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
run: |
mkdir -p /tmp/build-digest-arm64
digest="${{ steps.task_release_dh_push_arm64.outputs.digest }}"
digest="${digest#sha256:}"
touch "/tmp/build-digest-arm64/$digest"
shell: bash
# #
# Release Dockerhub Upload Digest Arm64
# #
- name: '🔼 Upload Digest (linux/arm64)'
id: task_release_dh_digest_upload_arm64
uses: actions/upload-artifact@v4
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
with:
name: digest-arm64
path: /tmp/build-digest-arm64/*
if-no-files-found: error
retention-days: 10
# #
# Release Dockerhub Push Manifest
# #
- name: '📦 Push Manifest'
id: task_release_dh_manifest
uses: int128/docker-manifest-create-action@v2
with:
tags: |
${{ steps.task_release_dh_meta.outputs.tags }}
sources: |
${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}@${{ steps.task_release_dh_push_amd64.outputs.digest }}
${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}@${{ steps.task_release_dh_push_arm64.outputs.digest }}
index-annotations: |
${{ steps.task_release_dh_meta.outputs.labels }}
# #
# Release Dockerhub Checkpoint Amd64
# #
- name: '⚠️ Checkpoint'
id: task_release_dh_checkpoint
run: |
echo ""
echo "[ GITHUB ] ---------------------------------------------------------------------------------------------"
echo "github.actor.............................. ${{ github.actor }}"
echo "github.ref ............................... ${{ github.ref }}"
echo "github.ref_name .......................... ${{ github.ref_name }}"
echo "github.event_name ........................ ${{ github.event_name }}"
echo "github.repository_owner .................. ${{ github.repository_owner }}"
echo "github.repository ........................ ${{ github.repository }}"
echo ""
echo "[ INPUTS ] ---------------------------------------------------------------------------------------------"
echo "inputs.IMAGE_NAME ........................ ${{ inputs.IMAGE_NAME }}"
echo "inputs.IMAGE_VERSION ..................... ${{ inputs.IMAGE_VERSION }}"
echo "inputs.IMAGE_DOCKERHUB_AUTHOR ............ ${{ inputs.IMAGE_DOCKERHUB_AUTHOR }}"
echo "inputs.IMAGE_DOCKERHUB_USERNAME .......... ${{ inputs.IMAGE_DOCKERHUB_USERNAME }}"
echo "inputs.DEV_RELEASE ....................... ${{ inputs.DEV_RELEASE }}"
echo "inputs.DRY_RUN ........................... ${{ inputs.DRY_RUN }}"
echo ""
echo "[ ENV ] ------------------------------------------------------------------------------------------------"
echo "env.IMAGE_NAME ........................... ${{ env.IMAGE_NAME }}"
echo "env.IMAGE_VERSION ........................ ${{ env.IMAGE_VERSION }}"
echo "env.IMAGE_VERSION_1DIGIT ................. ${{ env.IMAGE_VERSION_1DIGIT }}"
echo "env.IMAGE_VERSION_2DIGIT ................. ${{ env.IMAGE_VERSION_2DIGIT }}"
echo "env.IMAGE_DOCKERHUB_AUTHOR ............... ${{ env.IMAGE_DOCKERHUB_AUTHOR }}"
echo "env.IMAGE_DOCKERHUB_USERNAME ............. ${{ env.IMAGE_DOCKERHUB_USERNAME }}"
echo "env.NOW .................................. ${{ env.NOW }}"
echo "env.NOW_SHORT ............................ ${{ env.NOW_SHORT }}"
echo "env.NOW_LONG ............................. ${{ env.NOW_LONG }}"
echo "env.NOW_DOCKER_LABEL ..................... ${{ env.NOW_DOCKER_LABEL }}"
echo "env.NOW_DOCKER_TS ........................ ${{ env.NOW_DOCKER_TS }}"
echo "env.REGISTRY_REPO_ORG_AUTHOR_LC .......... ${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}"
echo "env.REGISTRY_REPO_AUTHOR_LC .............. ${{ env.REGISTRY_REPO_AUTHOR_LC }}"
echo "env.DOCKER_SHA ........................... ${{ env.DOCKER_SHA }}"
echo ""
echo "[ DOCKER IMAGES ] --------------------------------------------------------------------------------------"
echo "registry ................................. Dockerhub"
echo "tags ..................................... ${{ steps.task_release_dh_meta.outputs.tags }}"
echo "labels ................................... ${{ steps.task_release_dh_meta.outputs.labels }}"
echo "digest ................................... ${{ steps.task_release_dh_push_amd64.outputs.digest }}"
echo ""
echo "(release) tags ........................... ${{ steps.task_release_dh_meta.outputs.tags }}"
echo "(release) labels ......................... ${{ steps.task_release_dh_meta.outputs.labels }}"
echo ""
echo "[ DOCKER DIGESTS ] -------------------------------------------------------------------------------------"
echo "docker image id (amd64) .................. ${{ steps.task_release_dh_push_amd64.outputs.imageid }}"
echo "docker digest (amd64) .................... ${{ steps.task_release_dh_push_amd64.outputs.digest }}"
echo "docker image id (arm64) .................. ${{ steps.task_release_dh_push_arm64.outputs.imageid }}"
echo "docker digest (arm64) .................... ${{ steps.task_release_dh_push_arm64.outputs.digest }}"
# #
# 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@v7.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: "⚙️ ${{ github.workflow_ref }}"
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg'
embed-description: |
### 📦 Deploy (Dockerhub) ${{ job.status == 'success' && '✅' || '❌' }} `${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}`
${{ inputs.DEV_RELEASE == true && '### ⚠️⚠️ Development / Pre-release ⚠️⚠️' || '' }}
A new version of the docker container `${{ env.IMAGE_NAME }}` has been released from Github to Dockerhub. The image is available at:
- https://hub.docker.com/r/${{ env.IMAGE_DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}
- Version: `${{ env.IMAGE_VERSION }}`
- Release Type: `${{ inputs.DEV_RELEASE == true && '⚠️⚠️ Development / Pre-release ⚠️⚠️' || 'Stable' }}`
- Pull: `docker pull ${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}:${{ inputs.DEV_RELEASE == true && 'development' || env.IMAGE_VERSION }}`
- Pull (amd64): `docker pull ${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}@${{ steps.task_release_dh_push_amd64.outputs.digest }}`
- Pull (arm64): `docker pull ${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}@${{ steps.task_release_dh_push_arm64.outputs.digest }}`
- Dry Run: `${{ inputs.DRY_RUN }}`
- Source: `Dockerhub` https://hub.docker.com/r/${{ env.IMAGE_DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}
- Docker Image: `${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}`
- Branch: `${{ github.ref_name }}`
- Workflow: `${{ github.workflow }} (#${{github.run_number}})`
- Runner: `${{ runner.name }}`
- Triggered By: `${{ github.actor }}`
- Status: `${{ job.status == 'success' && '✅ Successful' || '❌ Failed' }}`
### 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.repository_owner }}"
embed-author-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-author-icon-url: "https://avatars.githubusercontent.com/u/200161462"

View File

@@ -1,802 +0,0 @@
# #
# @type github workflow
# @author Aetherinox
# @url https://github.com/Aetherinox
# @usage deploys docker container to Gitea and send message to discord
# upload this workflow to both the `main` branch of the tvapp2 repository
#
# @secrets secrets.SELF_TOKEN self github personal access token (fine-grained)
# secrets.SELF_TOKEN_CL self github personal access token (classic)
# secrets.NPM_TOKEN self npmjs access token
# secrets.PYPI_API_TOKEN self Pypi API token (production site) - https://pypi.org/
# secrets.PYPI_API_TEST_TOKEN self Pypi API token (test site) - https://test.pypi.org/
# secrets.SELF_DOCKERHUB_TOKEN self Dockerhub token
# secrets.ORG_BINARYNINJA_TOKEN org github personal access token (fine-grained)
# secrets.ORG_BINARYNINJA_TOKEN_CL org github personal access token (classic)
# secrets.ORG_BINARYNINJA_DOCKERHUB_TOKEN org dockerhub secret
# secrets.ORG_BINARYNINJA_GITEA_TOKEN org gitea personal access token (classic) with package:write permission
# secrets.BINARYSERV_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
# secrets.BINARYSERV_GPG_PASSPHRASE bot gpg private key passphrase
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES discord webhook to report release notifications from github to discord
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKFLOWS discord webhook to report workflow notifications from github to discord
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_UPDATES discord webhook to report activity notifications from github to discord
#
# @local these workflows can be tested locally through the use of `act`
# https://github.com/nektos/act
# Extract act to folder
# Add system env var with path to act.exe
# Run the commands:
# git pull https://github.com/username/repo
# act -W .github/workflows/deploy-docker-gitea.yml -P ubuntu-latest=catthehacker/ubuntu:full-22.04
# act -W .github/workflows/deploy-docker-gitea.yml -s TOKEN_CL=XXXXXXXXXX --pull=false
# #
name: "📦 Deploy Docker Gitea"
run-name: "📦 Deploy Docker Gitea"
# #
# Triggers
# #
on:
# #
# Trigger Workflow Dispatch
#
# If any values are not provided, will use fallback env variable
# #
workflow_dispatch:
inputs:
# #
# Image Name
#
# used in github image path
# git.binaryninja.net/${{ env.IMAGE_GITEA_AUTHOR }}/${{ env.IMAGE_NAME }}
# #
IMAGE_NAME:
description: '📦 Image Name'
required: true
default: 'tvapp2'
type: string
# #
# Image Version
#
# used to create new release tag, and add version to docker image name
# #
IMAGE_VERSION:
description: '🏷️ Image Version'
required: true
default: '1.0.0'
type: string
# #
# Gitea Author
#
# used in github image path
# git.binaryninja.net/${{ env.IMAGE_GITEA_AUTHOR }}/${{ env.IMAGE_NAME }}
# #
IMAGE_GITEA_AUTHOR:
description: '🪪 Image Author'
required: true
default: 'BinaryNinja'
type: string
# #
# Gitea Username
#
# this is the user to sign into gitea as.
# #
IMAGE_GITEA_USERNAME:
description: '🪪 Gitea Username'
required: true
default: 'aetherinox'
type: string
# #
# Gitea Website
#
# this is the gitea website / url to push to
# #
IMAGE_GITEA_WEBSITE:
description: '🌎 Gitea Website'
required: true
default: 'git.binaryninja.net'
type: string
# #
# true no changes to the repo will be made
# false workflow will behave normally, and push any changes detected to the files
# #
DRY_RUN:
description: '🐛 Dry Run (Debug)'
required: true
default: false
type: boolean
# #
# true released version will be marked as a development build and will have the v1.x.x-development tag instead of -latest
# false release version will be marked with -latest docker tag
# #
DEV_RELEASE:
description: '🧪 Development Release'
required: true
default: false
type: boolean
# #
# Trigger Push
# #
push:
tags:
- '*'
# #
# Environment Vars
# #
env:
IMAGE_NAME: ${{ github.event.inputs.IMAGE_NAME || 'tvapp2' }}
IMAGE_VERSION: ${{ github.event.inputs.IMAGE_VERSION || '1.0.0' }}
IMAGE_GITEA_AUTHOR: ${{ github.event.inputs.IMAGE_GITEA_AUTHOR || 'BinaryNinja' }}
IMAGE_GITEA_USERNAME: ${{ github.event.inputs.IMAGE_GITEA_USERNAME || 'BinaryNinja' }}
IMAGE_GITEA_WEBSITE: ${{ github.event.inputs.IMAGE_GITEA_WEBSITE || 'git.binaryninja.net' }}
BOT_NAME_1: EuropaServ
BOT_NAME_2: BinaryServ
BOT_NAME_DEPENDABOT: dependabot[bot]
BOT_NAME_RENOVATE: renovate[bot]
# #
# Jobs
#
# The way pushed docker containers on Gitea work, the most recent image built goes at the top.
# We will use the order below which builds the :latest image last so that it appears at the very
# top of the packages page.
# #
jobs:
# #
# Job Create Tag
# #
job-docker-release-tags-create:
name: >-
📦 Release Create Tag
# runs-on: ubuntu-latest
runs-on: apollo-x64
timeout-minutes: 4
permissions:
contents: write
packages: write
attestations: write
id-token: write
steps:
# #
# Release Tags Start
# #
- name: '🏳️ Start'
id: task_release_tags_start
run: |
echo "Creating Tag"
# #
# Release Tags Checkout
# #
- name: '✅ Checkout'
id: task_release_tags_checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# #
# Release Tags Fix Permissions
# #
- name: '#️⃣ Manage Permissions'
id: task_release_tags_permissions
run: |
find ./ -name 'run' -exec chmod 755 {} \;
WRONG_PERM=$(find ./ -path "./.git" -prune -o \( -name "run" -o -name "finish" -o -name "check" \) -not -perm -u=x,g=x,o=x -print)
if [ -n "${WRONG_PERM}" ]; then
echo "⚠️⚠️⚠️ Permissions are invalid ⚠️⚠️⚠️"
for i in ${WRONG_PERM}; do
echo "::error file=${i},line=1,title=Missing Executable Bit::This file needs to be set as executable!"
done
exit 1
else
echo "✅✅✅ Executable permissions are OK ✅✅✅"
fi
# #
# Release Tags Create Tag
#
# only called in dispatch mode
# #
- uses: rickstaa/action-create-tag@v1
id: task_release_tags_create
if: ( github.event_name != 'workflow_dispatch' && inputs.DRY_RUN == false )
with:
tag: "${{ env.IMAGE_VERSION }}"
tag_exists_error: false
message: '${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}'
gpg_private_key: ${{ secrets.ADMINSERV_GPG_KEY_ASC }}
gpg_passphrase: ${{ secrets.ADMINSERV_GPG_PASSPHRASE }}
# #
# Job Docker Release Gitea
# #
job-docker-release-gitea:
name: >-
📦 Release Gitea
# runs-on: ubuntu-latest
runs-on: apollo-x64
timeout-minutes: 10
permissions:
contents: write
packages: write
attestations: write
id-token: write
needs: [ job-docker-release-tags-create ]
steps:
# #
# Release Gitea Start Amd64
# #
- name: '🏳️ Start'
id: task_release_gi_start
run: |
echo "Starting Gitea docker release"
# #
# Release Gitea Checkout
# #
- name: '✅ Checkout'
id: task_release_gh_checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# #
# Release Gitea Get Timestamp
# #
- name: '🕛 Get Timestamp'
id: task_release_set_timestamp
run: |
echo "IMAGE_VERSION_1DIGIT=`echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-1`" >> ${GITHUB_ENV} # 1
echo "IMAGE_VERSION_2DIGIT=`echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-2`" >> ${GITHUB_ENV} # 1.0
echo "REGISTRY_REPO_ORG_AUTHOR_LC=`echo ${{ env.IMAGE_GITEA_AUTHOR }}/${{ env.IMAGE_NAME }} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} # thebinaryninja/tvapp2
echo "REGISTRY_REPO_AUTHOR_LC=`echo ${{ env.IMAGE_GITEA_AUTHOR }} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} # thebinaryninja
echo "DOCKER_SHA=${GITHUB_SHA}" >> $GITHUB_ENV # 71fad013cfce9116ec62779e4a7e627fe4c33627
echo "NOW=$(date +'%m-%d-%Y %H:%M:%S')" >> $GITHUB_ENV # 02-25-2025 12:49:48
echo "NOW_SHORT=$(date +'%m-%d-%Y')" >> $GITHUB_ENV # 02-25-2025
echo "NOW_LONG=$(date +'%m-%d-%Y %H:%M')" >> $GITHUB_ENV # 02-25-2025 12:49
echo "NOW_DOCKER_LABEL=$(date +'%Y%m%d')" >> $GITHUB_ENV # 20250225
echo "NOW_DOCKER_TS=$(date -u +'%FT%T.%3NZ')" >> $GITHUB_ENV # 2025-02-25T12:50:11.569Z
# #
# Release Gitea Install Dependencies
# #
- name: '📦 Install Dependencies'
id: task_release_gi_dependencies
run:
sudo apt-get install -qq dos2unix
# #
# Release Gitea Execute dos2unix
# #
- name: '🔐 Apply dos2unix'
id: task_release_gi_dos2unix
run: |
echo "⚠️⚠️⚠️ Running DOS2UNIX ⚠️⚠️⚠️"
find ./ \( -path "./.git" -o -path "./docs" -o -path "./.github" -o -path "*.png" -o -path "*.jpg" \) -prune -o -name '*' -print | xargs dos2unix --
echo "✅✅✅ Completed DOS2UNIX ✅✅✅"
# #
# Release Gitea Fix Permissions
# #
- name: '#️⃣ Manage Permissions'
id: task_release_gi_permissions
run: |
find ./ -name 'run' -exec chmod 755 {} \;
WRONG_PERM=$(find ./ -path "./.git" -prune -o \( -name "run" -o -name "finish" -o -name "check" \) -not -perm -u=x,g=x,o=x -print)
if [ -n "${WRONG_PERM}" ]; then
echo "⚠️⚠️⚠️ Permissions are invalid ⚠️⚠️⚠️"
for i in ${WRONG_PERM}; do
echo "::error file=${i},line=1,title=Missing Executable Bit::This file needs to be set as executable!"
done
exit 1
else
echo "✅✅✅ Executable permissions are OK ✅✅✅"
fi
# #
# Release Gitea QEMU Amd64
# #
- name: '⚙️ Set up QEMU'
id: task_release_gi_qemu
uses: docker/setup-qemu-action@v3
# #
# Release Gitea Setup BuildX Amd64
# #
- name: '⚙️ Setup Buildx'
id: task_release_gi_buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
driver-opts: 'image=moby/buildkit:latest'
# #
# Release Gitea Registry Login Amd64
# #
- name: '⚙️ Login to Gitea'
id: task_release_gi_registry
uses: docker/login-action@v3
with:
registry: ${{ env.IMAGE_GITEA_WEBSITE }}
username: ${{ env.IMAGE_GITEA_USERNAME }}
password: ${{ secrets.ORG_BINARYNINJA_GITEA_TOKEN }}
# #
# Release Gitea Read Readme
#
# @usage org.opencontainers.image.description=${{ steps.task_release_gi_readme_cache.outputs.content }}
# #
- name: '📄 Cache README.md'
id: task_release_gi_readme_cache
uses: actions/github-script@v7
with:
github-token: ${{ secrets.ORG_BINARYNINJA_TOKEN_CL }}
script: |
'use strict'
const { promises: fs } = require('fs')
const main = async () => {
const path = "README.md"
let content = await fs.readFile(path, 'utf8')
core.setOutput('content', content)
}
main().catch(err => core.setFailed(err.message))
# #
# Release Gitea Meta amd64
#
# this version of meta needs one entry for amd64 and one for arm64 because each
# image needs to be uploaded manually, and then merged into a single platform.
# #
- name: '🔨 Gitea: Meta amd64'
id: task_release_gi_meta_amd64
uses: docker/metadata-action@v5
with:
images: |
${{ env.IMAGE_GITEA_WEBSITE }}/${{ env.REGISTRY_REPO_AUTHOR_LC }}/${{ env.IMAGE_NAME }}
tags: |
# tag latest = yes ( no dev )
type=raw,value=latest,enable=${{ !inputs.DEV_RELEASE }}
# tag add tag-amd64 ( PR or push only )
type=ref,enable=${{ github.event_name == 'pull_request' || github.event_name == 'push' }},priority=600,prefix=,suffix=-amd64,event=tag
# tag add 1.0.0-amd64 ( dispatch only + no dev )
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=500,prefix=,suffix=-amd64,value=${{ env.IMAGE_VERSION }}
# tag add 1.0.0 ( dispatch only + no dev )
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=450,prefix=,suffix=,value=${{ env.IMAGE_VERSION }}
# tag add 1.0 ( dispatch only + no dev )
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=425,prefix=,suffix=,value=${{ env.IMAGE_VERSION_2DIGIT }}
# tag add 1 ( dispatch only + no dev )
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=400,prefix=,suffix=,value=${{ env.IMAGE_VERSION_1DIGIT }}
# dispatch add development-amd64 ( dispatch only + only dev )
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == true }},priority=300,prefix=development-,suffix=,value=amd64
# tag add development ( amd64 + only dev )
type=raw,enable=${{ inputs.DEV_RELEASE }},priority=400,prefix=,suffix=,value=development
flavor: |
latest=false
labels: |
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
org.opencontainers.image.licenses=MIT
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.vendor=${{ env.REGISTRY_REPO_AUTHOR_LC }}
org.opencontainers.image.ref.name=${{ github.ref_name }}
org.opencontainers.image.development=${{ inputs.DEV_RELEASE == true && 'true' || 'false' }}
org.opencontainers.image.registry=gitea
org.tvapp2.image.build-version="Version:- ${{ env.IMAGE_VERSION }} Date:- ${{ env.NOW_DOCKER_LABEL }}"
annotations: |
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
org.opencontainers.image.licenses=MIT
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.vendor=${{ env.REGISTRY_REPO_AUTHOR_LC }}
org.opencontainers.image.ref.name=${{ github.ref_name }}
org.opencontainers.image.development=${{ inputs.DEV_RELEASE == true && 'true' || 'false' }}
org.opencontainers.image.registry=gitea
org.tvapp2.image.build-version="Version:- ${{ env.IMAGE_VERSION }} Date:- ${{ env.NOW_DOCKER_LABEL }}"
# #
# Release Gitea Meta arm64
#
# this version of meta needs one entry for amd64 and one for arm64 because each
# image needs to be uploaded manually, and then merged into a single platform.
# #
- name: '🔨 Gitea: Meta arm64'
id: task_release_gi_meta_arm64
uses: docker/metadata-action@v5
with:
images: |
${{ env.IMAGE_GITEA_WEBSITE }}/${{ env.REGISTRY_REPO_AUTHOR_LC }}/${{ env.IMAGE_NAME }}
tags: |
# tag latest = no
type=raw,value=latest,enable=false
# tag add tag-arm64
type=ref,enable=${{ github.event_name == 'pull_request' || github.event_name == 'push' }},priority=600,prefix=,suffix=-arm64,event=tag
# tag add 1.0.0-arm64 ( dispatch only + no dev )
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=500,prefix=,suffix=-arm64,value=${{ env.IMAGE_VERSION }}
# dispatch add development-arm64 ( dispatch only + only dev )
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == true }},priority=300,prefix=,suffix=-arm64,value=development
flavor: |
latest=false
labels: |
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
org.opencontainers.image.licenses=MIT
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.vendor=${{ env.REGISTRY_REPO_AUTHOR_LC }}
org.opencontainers.image.ref.name=${{ github.ref_name }}
org.opencontainers.image.development=${{ inputs.DEV_RELEASE == true && 'true' || 'false' }}
org.opencontainers.image.registry=gitea
org.tvapp2.image.build-version="Version:- ${{ env.IMAGE_VERSION }} Date:- ${{ env.NOW_DOCKER_LABEL }}"
annotations: |
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
org.opencontainers.image.licenses=MIT
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.vendor=${{ env.REGISTRY_REPO_AUTHOR_LC }}
org.opencontainers.image.ref.name=${{ github.ref_name }}
org.opencontainers.image.development=${{ inputs.DEV_RELEASE == true && 'true' || 'false' }}
org.opencontainers.image.registry=gitea
org.tvapp2.image.build-version="Version:- ${{ env.IMAGE_VERSION }} Date:- ${{ env.NOW_DOCKER_LABEL }}"
# #
# Release Gitea Meta Release
#
# this version of meta needs one entry for amd64 and one for arm64 because each
# image needs to be uploaded manually, and then merged into a single platform.
#
# this meta action is for the final image; which has both platforms merged and
# will be the final release.
# #
- name: '🔨 Gitea: Meta Release'
id: task_release_gi_meta_release
uses: docker/metadata-action@v5
with:
images: |
${{ env.IMAGE_GITEA_WEBSITE }}/${{ env.REGISTRY_REPO_AUTHOR_LC }}/${{ env.IMAGE_NAME }}
tags: |
# tag latest = yes ( no dev )
type=raw,value=latest,enable=${{ !inputs.DEV_RELEASE }}
# tag add pr tag ( PR or push only )
type=ref,enable=${{ github.event_name == 'pull_request' || github.event_name == 'push' }},priority=600,prefix=,suffix=,event=tag
# tag add 1.0.0 ( dispatch only + no dev )
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=450,prefix=,suffix=,value=${{ env.IMAGE_VERSION }}
# tag add 1.0 ( dispatch only + no dev )
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=425,prefix=,suffix=,value=${{ env.IMAGE_VERSION_2DIGIT }}
# tag add 1 ( dispatch only + no dev )
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=400,prefix=,suffix=,value=${{ env.IMAGE_VERSION_1DIGIT }}
# tag add development ( dispatch only + only dev )
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == true }},priority=300,prefix=,suffix=,value=development
# tag add development ( amd64 + only dev )
type=raw,enable=${{ inputs.DEV_RELEASE }},priority=400,prefix=,suffix=,value=development
flavor: |
latest=false
labels: |
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
org.opencontainers.image.licenses=MIT
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.vendor=${{ env.REGISTRY_REPO_AUTHOR_LC }}
org.opencontainers.image.ref.name=${{ github.ref_name }}
org.opencontainers.image.development=${{ inputs.DEV_RELEASE == true && 'true' || 'false' }}
org.opencontainers.image.registry=gitea
org.tvapp2.image.build-version="Version:- ${{ env.IMAGE_VERSION }} Date:- ${{ env.NOW_DOCKER_LABEL }}"
annotations: |
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
org.opencontainers.image.licenses=MIT
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.vendor=${{ env.REGISTRY_REPO_AUTHOR_LC }}
org.opencontainers.image.ref.name=${{ github.ref_name }}
org.opencontainers.image.development=${{ inputs.DEV_RELEASE == true && 'true' || 'false' }}
org.opencontainers.image.registry=gitea
org.tvapp2.image.build-version="Version:- ${{ env.IMAGE_VERSION }} Date:- ${{ env.NOW_DOCKER_LABEL }}"
# #
# Release Gitea Build and Push Amd64
# #
- name: '📦 Build & Push (linux/amd64)'
id: task_release_gi_push_amd64
uses: docker/build-push-action@v6
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
with:
context: .
file: Dockerfile
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.task_release_gi_meta_amd64.outputs.labels }}
tags: |
${{ steps.task_release_gi_meta_amd64.outputs.tags }}
provenance: false
sbom: false
build-args: |-
ARCH=amd64
VERSION=${{ env.IMAGE_VERSION }}
BUILDDATE=${{ env.NOW_DOCKER_LABEL }}
# #
# Release Gitea Export Digest Amd64
# #
- name: '📄 Export Digest (linux/amd64)'
id: task_release_gi_digest_export_amd64
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
run: |
mkdir -p /tmp/build-digest-amd64
digest="${{ steps.task_release_gi_push_amd64.outputs.digest }}"
digest="${digest#sha256:}"
touch "/tmp/build-digest-amd64/$digest"
shell: bash
# #
# Release Gitea Upload Digest Amd64
# #
- name: '🔼 Upload Digest (linux/amd64)'
id: task_release_gi_digest_upload_amd64
uses: actions/upload-artifact@v4
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
with:
name: digest-amd64
path: /tmp/build-digest-amd64/*
if-no-files-found: error
retention-days: 10
# #
# Release Gitea Build and Push Arm64
# #
- name: '📦 Build & Push (linux/arm64)'
id: task_release_gi_push_arm64
uses: docker/build-push-action@v6
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
with:
context: .
file: Dockerfile
platforms: linux/arm64
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.task_release_gi_meta_arm64.outputs.labels }}
tags: |
${{ steps.task_release_gi_meta_arm64.outputs.tags }}
provenance: false
sbom: false
build-args: |-
ARCH=arm64
VERSION=${{ env.IMAGE_VERSION }}
BUILDDATE=${{ env.NOW_DOCKER_LABEL }}
# #
# Release Gitea Export Digest Arm64
# #
- name: '📄 Export Digest (linux/arm64)'
id: task_release_gi_digest_export_arm64
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
run: |
mkdir -p /tmp/build-digest-arm64
digest="${{ steps.task_release_gi_push_arm64.outputs.digest }}"
digest="${digest#sha256:}"
touch "/tmp/build-digest-arm64/$digest"
shell: bash
# #
# Release Gitea Upload Digest Arm64
# #
- name: '🔼 Upload Digest (linux/arm64)'
id: task_release_gi_digest_upload_arm64
uses: actions/upload-artifact@v4
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
with:
name: digest-arm64
path: /tmp/build-digest-arm64/*
if-no-files-found: error
retention-days: 10
# #
# Release Gitea Push Manifest
# #
- name: '📦 Push Manifest'
id: task_release_gi_manifest
uses: int128/docker-manifest-create-action@v2
with:
tags: |
${{ steps.task_release_gi_meta_release.outputs.tags }}
sources: |
${{ env.IMAGE_GITEA_WEBSITE }}/${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}@${{ steps.task_release_gi_push_amd64.outputs.digest }}
${{ env.IMAGE_GITEA_WEBSITE }}/${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}@${{ steps.task_release_gi_push_arm64.outputs.digest }}
index-annotations: |
${{ steps.task_release_gi_meta_release.outputs.labels }}
# #
# Release Gitea Checkpoint
# #
- name: '⚠️ Checkpoint'
id: task_release_gi_checkpoint
run: |
echo ""
echo "[ GITHUB ] ---------------------------------------------------------------------------------------------"
echo "github.actor.............................. ${{ github.actor }}"
echo "github.ref ............................... ${{ github.ref }}"
echo "github.ref_name .......................... ${{ github.ref_name }}"
echo "github.event_name ........................ ${{ github.event_name }}"
echo "github.repository_owner .................. ${{ github.repository_owner }}"
echo "github.repository ........................ ${{ github.repository }}"
echo ""
echo "[ INPUTS ] ---------------------------------------------------------------------------------------------"
echo "inputs.IMAGE_NAME ........................ ${{ inputs.IMAGE_NAME }}"
echo "inputs.IMAGE_VERSION ..................... ${{ inputs.IMAGE_VERSION }}"
echo "inputs.IMAGE_GITEA_USERNAME .............. ${{ inputs.IMAGE_GITEA_AUTHOR }}"
echo "inputs.IMAGE_GITEA_USERNAME .............. ${{ inputs.IMAGE_GITEA_USERNAME }}"
echo "inputs.IMAGE_GITEA_WEBSITE ............... ${{ inputs.IMAGE_GITEA_WEBSITE }}"
echo "inputs.DEV_RELEASE ....................... ${{ inputs.DEV_RELEASE }}"
echo "inputs.DRY_RUN ........................... ${{ inputs.DRY_RUN }}"
echo ""
echo "[ ENV ] ------------------------------------------------------------------------------------------------"
echo "env.IMAGE_NAME ........................... ${{ env.IMAGE_NAME }}"
echo "env.IMAGE_VERSION ........................ ${{ env.IMAGE_VERSION }}"
echo "env.IMAGE_VERSION_1DIGIT ................. ${{ env.IMAGE_VERSION_1DIGIT }}"
echo "env.IMAGE_VERSION_2DIGIT ................. ${{ env.IMAGE_VERSION_2DIGIT }}"
echo "env.IMAGE_GITEA_AUTHOR ................... ${{ env.IMAGE_GITEA_AUTHOR }}"
echo "env.IMAGE_GITEA_USERNAME ................. ${{ env.IMAGE_GITEA_USERNAME }}"
echo "env.IMAGE_GITEA_WEBSITE .................. ${{ env.IMAGE_GITEA_WEBSITE }}"
echo "env.NOW .................................. ${{ env.NOW }}"
echo "env.NOW_SHORT ............................ ${{ env.NOW_SHORT }}"
echo "env.NOW_LONG ............................. ${{ env.NOW_LONG }}"
echo "env.NOW_DOCKER_LABEL ..................... ${{ env.NOW_DOCKER_LABEL }}"
echo "env.NOW_DOCKER_TS ........................ ${{ env.NOW_DOCKER_TS }}"
echo "env.REGISTRY_REPO_ORG_AUTHOR_LC .......... ${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}"
echo "env.REGISTRY_REPO_AUTHOR_LC .............. ${{ env.REGISTRY_REPO_AUTHOR_LC }}"
echo "env.DOCKER_SHA ........................... ${{ env.DOCKER_SHA }}"
echo ""
echo "[ DOCKER IMAGES ] --------------------------------------------------------------------------------------"
echo "registry ................................. Gitea"
echo "(amd64) tags ............................. ${{ steps.task_release_gi_meta_amd64.outputs.tags }}"
echo "(amd64) labels ........................... ${{ steps.task_release_gi_meta_amd64.outputs.labels }}"
echo "(amd64) digest ........................... ${{ steps.task_release_gi_push_amd64.outputs.digest }}"
echo ""
echo "(arm64) tags ............................. ${{ steps.task_release_gi_meta_arm64.outputs.tags }}"
echo "(arm64) labels ........................... ${{ steps.task_release_gi_meta_arm64.outputs.labels }}"
echo "(arm64) digest ........................... ${{ steps.task_release_gi_push_arm64.outputs.digest }}"
echo ""
echo "(release) tags ........................... ${{ steps.task_release_gi_meta_release.outputs.tags }}"
echo "(release) labels ......................... ${{ steps.task_release_gi_meta_release.outputs.labels }}"
echo ""
echo "[ DOCKER DIGESTS ] -------------------------------------------------------------------------------------"
echo "docker image id (amd64) .................. ${{ steps.task_release_gi_push_amd64.outputs.imageid }}"
echo "docker digest (amd64) .................... ${{ steps.task_release_gi_push_amd64.outputs.digest }}"
echo "docker image id (arm64) .................. ${{ steps.task_release_gi_push_arm64.outputs.imageid }}"
echo "docker digest (arm64) .................... ${{ steps.task_release_gi_push_arm64.outputs.digest }}"
# #
# Release Gitea 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 Gitea Notify Gitea
# #
- name: '🔔 Send Discord Webhook Message'
uses: tsickert/discord-webhook@v7.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: "⚙️ ${{ github.workflow_ref }}"
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg'
embed-description: |
### 📦 Deploy (Gitea) ${{ job.status == 'success' && '✅' || '❌' }} `${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}`
${{ inputs.DEV_RELEASE == true && '### ⚠️⚠️ Development / Pre-release ⚠️⚠️' || '' }}
A new version of the docker container `${{ env.IMAGE_NAME }}` has been released from Github to Gitea. The image is available at:
- https://${{ env.IMAGE_GITEA_WEBSITE }}/${{ env.IMAGE_GITEA_USERNAME }}/${{ env.IMAGE_NAME }}/packages
- Version: `${{ env.IMAGE_VERSION }}`
- Release Type: `${{ inputs.DEV_RELEASE == true && '⚠️⚠️ Development / Pre-release ⚠️⚠️' || 'Stable' }}`
- Pull: `docker pull ${{ env.IMAGE_GITEA_WEBSITE }}/${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}:${{ inputs.DEV_RELEASE == true && 'development' || env.IMAGE_VERSION }}`
- Pull (amd64): `docker pull ${{ env.IMAGE_GITEA_WEBSITE }}/${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}@${{ steps.task_release_gi_push_amd64.outputs.digest }}`
- Pull (arm64): `docker pull ${{ env.IMAGE_GITEA_WEBSITE }}/${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}@${{ steps.task_release_gi_push_arm64.outputs.digest }}`
- Dry Run: `${{ inputs.DRY_RUN }}`
- Source: `Gitea` https://${{ env.IMAGE_GITEA_WEBSITE }}/${{ env.IMAGE_GITEA_USERNAME }}/${{ env.IMAGE_NAME }}/packages
- Docker Image: `${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}`
- Branch: `${{ github.ref_name }}`
- Workflow: `${{ github.workflow }} (#${{github.run_number}})`
- Runner: `${{ runner.name }}`
- Triggered By: `${{ github.actor }}`
- Status: `${{ job.status == 'success' && '✅ Successful' || '❌ Failed' }}`
### Tags
-# This docker image will use the following tags:
```
${{ steps.task_release_gi_meta_amd64.outputs.tags }}
```
### Labels
-# This docker image embeds the following labels:
```
${{ steps.task_release_gi_meta_amd64.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.repository_owner }}"
embed-author-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-author-icon-url: "https://avatars.githubusercontent.com/u/200161462"

View File

@@ -1,783 +0,0 @@
# #
# @type github workflow
# @author Aetherinox
# @url https://github.com/Aetherinox
# @usage deploys docker container to Gitea.com and send message to discord
# upload this workflow to both the `main` branch of the tvapp2 repository
#
# @secrets secrets.SELF_TOKEN self github personal access token (fine-grained)
# secrets.SELF_TOKEN_CL self github personal access token (classic)
# secrets.NPM_TOKEN self npmjs access token
# secrets.PYPI_API_TOKEN self Pypi API token (production site) - https://pypi.org/
# secrets.PYPI_API_TEST_TOKEN self Pypi API token (test site) - https://test.pypi.org/
# secrets.SELF_DOCKERHUB_TOKEN self Dockerhub token
# secrets.ORG_BINARYNINJA_TOKEN org github personal access token (fine-grained)
# secrets.ORG_BINARYNINJA_TOKEN_CL org github personal access token (classic)
# secrets.ORG_BINARYNINJA_DOCKERHUB_TOKEN org dockerhub secret
# secrets.ORG_BINARYNINJA_GITEA_TOKEN org gitea personal access token (classic) with package:write permission
# secrets.BINARYSERV_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
# secrets.BINARYSERV_GPG_PASSPHRASE bot gpg private key passphrase
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES discord webhook to report release notifications from github to discord
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKFLOWS discord webhook to report workflow notifications from github to discord
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_UPDATES discord webhook to report activity notifications from github to discord
#
# @local these workflows can be tested locally through the use of `act`
# https://github.com/nektos/act
# Extract act to folder
# Add system env var with path to act.exe
# Run the commands:
# git pull https://github.com/username/repo
# act -W .github/workflows/deploy-docker-giteacom.yml -P ubuntu-latest=catthehacker/ubuntu:full-22.04
# act -W .github/workflows/deploy-docker-giteacom.yml -s TOKEN_CL=XXXXXXXXXX --pull=false
# #
name: "📦 Deploy Docker Gitea.com"
run-name: "📦 Deploy Docker Gitea.com"
# #
# Triggers
# #
on:
# #
# Trigger Workflow Dispatch
#
# If any values are not provided, will use fallback env variable
# #
workflow_dispatch:
inputs:
# #
# Image Name
#
# used in github image path
# gitea.com/${{ env.IMAGE_GITEA_AUTHOR }}/${{ env.IMAGE_NAME }}
# #
IMAGE_NAME:
description: '📦 Image Name'
required: true
default: 'tvapp2'
type: string
# #
# Image Version
#
# used to create new release tag, and add version to docker image name
# #
IMAGE_VERSION:
description: '🏷️ Image Version'
required: true
default: '1.0.0'
type: string
# #
# Gitea Author
#
# used in github image path
# gitea.com/${{ env.IMAGE_GITEA_AUTHOR }}/${{ env.IMAGE_NAME }}
# #
IMAGE_GITEA_AUTHOR:
description: '🪪 Image Author'
required: true
default: 'BinaryNinja'
type: string
# #
# Gitea Username
#
# this is the user to sign into gitea as.
# #
IMAGE_GITEA_USERNAME:
description: '🪪 Gitea Username'
required: true
default: 'aetherinox'
type: string
# #
# Gitea Website
#
# this is the gitea website / url to push to
# #
IMAGE_GITEA_WEBSITE:
description: '🌎 Gitea Website'
required: true
default: 'gitea.com'
type: string
# #
# true no changes to the repo will be made
# false workflow will behave normally, and push any changes detected to the files
# #
DRY_RUN:
description: '🐛 Dry Run (Debug)'
required: true
default: false
type: boolean
# #
# true released version will be marked as a development build and will have the v1.x.x-development tag instead of -latest
# false release version will be marked with -latest docker tag
# #
DEV_RELEASE:
description: '🧪 Development Release'
required: true
default: false
type: boolean
# #
# Trigger Push
# #
push:
tags:
- '*'
# #
# Environment Vars
# #
env:
IMAGE_NAME: ${{ github.event.inputs.IMAGE_NAME || 'tvapp2' }}
IMAGE_VERSION: ${{ github.event.inputs.IMAGE_VERSION || '1.0.0' }}
IMAGE_GITEA_AUTHOR: ${{ github.event.inputs.IMAGE_GITEA_AUTHOR || 'BinaryNinja' }}
IMAGE_GITEA_USERNAME: ${{ github.event.inputs.IMAGE_GITEA_USERNAME || 'BinaryNinja' }}
IMAGE_GITEA_WEBSITE: ${{ github.event.inputs.IMAGE_GITEA_WEBSITE || 'gitea.com' }}
BOT_NAME_1: EuropaServ
BOT_NAME_2: BinaryServ
BOT_NAME_DEPENDABOT: dependabot[bot]
BOT_NAME_RENOVATE: renovate[bot]
# #
# Jobs
#
# The way pushed docker containers on Gitea work, the most recent image built goes at the top.
# We will use the order below which builds the :latest image last so that it appears at the very
# top of the packages page.
# #
jobs:
# #
# Job Create Tag
# #
job-docker-release-tags-create:
name: >-
📦 Release Create Tag
# runs-on: ubuntu-latest
runs-on: apollo-x64
timeout-minutes: 4
permissions:
contents: write
packages: write
attestations: write
id-token: write
steps:
# #
# Release Tags Start
# #
- name: '🏳️ Start'
id: task_release_tags_start
run: |
echo "Generating Docker Image on ${{ env.IMAGE_GITEA_WEBSITE }}"
echo "Using original Gitea workflow without manifest"
# #
# Release Tags Checkout
# #
- name: '✅ Checkout'
id: task_release_tags_checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# #
# Release Tags Fix Permissions
# #
- name: '#️⃣ Manage Permissions'
id: task_release_tags_permissions
run: |
find ./ -name 'run' -exec chmod 755 {} \;
WRONG_PERM=$(find ./ -path "./.git" -prune -o \( -name "run" -o -name "finish" -o -name "check" \) -not -perm -u=x,g=x,o=x -print)
if [ -n "${WRONG_PERM}" ]; then
echo "⚠️⚠️⚠️ Permissions are invalid ⚠️⚠️⚠️"
for i in ${WRONG_PERM}; do
echo "::error file=${i},line=1,title=Missing Executable Bit::This file needs to be set as executable!"
done
exit 1
else
echo "✅✅✅ Executable permissions are OK ✅✅✅"
fi
# #
# Release Tags Create Tag
#
# only called in dispatch mode
# #
- uses: rickstaa/action-create-tag@v1
id: task_release_tags_create
if: ( github.event_name != 'workflow_dispatch' && inputs.DRY_RUN == false )
with:
tag: "${{ env.IMAGE_VERSION }}"
tag_exists_error: false
message: '${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}'
gpg_private_key: ${{ secrets.ADMINSERV_GPG_KEY_ASC }}
gpg_passphrase: ${{ secrets.ADMINSERV_GPG_PASSPHRASE }}
# #
# Job Docker Release Gitea Arm64
# #
job-docker-release-gitea-arm64:
name: >-
📦 Release Gitea Arm64
# runs-on: ubuntu-latest
runs-on: apollo-x64
timeout-minutes: 10
needs: [ job-docker-release-tags-create ]
permissions:
contents: write
packages: write
attestations: write
id-token: write
steps:
# #
# Release Gitea Start Arm64
# #
- name: '🏳️ Start'
id: task_release_gi_start
run: |
echo "Generating Docker Image on ${{ env.IMAGE_GITEA_WEBSITE }} arm64"
echo "Using original Gitea workflow without manifest"
# #
# Release Gitea Checkout Arm64
# #
- name: '✅ Checkout'
id: task_release_gh_checkout
uses: actions/checkout@v4
# #
# Release Gitea Get Timestamp
# #
- name: '🕛 Get Timestamp'
id: task_release_set_timestamp
run: |
echo "IMAGE_VERSION_1DIGIT=`echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-1`" >> ${GITHUB_ENV} # 1
echo "IMAGE_VERSION_2DIGIT=`echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-2`" >> ${GITHUB_ENV} # 1.0
echo "REGISTRY_REPO_ORG_AUTHOR_LC=`echo ${{ env.IMAGE_GITEA_AUTHOR }}/${{ env.IMAGE_NAME }} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} # binaryninja/tvapp2
echo "REGISTRY_REPO_AUTHOR_LC=`echo ${{ env.IMAGE_GITEA_AUTHOR }} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} # binaryninja
echo "DOCKER_SHA=${GITHUB_SHA}" >> $GITHUB_ENV # 71fad013cfce9116ec62779e4a7e627fe4c33627
echo "NOW=$(date +'%m-%d-%Y %H:%M:%S')" >> $GITHUB_ENV # 02-25-2025 12:49:48
echo "NOW_SHORT=$(date +'%m-%d-%Y')" >> $GITHUB_ENV # 02-25-2025
echo "NOW_LONG=$(date +'%m-%d-%Y %H:%M')" >> $GITHUB_ENV # 02-25-2025 12:49
echo "NOW_DOCKER_LABEL=$(date +'%Y%m%d')" >> $GITHUB_ENV # 20250225
echo "NOW_DOCKER_TS=$(date -u +'%FT%T.%3NZ')" >> $GITHUB_ENV # 2025-02-25T12:50:11.569Z
# #
# Release Gitea Install Dependencies
# #
- name: '📦 Install Dependencies'
id: task_release_gi_dependencies
run:
sudo apt-get install -qq dos2unix
# #
# Release Gitea Execute dos2unix
# #
- name: '🔐 Apply dos2unix'
id: task_release_gi_dos2unix
run: |
echo "⚠️⚠️⚠️ Running DOS2UNIX ⚠️⚠️⚠️"
find ./ \( -path "./.git" -o -path "./docs" -o -path "./.github" -o -path "*.png" -o -path "*.jpg" \) -prune -o -name '*' -print | xargs dos2unix --
echo "✅✅✅ Completed DOS2UNIX ✅✅✅"
# #
# Release Gitea Fix Permissions
# #
- name: '#️⃣ Manage Permissions'
id: task_release_gi_permissions
run: |
find ./ -name 'run' -exec chmod 755 {} \;
WRONG_PERM=$(find ./ -path "./.git" -prune -o \( -name "run" -o -name "finish" -o -name "check" \) -not -perm -u=x,g=x,o=x -print)
if [ -n "${WRONG_PERM}" ]; then
echo "⚠️⚠️⚠️ Permissions are invalid ⚠️⚠️⚠️"
for i in ${WRONG_PERM}; do
echo "::error file=${i},line=1,title=Missing Executable Bit::This file needs to be set as executable!"
done
exit 1
else
echo "✅✅✅ Executable permissions are OK ✅✅✅"
fi
# #
# Release Gitea QEMU Arm64
# #
- name: '⚙️ Set up QEMU'
id: task_release_gi_qemu
uses: docker/setup-qemu-action@v3
# #
# Release Gitea Setup BuildX Arm64
# #
- name: '⚙️ Setup Buildx'
id: task_release_gi_buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
driver-opts: 'image=moby/buildkit:latest'
# #
# Release Gitea Registry Login Arm64
# #
- name: '⚙️ Login to Gitea'
id: task_release_gi_registry
uses: docker/login-action@v3
with:
registry: ${{ env.IMAGE_GITEA_WEBSITE }}
username: ${{ env.IMAGE_GITEA_USERNAME }}
password: ${{ secrets.ORG_BINARYNINJA_GITEACOM_TOKEN }}
# #
# Release Gitea Meta Arm64
# #
- name: '🔨 Gitea: Meta - Arm64'
id: task_release_gi_meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.IMAGE_GITEA_WEBSITE }}/${{ env.REGISTRY_REPO_AUTHOR_LC }}/${{ env.IMAGE_NAME }}
tags: |
# latest no
type=raw,value=latest,enable=false
# tag add arm64
# type=raw,enable=true,priority=1000,value=arm64
# dispatch add x1.x.x-arm64
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=300,prefix=,suffix=-arm64,value=${{ env.IMAGE_VERSION }}
# dispatch add arm64-development
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == true }},priority=300,prefix=,suffix=-arm64,value=development
# tag add tag-arm64
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.created=${{ env.NOW_DOCKER_TS }}
org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
org.opencontainers.image.licenses=MIT
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.vendor=${{ env.REGISTRY_REPO_AUTHOR_LC }}
org.opencontainers.image.ref.name=${{ github.ref_name }}
org.opencontainers.image.development=${{ inputs.DEV_RELEASE == true && 'true' || 'false' }}
org.tvapp2.image.build-version="Version:- ${{ env.IMAGE_VERSION }} Date:- ${{ env.NOW_DOCKER_LABEL }}"
# #
# Release Gitea Build and Push Arm64
# #
- name: '📦 Build & Push (linux/arm64)'
id: task_release_gi_push
uses: docker/build-push-action@v6
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
with:
context: .
file: Dockerfile.aarch64
platforms: linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.task_release_gi_meta.outputs.tags }}
labels: ${{ steps.task_release_gi_meta.outputs.labels }}
provenance: false
# #
# Release Gitea Checkpoint Arm64
# #
- name: '⚠️ Checkpoint'
id: task_release_gi_checkpoint
run: |
echo "registry ................................. Gitea"
echo "github.actor.............................. ${{ github.actor }}"
echo "github.ref ............................... ${{ github.ref }}"
echo "github.ref_name .......................... ${{ github.ref_name }}"
echo "github.event_name ........................ ${{ github.event_name }}"
echo "github.repository_owner .................. ${{ github.repository_owner }}"
echo "github.repository ........................ ${{ github.repository }}"
echo "inputs.DRY_RUN ........................... ${{ inputs.DRY_RUN }}"
echo "env.AUTHOR ............................... ${{ env.REGISTRY_REPO_AUTHOR_LC }}"
echo "tags ..................................... ${{ steps.task_release_gi_meta.outputs.tags }}"
echo "labels ................................... ${{ steps.task_release_gi_meta.outputs.labels }}"
echo "docker image ............................. ${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}"
echo "docker sha ............................... ${{ env.DOCKER_SHA }}"
echo "docker image id .......................... ${{ steps.task_release_gi_push.outputs.imageid }}"
echo "docker digest ............................ ${{ steps.task_release_gi_push.outputs.digest }}"
# #
# Release Gitea 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 Gitea Notify Gitea
# #
- name: '🔔 Send Discord Webhook Message'
id: task_release_notifications_discord_send
uses: tsickert/discord-webhook@v7.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: "⚙️ ${{ github.workflow_ref }}"
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 (Gitea) ${{ job.status == 'success' && '✅' || '❌' }} `${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}`
${{ inputs.DEV_RELEASE == true && '### ⚠️⚠️ Development / Pre-release ⚠️⚠️' || '' }}
A new version of the docker container `${{ env.IMAGE_NAME }}` has been released from Github to Gitea. The image is available at:
- https://${{ env.IMAGE_GITEA_WEBSITE }}/${{ env.IMAGE_GITEA_USERNAME }}/${{ env.IMAGE_NAME }}/packages
- Release Type: `${{ inputs.DEV_RELEASE == true && '⚠️⚠️ Development / Pre-release ⚠️⚠️' || 'Stable' }}`
- Pull: `docker pull ${{ env.IMAGE_GITEA_WEBSITE }}/${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}:${{ inputs.DEV_RELEASE == true && 'development' || env.IMAGE_VERSION }}-arm64`
- Pull: `docker pull ${{ env.IMAGE_GITEA_WEBSITE }}/${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}@${{ steps.task_release_gi_push.outputs.digest }}`
- Dry Run: `${{ inputs.DRY_RUN }}`
- Source: `Gitea` https://${{ env.IMAGE_GITEA_WEBSITE }}/${{ env.IMAGE_GITEA_USERNAME }}/${{ env.IMAGE_NAME }}/packages
- Docker Image: `${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}`
- Version: `${{ env.IMAGE_VERSION }}`
- Branch: `${{ github.ref_name }}`
- Workflow: `${{ github.workflow }} (#${{github.run_number}})`
- Runner: `${{ runner.name }}`
- Triggered By: `${{ github.actor }}`
- Status: `${{ job.status == 'success' && '✅ Successful' || '❌ Failed' }}`
### Tags
-# This docker image will use the following tags:
```
${{ steps.task_release_gi_meta.outputs.tags }}
```
### Labels
-# This docker image embeds the following labels:
```
${{ steps.task_release_gi_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.repository_owner }}"
embed-author-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-author-icon-url: "https://avatars.githubusercontent.com/u/200161462"
# #
# Job Docker Release Gitea Amd64
# #
job-docker-release-gitea-amd64:
name: >-
📦 Release Gitea Amd64
# runs-on: ubuntu-latest
runs-on: apollo-x64
timeout-minutes: 10
permissions:
contents: write
packages: write
attestations: write
id-token: write
needs: [ job-docker-release-tags-create, job-docker-release-gitea-arm64 ]
steps:
# #
# Release Gitea Start Amd64
# #
- name: '🏳️ Start'
id: task_release_gi_start
run: |
echo "Generating Docker Image on ${{ env.IMAGE_GITEA_WEBSITE }} amd64"
echo "Using original Gitea workflow without manifest"
# #
# Release Gitea Checkout
# #
- name: '✅ Checkout'
id: task_release_gh_checkout
uses: actions/checkout@v4
# #
# Release Gitea Get Timestamp
# #
- name: '🕛 Get Timestamp'
id: task_release_set_timestamp
run: |
echo "IMAGE_VERSION_1DIGIT=`echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-1`" >> ${GITHUB_ENV} # 1
echo "IMAGE_VERSION_2DIGIT=`echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-2`" >> ${GITHUB_ENV} # 1.0
echo "REGISTRY_REPO_ORG_AUTHOR_LC=`echo ${{ env.IMAGE_GITEA_AUTHOR }}/${{ env.IMAGE_NAME }} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} # binaryninja/tvapp2
echo "REGISTRY_REPO_AUTHOR_LC=`echo ${{ env.IMAGE_GITEA_AUTHOR }} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} # binaryninja
echo "DOCKER_SHA=${GITHUB_SHA}" >> $GITHUB_ENV # 71fad013cfce9116ec62779e4a7e627fe4c33627
echo "NOW=$(date +'%m-%d-%Y %H:%M:%S')" >> $GITHUB_ENV # 02-25-2025 12:49:48
echo "NOW_SHORT=$(date +'%m-%d-%Y')" >> $GITHUB_ENV # 02-25-2025
echo "NOW_LONG=$(date +'%m-%d-%Y %H:%M')" >> $GITHUB_ENV # 02-25-2025 12:49
echo "NOW_DOCKER_LABEL=$(date +'%Y%m%d')" >> $GITHUB_ENV # 20250225
echo "NOW_DOCKER_TS=$(date -u +'%FT%T.%3NZ')" >> $GITHUB_ENV # 2025-02-25T12:50:11.569Z
# #
# Release Gitea Install Dependencies
# #
- name: '📦 Install Dependencies'
id: task_release_gi_dependencies
run:
sudo apt-get install -qq dos2unix
# #
# Release Gitea Execute dos2unix
# #
- name: '🔐 Apply dos2unix'
id: task_release_gi_dos2unix
run: |
find ./ \( -path "./.git" -o -path "./docs" -o -path "./.github" -o -path "*.png" -o -path "*.jpg" \) -prune -o -name '*' -print | xargs dos2unix --
# #
# Release Gitea Fix Permissions
# #
- name: '#️⃣ Manage Permissions'
id: task_release_gi_permissions
run: |
find ./ -name 'run' -exec chmod 755 {} \;
WRONG_PERM=$(find ./ -path "./.git" -prune -o \( -name "run" -o -name "finish" -o -name "check" \) -not -perm -u=x,g=x,o=x -print)
if [ -n "${WRONG_PERM}" ]; then
echo "⚠️⚠️⚠️ Permissions are invalid ⚠️⚠️⚠️"
for i in ${WRONG_PERM}; do
echo "::error file=${i},line=1,title=Missing Executable Bit::This file needs to be set as executable!"
done
exit 1
else
echo "✅✅✅ Executable permissions are OK ✅✅✅"
fi
# #
# Release Gitea QEMU Amd64
# #
- name: '⚙️ Set up QEMU'
id: task_release_gi_qemu
uses: docker/setup-qemu-action@v3
# #
# Release Gitea Setup BuildX Amd64
# #
- name: '⚙️ Setup Buildx'
id: task_release_gi_buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
driver-opts: 'image=moby/buildkit:latest'
# #
# Release Gitea Registry Login Amd64
# #
- name: '⚙️ Login to Gitea'
id: task_release_gi_registry
uses: docker/login-action@v3
with:
registry: ${{ env.IMAGE_GITEA_WEBSITE }}
username: ${{ env.IMAGE_GITEA_USERNAME }}
password: ${{ secrets.ORG_BINARYNINJA_GITEACOM_TOKEN }}
# #
# Release Gitea Meta Amd64
# #
- name: '🔨 Gitea: Meta - Amd64'
id: task_release_gi_meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.IMAGE_GITEA_WEBSITE }}/${{ env.REGISTRY_REPO_AUTHOR_LC }}/${{ env.IMAGE_NAME }}
tags: |
# latest yes
type=raw,value=latest,enable=${{ !inputs.DEV_RELEASE }}
# tag add amd64
# type=raw,enable=true,priority=1000,value=amd64
# dispatch add x1.x.x-amd64
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=300,prefix=,suffix=-amd64,value=${{ env.IMAGE_VERSION }}
# dispatch add amd64-development
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == true }},priority=300,prefix=,suffix=-amd64,value=development
# tag add tag-amd64
type=ref,enable=${{ github.event_name == 'pull_request' || github.event_name == 'push' }},priority=600,prefix=,suffix=-amd64,event=tag
# add development tag to default architecture (amd64)
type=raw,enable=${{ inputs.DEV_RELEASE }},priority=400,prefix=,suffix=,value=development
flavor: |
latest=false
labels: |
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
org.opencontainers.image.licenses=MIT
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.vendor=${{ env.REGISTRY_REPO_AUTHOR_LC }}
org.opencontainers.image.ref.name=${{ github.ref_name }}
org.opencontainers.image.development=${{ inputs.DEV_RELEASE == true && 'true' || 'false' }}
org.tvapp2.image.build-version="Version:- ${{ env.IMAGE_VERSION }} Date:- ${{ env.NOW_DOCKER_LABEL }}"
annotations: |
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
org.opencontainers.image.licenses=MIT
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.vendor=${{ env.REGISTRY_REPO_AUTHOR_LC }}
org.opencontainers.image.ref.name=${{ github.ref_name }}
org.opencontainers.image.development=${{ inputs.DEV_RELEASE == true && 'true' || 'false' }}
org.tvapp2.image.build-version="Version:- ${{ env.IMAGE_VERSION }} Date:- ${{ env.NOW_DOCKER_LABEL }}"
# #
# Release Gitea Build and Push Amd64
# #
- name: '📦 Build & Push (linux/amd64)'
id: task_release_gi_push
uses: docker/build-push-action@v6
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
with:
context: .
file: Dockerfile
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.task_release_gi_meta.outputs.tags }}
labels: ${{ steps.task_release_gi_meta.outputs.labels }}
provenance: false
# #
# Release Gitea Checkpoint Amd64
# #
- name: '⚠️ Checkpoint'
id: task_release_gi_checkpoint
run: |
echo "registry ................................. Gitea"
echo "github.actor.............................. ${{ github.actor }}"
echo "github.ref ............................... ${{ github.ref }}"
echo "github.ref_name .......................... ${{ github.ref_name }}"
echo "github.event_name ........................ ${{ github.event_name }}"
echo "github.repository_owner .................. ${{ github.repository_owner }}"
echo "github.repository ........................ ${{ github.repository }}"
echo "inputs.DRY_RUN ........................... ${{ inputs.DRY_RUN }}"
echo "env.AUTHOR ............................... ${{ env.REGISTRY_REPO_AUTHOR_LC }}"
echo "tags ..................................... ${{ steps.task_release_gi_meta.outputs.tags }}"
echo "labels ................................... ${{ steps.task_release_gi_meta.outputs.labels }}"
echo "docker image ............................. ${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}"
echo "docker sha ............................... ${{ env.DOCKER_SHA }}"
echo "docker image id .......................... ${{ steps.task_release_gi_push.outputs.imageid }}"
echo "docker digest ............................ ${{ steps.task_release_gi_push.outputs.digest }}"
# #
# Release Gitea 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 Gitea Notify Gitea
# #
- name: '🔔 Send Discord Webhook Message'
uses: tsickert/discord-webhook@v7.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: "⚙️ ${{ github.workflow_ref }}"
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 (Gitea) ${{ job.status == 'success' && '✅' || '❌' }} `${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}`
${{ inputs.DEV_RELEASE == true && '### ⚠️⚠️ Development / Pre-release ⚠️⚠️' || '' }}
A new version of the docker container `${{ env.IMAGE_NAME }}` has been released from Github to Gitea. The image is available at:
- https://${{ env.IMAGE_GITEA_WEBSITE }}/${{ env.IMAGE_GITEA_USERNAME }}/${{ env.IMAGE_NAME }}/packages
- Release Type: `${{ inputs.DEV_RELEASE == true && '⚠️⚠️ Development / Pre-release ⚠️⚠️' || 'Stable' }}`
- Pull: `docker pull ${{ env.IMAGE_GITEA_WEBSITE }}/${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}:${{ inputs.DEV_RELEASE == true && 'development' || env.IMAGE_VERSION }}-amd64`
- Pull: `docker pull ${{ env.IMAGE_GITEA_WEBSITE }}/${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}@${{ steps.task_release_gi_push.outputs.digest }}`
- Dry Run: `${{ inputs.DRY_RUN }}`
- Source: `Gitea` https://${{ env.IMAGE_GITEA_WEBSITE }}/${{ env.IMAGE_GITEA_USERNAME }}/${{ env.IMAGE_NAME }}/packages
- Docker Image: `${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}`
- Version: `${{ env.IMAGE_VERSION }}`
- Branch: `${{ github.ref_name }}`
- Workflow: `${{ github.workflow }} (#${{github.run_number}})`
- Runner: `${{ runner.name }}`
- Triggered By: `${{ github.actor }}`
- Status: `${{ job.status == 'success' && '✅ Successful' || '❌ Failed' }}`
### Tags
-# This docker image will use the following tags:
```
${{ steps.task_release_gi_meta.outputs.tags }}
```
### Labels
-# This docker image embeds the following labels:
```
${{ steps.task_release_gi_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.repository_owner }}"
embed-author-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-author-icon-url: "https://avatars.githubusercontent.com/u/200161462"

View File

@@ -1,734 +0,0 @@
# #
# @type github workflow
# @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 tvapp2 repository
#
# @secrets secrets.SELF_TOKEN self github personal access token (fine-grained)
# secrets.SELF_TOKEN_CL self github personal access token (classic)
# secrets.NPM_TOKEN self npmjs access token
# secrets.PYPI_API_TOKEN self Pypi API token (production site) - https://pypi.org/
# secrets.PYPI_API_TEST_TOKEN self Pypi API token (test site) - https://test.pypi.org/
# secrets.SELF_DOCKERHUB_TOKEN self Dockerhub token
# secrets.ORG_BINARYNINJA_TOKEN org github personal access token (fine-grained)
# secrets.ORG_BINARYNINJA_TOKEN_CL org github personal access token (classic)
# secrets.ORG_BINARYNINJA_DOCKERHUB_TOKEN org dockerhub secret
# secrets.ORG_BINARYNINJA_GITEA_TOKEN org gitea personal access token (classic) with package:write permission
# secrets.BINARYSERV_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
# secrets.BINARYSERV_GPG_PASSPHRASE bot gpg private key passphrase
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES discord webhook to report release notifications from github to discord
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKFLOWS discord webhook to report workflow notifications from github to discord
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_UPDATES discord webhook to report activity notifications from github to discord
#
# @local these workflows can be tested locally through the use of `act`
# https://github.com/nektos/act
# Extract act to folder
# Add system env var with path to act.exe
# Run the commands:
# git pull https://github.com/username/repo
# act -W .github/workflows/deploy-docker-github.yml -P ubuntu-latest=catthehacker/ubuntu:full-22.04
# act -W .github/workflows/deploy-docker-github.yml -s TOKEN_CL=XXXXXXXXXX --pull=false
# #
name: "📦 Deploy Docker Github"
run-name: "📦 Deploy Docker Github"
# #
# Triggers
# #
on:
# #
# Trigger Workflow Dispatch
#
# If any values are not provided, will use fallback env variable
# #
workflow_dispatch:
inputs:
# #
# Image Name
#
# used in github image path
# ghcr.io/${{ env.IMAGE_GHCR_AUTHOR }}/${{ env.IMAGE_NAME }}
# #
IMAGE_NAME:
description: '📦 Image Name'
required: true
default: 'tvapp2'
type: string
# #
# Image Version
#
# used to create new release tag, and add version to docker image name
# #
IMAGE_VERSION:
description: '🏷️ Image Version'
required: true
default: '1.0.0'
type: string
# #
# Image Author
#
# used in github image path
# ghcr.io/${{ env.IMAGE_GHCR_AUTHOR }}/${{ env.IMAGE_NAME }}
# #
IMAGE_GHCR_AUTHOR:
description: '🪪 Image Author'
required: true
default: 'TheBinaryNinja'
type: string
# #
# Image ghcr username
#
# this is the user to sign into ghcr as.
# #
IMAGE_GHCR_USERNAME:
description: '🪪 ghcr.io Username'
required: true
default: 'TheBinaryNinja'
type: string
# #
# true no changes to the repo will be made
# false workflow will behave normally, and push any changes detected to the files
# #
DRY_RUN:
description: '🐛 Dry Run (Debug)'
required: true
default: false
type: boolean
# #
# true released version will be marked as a development build and will have the v1.x.x-development tag instead of -latest
# false release version will be marked with -latest docker tag
# #
DEV_RELEASE:
description: '🧪 Development Release'
required: true
default: false
type: boolean
# #
# Trigger Push
# #
push:
tags:
- '*'
# #
# Environment Vars
# #
env:
IMAGE_NAME: ${{ github.event.inputs.IMAGE_NAME || 'tvapp2' }}
IMAGE_VERSION: ${{ github.event.inputs.IMAGE_VERSION || '1.0.0' }}
IMAGE_GHCR_AUTHOR: ${{ github.event.inputs.IMAGE_GHCR_AUTHOR || 'BinaryNinja' }}
IMAGE_GHCR_USERNAME: ${{ github.event.inputs.IMAGE_GHCR_USERNAME || 'BinaryNinja' }}
BOT_NAME_1: EuropaServ
BOT_NAME_2: BinaryServ
BOT_NAME_DEPENDABOT: dependabot[bot]
BOT_NAME_RENOVATE: renovate[bot]
# #
# Jobs
#
# The way pushed docker containers on Github work, the most recent image built goes at the top.
# We will use the order below which builds the :latest image last so that it appears at the very
# top of the packages page.
# #
jobs:
# #
# Job Create Tag
# #
job-docker-release-tags-create:
name: >-
📦 Release Create Tag
# runs-on: ubuntu-latest
runs-on: apollo-x64
timeout-minutes: 4
permissions:
contents: write
packages: write
attestations: write
id-token: write
steps:
# #
# Release Tags Start
# #
- name: '🏳️ Start'
id: task_release_tags_start
run: |
echo "Creating Tag"
# #
# Release Tags Checkout
# #
- name: '✅ Checkout'
id: task_release_tags_checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# #
# Release Tags Fix Permissions
# #
- name: '#️⃣ Manage Permissions'
id: task_release_tags_permissions
run: |
find ./ -name 'run' -exec chmod 755 {} \;
WRONG_PERM=$(find ./ -path "./.git" -prune -o \( -name "run" -o -name "finish" -o -name "check" \) -not -perm -u=x,g=x,o=x -print)
if [ -n "${WRONG_PERM}" ]; then
echo "⚠️⚠️⚠️ Permissions are invalid ⚠️⚠️⚠️"
for i in ${WRONG_PERM}; do
echo "::error file=${i},line=1,title=Missing Executable Bit::This file needs to be set as executable!"
done
exit 1
else
echo "✅✅✅ Executable permissions are OK ✅✅✅"
fi
# #
# Release Tags Create Tag
#
# only called in dispatch mode
# #
- uses: rickstaa/action-create-tag@v1
id: task_release_tags_create
if: ( github.event_name != 'workflow_dispatch' && inputs.DRY_RUN == false )
with:
tag: "${{ env.IMAGE_VERSION }}"
tag_exists_error: false
message: '${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}'
gpg_private_key: ${{ secrets.ADMINSERV_GPG_KEY_ASC }}
gpg_passphrase: ${{ secrets.ADMINSERV_GPG_PASSPHRASE }}
# #
# Job Docker Release Github
# #
job-docker-release-github:
name: >-
📦 Release Github
# runs-on: ubuntu-latest
runs-on: apollo-x64
timeout-minutes: 10
permissions:
contents: write
packages: write
attestations: write
id-token: write
needs: [ job-docker-release-tags-create ]
steps:
# #
# Release Github Start Amd64
# #
- name: '🏳️ Start'
id: task_release_gh_start
run: |
echo "Starting Github docker release"
# #
# Release Github Checkout Amd64
# #
- name: '✅ Checkout'
id: task_release_gh_checkout
uses: actions/checkout@v4
# #
# Release Github Get Timestamp
# #
- name: '🕛 Get Timestamp'
id: task_release_set_timestamp
run: |
echo "IMAGE_VERSION_1DIGIT=`echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-1`" >> ${GITHUB_ENV} # 1
echo "IMAGE_VERSION_2DIGIT=`echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-2`" >> ${GITHUB_ENV} # 1.0
echo "REGISTRY_REPO_ORG_AUTHOR_LC=`echo ${{ env.IMAGE_GHCR_AUTHOR }}/${{ env.IMAGE_NAME }} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} # thebinaryninja/tvapp2
echo "REGISTRY_REPO_AUTHOR_LC=`echo ${{ env.IMAGE_GHCR_AUTHOR }} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} # thebinaryninja
echo "DOCKER_SHA=${GITHUB_SHA}" >> $GITHUB_ENV # 71fad013cfce9116ec62779e4a7e627fe4c33627
echo "NOW=$(date +'%m-%d-%Y %H:%M:%S')" >> $GITHUB_ENV # 02-25-2025 12:49:48
echo "NOW_SHORT=$(date +'%m-%d-%Y')" >> $GITHUB_ENV # 02-25-2025
echo "NOW_LONG=$(date +'%m-%d-%Y %H:%M')" >> $GITHUB_ENV # 02-25-2025 12:49
echo "NOW_DOCKER_LABEL=$(date +'%Y%m%d')" >> $GITHUB_ENV # 20250225
echo "NOW_DOCKER_TS=$(date -u +'%FT%T.%3NZ')" >> $GITHUB_ENV # 2025-02-25T12:50:11.569Z
# #
# Release Github Install Dependencies
# #
- name: '📦 Install Dependencies'
id: task_release_gh_dependencies
run:
sudo apt-get install -qq dos2unix
# #
# Release Github Execute dos2unix
# #
- name: '🔐 Apply dos2unix'
id: task_release_gh_dos2unix
run: |
echo "⚠️⚠️⚠️ Running DOS2UNIX ⚠️⚠️⚠️"
find ./ \( -path "./.git" -o -path "./docs" -o -path "./.github" -o -path "*.png" -o -path "*.jpg" \) -prune -o -name '*' -print | xargs dos2unix --
echo "✅✅✅ Completed DOS2UNIX ✅✅✅"
# #
# Release Github Fix Permissions
# #
- name: '#️⃣ Manage Permissions'
id: task_release_gh_permissions
run: |
find ./ -name 'run' -exec chmod 755 {} \;
WRONG_PERM=$(find ./ -path "./.git" -prune -o \( -name "run" -o -name "finish" -o -name "check" \) -not -perm -u=x,g=x,o=x -print)
if [ -n "${WRONG_PERM}" ]; then
echo "⚠️⚠️⚠️ Permissions are invalid ⚠️⚠️⚠️"
for i in ${WRONG_PERM}; do
echo "::error file=${i},line=1,title=Missing Executable Bit::This file needs to be set as executable!"
done
exit 1
else
echo "✅✅✅ Executable permissions are OK ✅✅✅"
fi
# #
# Release Github QEMU Amd64
# #
- name: '⚙️ Set up QEMU'
id: task_release_gh_qemu
uses: docker/setup-qemu-action@v3
# #
# Release Github Setup BuildX Amd64
# #
- name: '⚙️ Setup Buildx'
id: task_release_gh_buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
driver-opts: 'image=moby/buildkit:latest'
# #
# Release Github Registry Login Amd64
# #
- name: '⚙️ Login to Github'
id: task_release_gh_registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ env.IMAGE_GHCR_USERNAME }}
password: ${{ secrets.ORG_BINARYNINJA_TOKEN_CL }}
# #
# Release Github Read Readme
#
# @usage org.opencontainers.image.description=${{ steps.task_release_gh_readme_cache.outputs.content }}
# #
- name: '📄 Cache README.md'
id: task_release_gh_readme_cache
uses: actions/github-script@v7
with:
github-token: ${{ secrets.ORG_BINARYNINJA_TOKEN_CL }}
script: |
'use strict'
const { promises: fs } = require('fs')
const main = async () => {
const path = "README.md"
let content = await fs.readFile(path, 'utf8')
core.setOutput('content', content)
}
main().catch(err => core.setFailed(err.message))
# #
# Release Github Meta
#
# this version of meta does not need one for amd64 and one for arm64 because both
# platforms are combined into one release, all sharing the same tags
# #
- name: '🔨 Github: Meta'
id: task_release_gh_meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ env.REGISTRY_REPO_AUTHOR_LC }}/${{ env.IMAGE_NAME }}
tags: |
# tag latest = yes ( no dev )
type=raw,value=latest,enable=${{ !inputs.DEV_RELEASE }}
# tag add pr tag ( PR or push only )
type=ref,enable=${{ github.event_name == 'pull_request' || github.event_name == 'push' }},priority=600,prefix=,suffix=,event=tag
# tag add 1.0.0 ( dispatch only + no dev )
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=450,prefix=,suffix=,value=${{ env.IMAGE_VERSION }}
# tag add 1.0 ( dispatch only + no dev )
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=425,prefix=,suffix=,value=${{ env.IMAGE_VERSION_2DIGIT }}
# tag add 1 ( dispatch only + no dev )
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=400,prefix=,suffix=,value=${{ env.IMAGE_VERSION_1DIGIT }}
# tag add development ( dispatch only + only dev )
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == true }},priority=300,prefix=,suffix=,value=development
# tag add development ( amd64 + only dev )
type=raw,enable=${{ inputs.DEV_RELEASE }},priority=400,prefix=,suffix=,value=development
flavor: |
latest=false
labels: |
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
org.opencontainers.image.licenses=MIT
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.vendor=${{ env.REGISTRY_REPO_AUTHOR_LC }}
org.opencontainers.image.ref.name=${{ github.ref_name }}
org.opencontainers.image.development=${{ inputs.DEV_RELEASE == true && 'true' || 'false' }}
org.opencontainers.image.registry=github
org.tvapp2.image.build-version="Version:- ${{ env.IMAGE_VERSION }} Date:- ${{ env.NOW_DOCKER_LABEL }}"
annotations: |
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
org.opencontainers.image.licenses=MIT
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.vendor=${{ env.REGISTRY_REPO_AUTHOR_LC }}
org.opencontainers.image.ref.name=${{ github.ref_name }}
org.opencontainers.image.development=${{ inputs.DEV_RELEASE == true && 'true' || 'false' }}
org.opencontainers.image.registry=github
org.tvapp2.image.build-version="Version:- ${{ env.IMAGE_VERSION }} Date:- ${{ env.NOW_DOCKER_LABEL }}"
# #
# Release Github Build and Push Amd64
# #
- name: '📦 Build & Push (linux/amd64)'
id: task_release_gh_push_amd64
uses: docker/build-push-action@v6
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
with:
allow: |
network.host
network: host
context: .
file: Dockerfile
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.task_release_gh_meta.outputs.labels }}
tags: |
${{ steps.task_release_gh_meta.outputs.tags }}
annotations: |
${{ steps.task_release_gh_meta.outputs.annotations }}
provenance: false
sbom: false
build-args: |-
ARCH=amd64
VERSION=${{ env.IMAGE_VERSION }}
BUILDDATE=${{ env.NOW_DOCKER_LABEL }}
# #
# Release Github Export Digest Amd64
# #
- name: '📄 Export Digest (linux/amd64)'
id: task_release_gh_digest_export_amd64
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
run: |
mkdir -p /tmp/build-digest-amd64
digest="${{ steps.task_release_gh_push_amd64.outputs.digest }}"
digest="${digest#sha256:}"
touch "/tmp/build-digest-amd64/$digest"
shell: bash
# #
# Release Github Upload Digest Amd64
# #
- name: '🔼 Upload Digest (linux/amd64)'
id: task_release_gh_digest_upload_amd64
uses: actions/upload-artifact@v4
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
with:
name: digest-amd64
path: /tmp/build-digest-amd64/*
if-no-files-found: error
retention-days: 10
# #
# Release Github Build and Push Arm64
# #
- name: '📦 Build & Push (linux/arm64)'
id: task_release_gh_push_arm64
uses: docker/build-push-action@v6
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
with:
allow: |
network.host
network: host
context: .
file: Dockerfile
platforms: linux/arm64
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.task_release_gh_meta.outputs.labels }}
tags: |
${{ steps.task_release_gh_meta.outputs.tags }}
annotations: |
${{ steps.task_release_gh_meta.outputs.annotations }}
provenance: false
sbom: false
build-args: |-
ARCH=arm64
VERSION=${{ env.IMAGE_VERSION }}
BUILDDATE=${{ env.NOW_DOCKER_LABEL }}
# #
# Release Github Export Digest Arm64
# #
- name: '📄 Export Digest (linux/arm64)'
id: task_release_gh_digest_export_arm64
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
run: |
mkdir -p /tmp/build-digest-arm64
digest="${{ steps.task_release_gh_push_arm64.outputs.digest }}"
digest="${digest#sha256:}"
touch "/tmp/build-digest-arm64/$digest"
shell: bash
# #
# Release Github Upload Digest Arm64
# #
- name: '🔼 Upload Digest (linux/arm64)'
id: task_release_gh_digest_upload_arm64
uses: actions/upload-artifact@v4
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
with:
name: digest-arm64
path: /tmp/build-digest-arm64/*
if-no-files-found: error
retention-days: 10
# #
# Release Github Push Manifest
# #
- name: '📦 Push Manifest'
id: task_release_gh_manifest
uses: int128/docker-manifest-create-action@v2
with:
push: ${{ !inputs.DRY_RUN }}
tags: |
${{ steps.task_release_gh_meta.outputs.tags }}
sources: |
ghcr.io/${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}@${{ steps.task_release_gh_push_amd64.outputs.digest }}
ghcr.io/${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}@${{ steps.task_release_gh_push_arm64.outputs.digest }}
index-annotations: |
${{ steps.task_release_gh_meta.outputs.labels }}
# #
# Release Github Checkpoint
# #
- name: '⚠️ Checkpoint'
id: task_release_gh_checkpoint
run: |
echo ""
echo "[ GITHUB ] ---------------------------------------------------------------------------------------------"
echo "github.actor.............................. ${{ github.actor }}"
echo "github.ref ............................... ${{ github.ref }}"
echo "github.ref_name .......................... ${{ github.ref_name }}"
echo "github.event_name ........................ ${{ github.event_name }}"
echo "github.repository_owner .................. ${{ github.repository_owner }}"
echo "github.repository ........................ ${{ github.repository }}"
echo ""
echo "[ INPUTS ] ---------------------------------------------------------------------------------------------"
echo "inputs.IMAGE_NAME ........................ ${{ inputs.IMAGE_NAME }}"
echo "inputs.IMAGE_VERSION ..................... ${{ inputs.IMAGE_VERSION }}"
echo "inputs.IMAGE_GHCR_AUTHOR ................. ${{ inputs.IMAGE_GHCR_AUTHOR }}"
echo "inputs.IMAGE_GHCR_USERNAME ............... ${{ inputs.IMAGE_GHCR_USERNAME }}"
echo "inputs.DEV_RELEASE ....................... ${{ inputs.DEV_RELEASE }}"
echo "inputs.DRY_RUN ........................... ${{ inputs.DRY_RUN }}"
echo ""
echo "[ ENV ] ------------------------------------------------------------------------------------------------"
echo "env.IMAGE_NAME ........................... ${{ env.IMAGE_NAME }}"
echo "env.IMAGE_VERSION ........................ ${{ env.IMAGE_VERSION }}"
echo "env.IMAGE_VERSION_1DIGIT ................. ${{ env.IMAGE_VERSION_1DIGIT }}"
echo "env.IMAGE_VERSION_2DIGIT ................. ${{ env.IMAGE_VERSION_2DIGIT }}"
echo "env.IMAGE_GHCR_AUTHOR .................... ${{ env.IMAGE_GHCR_AUTHOR }}"
echo "env.IMAGE_GHCR_USERNAME .................. ${{ env.IMAGE_GHCR_USERNAME }}"
echo "env.NOW .................................. ${{ env.NOW }}"
echo "env.NOW_SHORT ............................ ${{ env.NOW_SHORT }}"
echo "env.NOW_LONG ............................. ${{ env.NOW_LONG }}"
echo "env.NOW_DOCKER_LABEL ..................... ${{ env.NOW_DOCKER_LABEL }}"
echo "env.NOW_DOCKER_TS ........................ ${{ env.NOW_DOCKER_TS }}"
echo "env.DOCKER_IMAGE ......................... ${{ env.DOCKER_IMAGE }}"
echo "env.REGISTRY_REPO_ORG_AUTHOR_LC .......... ${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}"
echo "env.REGISTRY_REPO_AUTHOR_LC .............. ${{ env.REGISTRY_REPO_AUTHOR_LC }}"
echo "env.DOCKER_SHA ........................... ${{ env.DOCKER_SHA }}"
echo ""
echo "[ DOCKER IMAGES ] --------------------------------------------------------------------------------------"
echo "registry ................................. Github GHCR"
echo "tags ..................................... ${{ steps.task_release_gh_meta.outputs.tags }}"
echo "labels ................................... ${{ steps.task_release_gh_meta.outputs.labels }}"
echo "digest ................................... ${{ steps.task_release_gh_push_amd64.outputs.digest }}"
echo ""
echo "(release) tags ........................... ${{ steps.task_release_gh_meta.outputs.tags }}"
echo "(release) labels ......................... ${{ steps.task_release_gh_meta.outputs.labels }}"
echo ""
echo "[ DOCKER DIGESTS ] -------------------------------------------------------------------------------------"
echo "docker image id (amd64) .................. ${{ steps.task_release_gh_push_amd64.outputs.imageid }}"
echo "docker digest (amd64) .................... ${{ steps.task_release_gh_push_amd64.outputs.digest }}"
echo "docker image id (arm64) .................. ${{ steps.task_release_gh_push_arm64.outputs.imageid }}"
echo "docker digest (arm64) .................... ${{ steps.task_release_gh_push_arm64.outputs.digest }}"
# #
# Release Github 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 Github Notify Github
# #
- name: '🔔 Send Discord Webhook Message'
uses: tsickert/discord-webhook@v7.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: "⚙️ ${{ github.workflow_ref }}"
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg'
embed-description: |
### 📦 Deploy (Github) ${{ job.status == 'success' && '✅' || '❌' }} `${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}`
${{ inputs.DEV_RELEASE == true && '### ⚠️⚠️ Development / Pre-release ⚠️⚠️' || '' }}
A new version of the docker container `${{ env.IMAGE_NAME }}` has been released from Github to Github GHCR. The image is available at:
- https://github.com/${{ github.repository }}/pkgs/container/${{ env.IMAGE_NAME }}
- Version: `${{ env.IMAGE_VERSION }}`
- Release Type: `${{ inputs.DEV_RELEASE == true && '⚠️⚠️ Development / Pre-release ⚠️⚠️' || 'Stable' }}`
- Pull: `docker pull ghcr.io/${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}:${{ inputs.DEV_RELEASE == true && 'development' || env.IMAGE_VERSION }}`
- Pull (amd64): `docker pull ghcr.io/${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}@${{ steps.task_release_gh_push_amd64.outputs.digest }}`
- Pull (arm64): `docker pull ghcr.io/${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}@${{ steps.task_release_gh_push_arm64.outputs.digest }}`
- Dry Run: `${{ inputs.DRY_RUN }}`
- Source: `Github` https://github.com/${{ github.repository }}
- Docker Image: `${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}`
- Branch: `${{ github.ref_name }}`
- Workflow: `${{ github.workflow }} (#${{github.run_number}})`
- Runner: `${{ runner.name }}`
- Triggered By: `${{ github.actor }}`
- Status: `${{ job.status == 'success' && '✅ Successful' || '❌ Failed' }}`
### Tags
-# This docker image will use the following tags:
```
${{ steps.task_release_gh_meta.outputs.tags }}
```
### Labels
-# This docker image embeds the following labels:
```
${{ steps.task_release_gh_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.repository_owner }}"
embed-author-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-author-icon-url: "https://avatars.githubusercontent.com/u/200161462"
# #
# Job Docker Release Cleanup
# #
job-docker-release-cleanup:
name: >-
🧹 Release Cleanup
# runs-on: ubuntu-latest
runs-on: apollo-x64
timeout-minutes: 5
permissions:
contents: write
packages: write
attestations: write
id-token: write
needs: [ job-docker-release-tags-create, job-docker-release-github ]
steps:
# #
# Release Cleanup
# #
- name: '🏳️ Start'
id: task_cleanup_gh_start
run: |
echo "Cleaning up untagged docker images"
# #
# Release Cleanup Checkout
# #
- name: '✅ Checkout'
id: task_cleanup_gh_checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# #
# Release Cleanup Clean Untagged Images
# #
- name: '🧹 Clean Untagged Images'
id: task_cleanup_clean
uses: quartx-analytics/ghcr-cleaner@v1
with:
owner-type: org
token: ${{ secrets.ORG_BINARYNINJA_TOKEN_CL }}
repository-owner: ${{ github.repository_owner }}
repository-name: ${{ github.repository }}
delete-untagged: true
# keep-at-most: 0

516
.github/workflows/deploy-docker.yml vendored Normal file
View File

@@ -0,0 +1,516 @@
# #
# @type github workflow
# @desc deploys docker container
# @author Aetherinox
# @url https://github.com/Aetherinox
# #
name: "⚙️ Deploy Docker Main"
run-name: "⚙️ Deploy Docker Main"
# #
# triggers
# #
on:
# #
# Trigger > Workflow Dispatch
# #
workflow_dispatch:
inputs:
IMAGE_NAME:
description: "📦 Image Name"
required: true
default: 'thetvapp-docker'
type: string
IMAGE_AUTHOR:
description: "📦 Image Author"
required: true
default: 'aetherinox'
type: string
# #
# true: runs all actions, even ones not scheduled
# false: only scheduled tasks will run
# #
PRINT_ONLY:
description: "📑 Print Debugs Only"
required: true
default: false
type: boolean
# #
# Trigger > Push
# #
push:
tags:
- '*'
# #
# environment variables
# #
env:
IMAGE_NAME: alpine-base
IMAGE_AUTHOR: Aetherinox
BOT_NAME_1: EuropaServ
BOT_NAME_DEPENDABOT: dependabot[bot]
# #
# jobs
#
# The way pushed docker containers on Github work, the most recent image built goes at the top.
# We will use the order below which builds the :latest image last so that it appears at the very
# top of the packages page.
# #
jobs:
# #
# Job > Docker Release > Github
# #
job-docker-release-github-php:
name: >-
📦 Release Github PHP
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
# #
# Release > Github > Start
# #
- name: "✅ Start"
id: task_release_gh_start
run: |
echo "Starting Github docker release for image PHP"
# #
# Release > Github > Checkout
# #
- name: "☑️ Checkout"
id: task_release_gh_checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# #
# Release > Github > QEMU
# #
- name: "⚙️ Set up QEMU"
id: task_release_gh_qemu
uses: docker/setup-qemu-action@v3
# #
# Release > Github > Setup BuildX
# #
- name: "⚙️ Setup Buildx"
id: task_release_gh_buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
driver-opts: 'image=moby/buildkit:v0.10.5'
# #
# Release > Github > Registry Login
# #
- name: "⚙️ Login to Github"
id: task_release_gh_registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.SELF_TOKEN_CL }}
# #
# Release > Github > Meta
# #
- name: "🔨 Docker meta"
id: task_release_gh_meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ inputs.IMAGE_AUTHOR || env.IMAGE_AUTHOR }}/docker-${{ inputs.IMAGE_NAME || env.IMAGE_NAME }}
tags: |
type=ref,enable=true,priority=600,prefix=,suffix=-php,event=tag
flavor: |
latest=false
# #
# Release > Github > Debug
# #
- name: "🪪 Debug Print"
id: task_release_gh_print
run: |
echo "registry ............. Github"
echo "github.actor.......... ${{ github.actor }}"
echo "github.ref ........... ${{ github.ref }}"
echo "github.event_name .... ${{ github.event_name }}"
echo "tags ................. ${{ steps.task_release_gh_meta.outputs.tags }}"
echo "labels ............... ${{ steps.task_release_gh_meta.outputs.labels }}"
# #
# Release > Github > Build and Push
# #
- name: "📦 Build and push"
id: task_release_gh_push
uses: docker/build-push-action@v6
if: ( github.event_name == 'workflow_dispatch' && inputs.PRINT_ONLY == 'false' ) || ( github.event_name == 'push' )
with:
context: .
file: Dockerfile-php.template
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.task_release_gh_meta.outputs.tags }}
labels: ${{ steps.task_release_gh_meta.outputs.labels }}
# #
# Job > Docker Release > Github
# #
job-docker-release-dockerhub-php:
name: >-
📦 Release Dockerhub PHP
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
# #
# Release > Dockerhub > Start
# #
- name: "✅ Start"
id: task_release_dh_start
run: |
echo "Starting Dockerhub Release"
# #
# Release > Dockerhub > Checkout
# #
- name: "☑️ Checkout"
id: task_release_dh_checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# #
# Release > Dockerhub > QEMU
# #
- name: "⚙️ Set up QEMU"
id: task_release_dh_qemu
uses: docker/setup-qemu-action@v3
# #
# Release > Dockerhub > Setup BuildX
# #
- name: "⚙️ Setup Buildx"
id: task_release_dh_buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
driver-opts: 'image=moby/buildkit:v0.10.5'
# #
# Release > Dockerhub > Registry Login
# #
- name: "⚙️ Login to DockerHub"
id: task_release_dh_registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ inputs.IMAGE_AUTHOR || env.IMAGE_AUTHOR }}
password: ${{ secrets.SELF_DOCKERHUB_TOKEN }}
# #
# Release > Dockerhub > Meta
# #
- name: "🔨 Docker meta"
id: task_release_dh_meta
uses: docker/metadata-action@v5
with:
images: |
${{ inputs.IMAGE_AUTHOR || env.IMAGE_AUTHOR }}/${{ inputs.IMAGE_NAME || env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable=false
type=ref,enable=true,priority=600,prefix=,suffix=-php,event=tag
flavor: |
latest=false
# #
# Release > Dockerhub > Debug
# #
- name: "🪪 Debug Print"
id: task_release_dh_print
run: |
echo "registry ............. Dockerhub"
echo "github.actor.......... ${{ github.actor }}"
echo "github.ref ........... ${{ github.ref }}"
echo "github.event_name .... ${{ github.event_name }}"
echo "tags ................. ${{ steps.task_release_dh_meta.outputs.tags }}"
echo "labels ............... ${{ steps.task_release_dh_meta.outputs.labels }}"
# #
# Release > Dockerhub > Build and Push
# #
- name: "📦 Build and push"
id: task_release_dh_push
uses: docker/build-push-action@v6
if: ( github.event_name == 'workflow_dispatch' && inputs.PRINT_ONLY == 'false' ) || ( github.event_name == 'push' )
with:
context: .
file: Dockerfile-php.template
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.task_release_dh_meta.outputs.tags }}
labels: ${{ steps.task_release_dh_meta.outputs.labels }}
# #
# Job > Docker Release > Github
# #
job-docker-release-github-main:
name: >-
📦 Release Github Main
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
needs: [ job-docker-release-github-php, job-docker-release-dockerhub-php ]
steps:
# #
# Release > Github > Start
# #
- name: "✅ Start"
id: task_release_gh_start
run: |
echo "Starting Github docker release"
# #
# Release > Github > Checkout
# #
- name: "☑️ Checkout"
id: task_release_gh_checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# #
# Release > Github > QEMU
# #
- name: "⚙️ Set up QEMU"
id: task_release_gh_qemu
uses: docker/setup-qemu-action@v3
# #
# Release > Github > Setup BuildX
# #
- name: "⚙️ Setup Buildx"
id: task_release_gh_buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
driver-opts: 'image=moby/buildkit:v0.10.5'
# #
# Release > Github > Registry Login
# #
- name: "⚙️ Login to Github"
id: task_release_gh_registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.SELF_TOKEN_CL }}
# #
# Release > Github > Meta
# #
- name: "🔨 Docker meta"
id: task_release_gh_meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ inputs.IMAGE_AUTHOR || env.IMAGE_AUTHOR }}/docker-${{ inputs.IMAGE_NAME || env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable=${{ endsWith(github.ref, 'main') }}
type=ref,event=tag
# #
# Release > Github > Debug
# #
- name: "🪪 Debug Print"
id: task_release_gh_print
run: |
echo "registry ............. Github"
echo "github.actor.......... ${{ github.actor }}"
echo "github.ref ........... ${{ github.ref }}"
echo "github.event_name .... ${{ github.event_name }}"
echo "tags ................. ${{ steps.task_release_gh_meta.outputs.tags }}"
echo "labels ............... ${{ steps.task_release_gh_meta.outputs.labels }}"
# #
# Release > Github > Build and Push
# #
- name: "📦 Build and push"
id: task_release_gh_push
uses: docker/build-push-action@v6
if: ( github.event_name == 'workflow_dispatch' && inputs.PRINT_ONLY == 'false' ) || ( github.event_name == 'push' )
with:
context: .
file: Dockerfile
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.task_release_gh_meta.outputs.tags }}
labels: ${{ steps.task_release_gh_meta.outputs.labels }}
# #
# Job > Docker Release > Github
# #
job-docker-release-dockerhub-main:
name: >-
📦 Release Dockerhub Main
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
needs: [ job-docker-release-github-php, job-docker-release-dockerhub-php ]
steps:
# #
# Release > Dockerhub > Start
# #
- name: "✅ Start"
id: task_release_dh_start
run: |
echo "Starting Github docker release"
# #
# Release > Dockerhub > Checkout
# #
- name: "☑️ Checkout"
id: task_release_dh_checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# #
# Release > Dockerhub > QEMU
# #
- name: "⚙️ Set up QEMU"
id: task_release_dh_qemu
uses: docker/setup-qemu-action@v3
# #
# Release > Dockerhub > Setup BuildX
# #
- name: "⚙️ Setup Buildx"
id: task_release_dh_buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
driver-opts: 'image=moby/buildkit:v0.10.5'
# #
# Release > Dockerhub > Registry Login
# #
- name: "⚙️ Login to DockerHub"
id: task_release_dh_registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ inputs.IMAGE_AUTHOR || env.IMAGE_AUTHOR }}
password: ${{ secrets.SELF_DOCKERHUB_TOKEN }}
# #
# Release > Dockerhub > Meta
# #
- name: "🔨 Docker meta"
id: task_release_dh_meta
uses: docker/metadata-action@v5
with:
images: |
${{ inputs.IMAGE_AUTHOR || env.IMAGE_AUTHOR }}/${{ inputs.IMAGE_NAME || env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable=${{ endsWith(github.ref, 'main') }}
type=ref,event=tag
# #
# Release > Dockerhub > Debug
# #
- name: "🪪 Debug Print"
id: task_release_dh_print
run: |
echo "registry ............. Dockerhub"
echo "github.actor.......... ${{ github.actor }}"
echo "github.ref ........... ${{ github.ref }}"
echo "github.event_name .... ${{ github.event_name }}"
echo "tags ................. ${{ steps.task_release_dh_meta.outputs.tags }}"
echo "labels ............... ${{ steps.task_release_dh_meta.outputs.labels }}"
# #
# Release > Dockerhub > Build and Push
# #
- name: "📦 Build & Push"
id: task_release_dh_push
uses: docker/build-push-action@v6
if: ( github.event_name == 'workflow_dispatch' && inputs.PRINT_ONLY == 'false' ) || ( github.event_name == 'push' )
with:
context: .
file: Dockerfile
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.task_release_dh_meta.outputs.tags }}
labels: ${{ steps.task_release_dh_meta.outputs.labels }}

View File

@@ -1,231 +0,0 @@
# #
# @type github workflow
# @author Aetherinox
# @url https://github.com/Aetherinox
# @usage builds mkdocs from the main branch /docs/ folder and puts the compiled version
# in the `gh-pages` branch. Is hosted using Github Pages.
#
# @update use the following commands to update mkdocs and the mkdocs-material theme:
# pip install --upgrade mkdocs
# pip install --upgrade --force-reinstall mkdocs-material
#
# @secrets secrets.SELF_TOKEN self github personal access token (fine-grained)
# secrets.SELF_TOKEN_CL self github personal access token (classic)
# secrets.NPM_TOKEN self npmjs access token
# secrets.PYPI_API_TOKEN self Pypi API token (production site) - https://pypi.org/
# secrets.PYPI_API_TEST_TOKEN self Pypi API token (test site) - https://test.pypi.org/
# secrets.SELF_DOCKERHUB_TOKEN self Dockerhub token
# secrets.ORG_BINARYNINJA_TOKEN org github personal access token (fine-grained)
# secrets.ORG_BINARYNINJA_TOKEN_CL org github personal access token (classic)
# secrets.ORG_BINARYNINJA_DOCKERHUB_TOKEN org dockerhub secret
# secrets.ORG_BINARYNINJA_GITEA_TOKEN org gitea personal access token (classic) with package:write permission
# secrets.BINARYSERV_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
# secrets.BINARYSERV_GPG_PASSPHRASE bot gpg private key passphrase
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES discord webhook to report release notifications from github to discord
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKFLOWS discord webhook to report workflow notifications from github to discord
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_UPDATES discord webhook to report activity notifications from github to discord
#
# @local these workflows can be tested locally through the use of `act`
# https://github.com/nektos/act
# Extract act to folder
# Add system env var with path to act.exe
# Run the commands:
# git pull https://github.com/username/repo
# act -W .github/workflows/documentation.yml -P ubuntu-latest=catthehacker/ubuntu:full-22.04
# act -W .github/workflows/documentation.yml -s TOKEN_CL=XXXXXXXXXX --pull=false
# #
name: "📒 Docs Build"
run-name: "📒 Docs Build"
# #
# triggers
# #
on:
release:
types:
- published
push:
paths:
- docs/**
workflow_dispatch:
schedule:
- cron: "0 */12 * * *"
# #
# environment variables
# #
env:
ASSIGN_USER: Aetherinox
BOT_NAME_1: EuropaServ
BOT_NAME_2: BinaryServ
BOT_NAME_DEPENDABOT: dependabot[bot]
BOT_NAME_RENOVATE: renovate[bot]
# #
# jobs
# #
jobs:
build-docs:
# runs-on: ubuntu-latest
runs-on: apollo-x64
timeout-minutes: 20
permissions:
contents: write
pages: write
environment:
name: Orion
steps:
# #
# Documentation Checkout Arm64
# #
- name: >-
✅ Checkout
id: task_docs_checkout
uses: actions/checkout@v4
# #
# Documentation Set Env Variables
# #
- name: >-
🕛 Get Timestamp
id: task_docs_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
# #
# Documentation Setup Python
# #
- name: "🐍 Setup Python"
id: task_docs_python_setup
uses: actions/setup-python@v5
with:
python-version: 3.x
# #
# Documentation Build Documentation
# #
- name: >-
📕 Build Documentation
id: task_docs_build
run: |
export DOCS_NAME=${{ secrets.DOCS_NAME || 'TVApp2' }}
export DOCS_SECRET_L1=${{ secrets.DOCS_SECRET_L1 }}
export DOCS_SECRET_L2=${{ secrets.DOCS_SECRET_L2 }}
export GH_TOKEN=${{ secrets.ADMINSERV_TOKEN }}
pip install mkdocs
pip install mkdocs-material
pip install mike
pip install mkdocs-git-committers-plugin-2
pip install mkdocs-encryptcontent-plugin
pip install mkdocs-redirects mkdocs-glightbox pymdown-extensions mkdocs-git-revision-date-localized-plugin mkdocs-git-authors-plugin mkdocs-link-embeds-plugin
cd docs
mkdocs build
dir
env:
GH_TOKEN: ${{ secrets.ADMINSERV_TOKEN }}
# #
# Documentation Deploy
# #
- name: "💽 Deploy"
id: task_docs_deploy
uses: peaceiris/actions-gh-pages@v4
with:
personal_token: ${{ secrets.ADMINSERV_TOKEN_CL }}
publish_dir: ./docs/site
# #
# Documentation Get Weekly Commits
# #
- name: >-
🕛 Get Weekly Commit List
id: task_docs_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
# #
# Documentation Notify Github Success
# #
- name: >-
🔔 Send Discord Webhook Message (Success)
id: task_docs_notify_discord_success
uses: tsickert/discord-webhook@v7.0.0
if: success()
with:
username: 'Io'
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKfLOWS }}
embed-title: "⚙️ ${{ github.workflow_ref }}"
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg'
embed-description: |
## 📦 Documentation Deployment${{ job.status == 'success' && '✅' || '❌' }}
A **successful** deployment of TVApp2 documentation has been completed. Changes to documentation will appear in the next 5 minutes.
- Documentation: https://thebinaryninja.github.io/tvapp2/
- Workflow: `${{ github.workflow }} (#${{github.run_number}})`
- Runner: `${{ runner.name }}`
- Triggered By: `${{ github.actor }}`
- Status: `${{ job.status == 'success' && '✅ Successful' || '❌ Failed' }}`
embed-color: ${{ job.status == 'success' && '5763719' || '15418782' }}
embed-footer-text: "Completed at ${{ env.NOW }} UTC"
embed-timestamp: "${{ env.NOW_LONG }}"
embed-author-name: "${{ github.repository_owner }}"
embed-author-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-author-icon-url: "https://avatars.githubusercontent.com/u/200161462"
# #
# Documentation Notify Github Failure
# #
- name: >-
🔔 Send Discord Webhook Message (Failure)
id: task_docs_notify_discord_failure
uses: tsickert/discord-webhook@v7.0.0
if: failure()
with:
username: 'Io'
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKfLOWS }}
embed-title: "⚙️ ${{ github.workflow_ref }}"
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg'
embed-description: |
## 📦 Documentation Deployment${{ job.status == 'success' && '✅' || '❌' }}
A **failed** attempt to build the new documentation has triggered. No changes to your documentation will be made until the errors are fixed in the workflow.
- Documentation: https://thebinaryninja.github.io/tvapp2/
- Workflow: `${{ github.workflow }} (#${{github.run_number}})`
- Runner: `${{ runner.name }}`
- Triggered By: `${{ github.actor }}`
- Status: `${{ job.status == 'success' && '✅ Successful' || '❌ Failed' }}`
embed-color: ${{ job.status == 'success' && '5763719' || '15418782' }}
embed-footer-text: "Completed at ${{ env.NOW }} UTC"
embed-timestamp: "${{ env.NOW_LONG }}"
embed-author-name: "${{ github.repository_owner }}"
embed-author-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-author-icon-url: "https://avatars.githubusercontent.com/u/200161462"

72
.github/workflows/issues-accept.yml vendored Normal file
View File

@@ -0,0 +1,72 @@
# #
# @type github workflow
# @desc adds a label to a PR when the command "/accept" is typed in the issue comments
# do not attempt to use env variables in if condition.
# do not accept to change GITHUB_TOKEN.
# @author Aetherinox
# @url https://github.com/Aetherinox
# #
name: "🎫 Issue Accept"
run-name: "🎫 Issue Accept"
# #
# triggers
# #
on:
issue_comment:
types: [created]
# #
# environment variables
# #
env:
LABEL_ACCEPT: "Status 𐄂 Accepted"
BOT_NAME_1: AdminServ
BOT_NAME_2: AdminServX
BOT_NAME_3: EuropaServ
BOT_NAME_DEPENDABOT: dependabot[bot]
# #
# jobs
# #
jobs:
# #
# Job [ Deploy ]
# #
deploy:
if: contains(github.event.comment.body, '/accept') && github.event.comment.user.login == 'Aetherinox'
runs-on: ubuntu-latest
steps:
# #
# Add Label to accepted PR
# #
- name: >-
🏷️ Assign Label ${{ env.LABEL_ACCEPT }}
run: gh issue edit "$NUMBER" --add-label "$LABELS"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}
LABELS: ${{ env.LABEL_ACCEPT }}
# #
# Add assignee to accepted PR
# #
- name: >-
🏷️ Assign Assignee ${{ github.repository_owner }}
run: gh issue edit "$NUMBER" --add-assignee "$ASSIGNEE"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}
ASSIGNEE: ${{ github.repository_owner }}

65
.github/workflows/issues-new.yml vendored Executable file → Normal file
View File

@@ -1,40 +1,15 @@
# # # #
# @type github workflow # @type github workflow
# @desc searches a new issues title and body for certain keywords and assigns a label
# sets the assignee for the issue to the repository owner
# @author Aetherinox # @author Aetherinox
# @url https://github.com/Aetherinox # @url https://github.com/Aetherinox
# @usage searches a new issues title and body for certain keywords and assigns a label
# sets the assignee for the issue to the repository owner
# #
# @notes requires the following labels to be created in your repo: # requires the following labels to be created in your repo:
# - bug # - bug
# - feature # - feature
# - urgent # - urgent
# - roadmap # - roadmap
#
# @secrets secrets.SELF_TOKEN self github personal access token (fine-grained)
# secrets.SELF_TOKEN_CL self github personal access token (classic)
# secrets.NPM_TOKEN self npmjs access token
# secrets.PYPI_API_TOKEN self Pypi API token (production site) - https://pypi.org/
# secrets.PYPI_API_TEST_TOKEN self Pypi API token (test site) - https://test.pypi.org/
# secrets.SELF_DOCKERHUB_TOKEN self Dockerhub token
# secrets.ORG_BINARYNINJA_TOKEN org github personal access token (fine-grained)
# secrets.ORG_BINARYNINJA_TOKEN_CL org github personal access token (classic)
# secrets.ORG_BINARYNINJA_DOCKERHUB_TOKEN org dockerhub secret
# secrets.ORG_BINARYNINJA_GITEA_TOKEN org gitea personal access token (classic) with package:write permission
# secrets.BINARYSERV_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
# secrets.BINARYSERV_GPG_PASSPHRASE bot gpg private key passphrase
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES discord webhook to report release notifications from github to discord
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKFLOWS discord webhook to report workflow notifications from github to discord
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_UPDATES discord webhook to report activity notifications from github to discord
#
# @local these workflows can be tested locally through the use of `act`
# https://github.com/nektos/act
# Extract act to folder
# Add system env var with path to act.exe
# Run the commands:
# git pull https://github.com/username/repo
# act -W .github/workflows/issues-new.yml -P ubuntu-latest=catthehacker/ubuntu:full-22.04
# act -W .github/workflows/issues-new.yml -s TOKEN_CL=XXXXXXXXXX --pull=false
# # # #
name: "🎫 Issue New" name: "🎫 Issue New"
@@ -55,15 +30,15 @@ on:
# # # #
env: env:
PREFIX_BUG: "🐛 Bug" PREFIX_BUG: "Bug"
PREFIX_DEPENDENCY: "Dependency" PREFIX_DEPENDENCY: "Dependency"
PREFIX_DOCS: "Docs" PREFIX_DOCS: "Docs"
PREFIX_FEATURE: "💡 Feature" PREFIX_FEATURE: "Feature"
PREFIX_GIT: "Git Action" PREFIX_GIT: "Git Action"
PREFIX_PR: "PR" PREFIX_PR: "PR"
PREFIX_ROADMAP: "🗺️ Roadmap" PREFIX_ROADMAP: "Roadmap"
PREFIX_INTERNAL: "Internal" PREFIX_INTERNAL: "Internal"
PREFIX_URGENT: "Urgent" PREFIX_URGENT: "Urgent"
LABEL_BUG: "Type ◦ Bug" LABEL_BUG: "Type ◦ Bug"
LABEL_DEPENDENCY: "Type ◦ Dependency" LABEL_DEPENDENCY: "Type ◦ Dependency"
@@ -72,14 +47,13 @@ env:
LABEL_GIT: "Type ◦ Git Action" LABEL_GIT: "Type ◦ Git Action"
LABEL_PR: "Type ◦ Pull Request" LABEL_PR: "Type ◦ Pull Request"
LABEL_ROADMAP: "Type ◦ Roadmap" LABEL_ROADMAP: "Type ◦ Roadmap"
LABEL_INTERNAL: "Type ◦ Internal" LABEL_INTERNAL: "Type ◦ Git Action"
LABEL_URGENT: "⚠ Urgent" LABEL_URGENT: "⚠ Urgent"
ASSIGN_USER: Aetherinox BOT_NAME_1: AdminServ
BOT_NAME_1: EuropaServ BOT_NAME_2: AdminServX
BOT_NAME_2: BinaryServ BOT_NAME_3: EuropaServ
BOT_NAME_DEPENDABOT: dependabot[bot] BOT_NAME_DEPENDABOT: dependabot[bot]
BOT_NAME_RENOVATE: renovate[bot]
LABELS_JSON: | LABELS_JSON: |
[ [
@@ -160,7 +134,6 @@ jobs:
name: >- name: >-
🎫 Labels Verify Existing 🎫 Labels Verify Existing
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 4
steps: steps:
# # # #
@@ -232,7 +205,6 @@ jobs:
needs: needs:
- job-labels-create - job-labels-create
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 4
permissions: permissions:
contents: 'read' contents: 'read'
id-token: 'write' id-token: 'write'
@@ -317,7 +289,7 @@ jobs:
https://regex101.com/r/Z99Gnq/2 https://regex101.com/r/Z99Gnq/2
*/ */
const findWordList = /^\b(?:I?\s*have\s*(?:a|an)\s*(?:issue|problem|bug))|(?:problem\swith)|(?:will\s*not\s*work)|(?:it\s*is\s*(?:broken|broke|stuck))|(?:found\s*(?:an?|the)\s*(?:bug|issue))|(?:can\s*I\s*fix\s*the\s*(?:bug|issue))|(?:(?:does not|doesn'?t|don'?t|won'?t|can'?t|can\s?not|will\s*not)\s*(?:work|load|function))|(?:it\s*(?:will\s?not|won'?t|can\s?not|can'?t))\s*(?:get|find)\s*the\s*(?:website|site|webpage|page)|(?:the\s*(?:window|frame)\s*is\s*(?:blank|white|empty|missing))\b$/igm; const findWordList = /^\b(?:I?\s*have\s*(?:a|an)\s*(?:issue|problem|bug))|(?:will\s*not\s*work)|(?:it\s*is\s*(?:broken|broke|stuck))|(?:found\s*(?:an?|the)\s*(?:bug|issue))|(?:can\s*I\s*fix\s*the\s*(?:bug|issue))|(?:(?:does not|doesn'?t|don'?t|won'?t|can'?t|can\s?not|will\s*not)\s*(?:work|load|function))|(?:it\s*(?:will\s?not|won'?t|can\s?not|can'?t))\s*(?:get|find)\s*the\s*(?:website|site|webpage|page)|(?:the\s*(?:window|frame)\s*is\s*(?:blank|white|empty|missing))\b$/igm;
const bFoundMatchTitle = Boolean( findWordList.test( iss_title ) ); const bFoundMatchTitle = Boolean( findWordList.test( iss_title ) );
const bFoundMatchBody = Boolean( findWordList.test( iss_body ) ); const bFoundMatchBody = Boolean( findWordList.test( iss_body ) );
@@ -794,7 +766,6 @@ jobs:
needs: needs:
- job-labels-create - job-labels-create
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 4
permissions: permissions:
contents: 'read' contents: 'read'
id-token: 'write' id-token: 'write'
@@ -880,15 +851,11 @@ jobs:
name: >- name: >-
✍️ Issue Assignees ✍️ Issue Assignees
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 4
needs: [ job-assign-labels ] needs: [ job-assign-labels ]
# disable if: |
# always()
# if: | && contains( needs.*.result, 'success' )
# always() && !contains( needs.*.result, 'failure' )
# && contains( needs.*.result, 'success' )
# && !contains( needs.*.result, 'failure' )
if: false
permissions: permissions:
contents: write contents: write
steps: steps:

383
.github/workflows/issues-scan.yml vendored Executable file → Normal file
View File

@@ -1,39 +1,11 @@
# # # #
# @type github workflow # @type github workflow
# @author Aetherinox # @desc pull request autoscan
# @url https://github.com/Aetherinox
# @desc pull request auto-scan
# scans all of the files related to a particular pull request # scans all of the files related to a particular pull request
# if the code in the files being submitted contains code that is forbidden, # if the code in the files being submitted contains code that is forbidden,
# a report is generated and posted as a comment in the PR. # a report is generated and posted as a comment in the PR.
# sends notifications to discord using webhooks # @author Aetherinox
# # @url https://github.com/Aetherinox
# @notes skips title changes if the author of the PR is renovate[bat]
#
# @secrets secrets.SELF_TOKEN self github personal access token (fine-grained)
# secrets.SELF_TOKEN_CL self github personal access token (classic)
# secrets.NPM_TOKEN self npmjs access token
# secrets.PYPI_API_TOKEN self Pypi API token (production site) - https://pypi.org/
# secrets.PYPI_API_TEST_TOKEN self Pypi API token (test site) - https://test.pypi.org/
# secrets.SELF_DOCKERHUB_TOKEN self Dockerhub token
# secrets.ORG_BINARYNINJA_TOKEN org github personal access token (fine-grained)
# secrets.ORG_BINARYNINJA_TOKEN_CL org github personal access token (classic)
# secrets.ORG_BINARYNINJA_DOCKERHUB_TOKEN org dockerhub secret
# secrets.ORG_BINARYNINJA_GITEA_TOKEN org gitea personal access token (classic) with package:write permission
# secrets.BINARYSERV_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
# secrets.BINARYSERV_GPG_PASSPHRASE bot gpg private key passphrase
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES discord webhook to report release notifications from github to discord
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKFLOWS discord webhook to report workflow notifications from github to discord
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_UPDATES discord webhook to report activity notifications from github to discord
#
# @local these workflows can be tested locally through the use of `act`
# https://github.com/nektos/act
# Extract act to folder
# Add system env var with path to act.exe
# Run the commands:
# git pull https://github.com/username/repo
# act -W .github/workflows/issues-scan.yml -P ubuntu-latest=catthehacker/ubuntu:full-22.04
# act -W .github/workflows/issues-scan.yml -s TOKEN_CL=XXXXXXXXXX --pull=false
# # # #
name: "🎫 Issues Scan" name: "🎫 Issues Scan"
@@ -47,6 +19,7 @@ on:
pull_request_target: pull_request_target:
branches: branches:
- main - main
- master
# # # #
# environment variables # environment variables
@@ -65,11 +38,10 @@ env:
LABEL_TYPE_DEPENDENCY: Type ◦ Dependency LABEL_TYPE_DEPENDENCY: Type ◦ Dependency
LABEL_TYPE_GITACTION: Type ◦ Git Action LABEL_TYPE_GITACTION: Type ◦ Git Action
ASSIGN_USER: Aetherinox BOT_NAME_1: AdminServ
BOT_NAME_1: EuropaServ BOT_NAME_2: AdminServX
BOT_NAME_2: BinaryServ BOT_NAME_3: EuropaServ
BOT_NAME_DEPENDABOT: dependabot[bot] BOT_NAME_DEPENDABOT: dependabot[bot]
BOT_NAME_RENOVATE: renovate[bot]
LABELS_JSON: | LABELS_JSON: |
[ [
@@ -85,7 +57,7 @@ env:
{ "name": "Status 𐄂 Accepted", "color": "2e7539", "description": "This pull request has been accepted" }, { "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 𐄂 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 𐄂 Denied", "color": "ba4058", "description": "Pull request has been denied" },
{ "name": "Status 𐄂 Locked", "color": "550F45", "description": "Automatically locked by EuropaServ for a prolonged period of inactivity" }, { "name": "Status 𐄂 Locked", "color": "550F45", "description": "Automatically locked by AdminServ for a prolonged period of inactivity" },
{ "name": "Status 𐄂 Need Info", "color": "2E3C4C", "description": "Not enough information to resolve" }, { "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 𐄂 No Action", "color": "030406", "description": "Closed without any action being taken" },
{ "name": "Status 𐄂 Pending", "color": "984b12", "description": "Pending pull request" }, { "name": "Status 𐄂 Pending", "color": "984b12", "description": "Pending pull request" },
@@ -140,14 +112,11 @@ env:
jobs: jobs:
# # # #
# Job Autoscan # Job [ Autoscan ]
# # # #
job-pr-autoscan: pr-autoscan:
name: 🎫 Issues Autoscan runs-on: ubuntu-latest
# runs-on: ubuntu-latest
runs-on: apollo-x64
timeout-minutes: 7
permissions: permissions:
contents: read contents: read
actions: read actions: read
@@ -155,19 +124,6 @@ jobs:
pull-requests: read pull-requests: read
steps: steps:
# #
# Cleanup Set Env Variables
# #
- name: >-
🕛 Get Timestamp
id: task_autocheck_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
# # # #
# action needed if using 'pull_request' and 'issue_comment' # action needed if using 'pull_request' and 'issue_comment'
# to get the pull request, you would normally use ${{ github.event.number }} # to get the pull request, you would normally use ${{ github.event.number }}
@@ -226,20 +182,15 @@ jobs:
} }
else else
{ {
const data = ( // Otherwise return issue number from commit
return (
await github.rest.repos.listPullRequestsAssociatedWithCommit( await github.rest.repos.listPullRequestsAssociatedWithCommit(
{ {
commit_sha: context.sha, commit_sha: context.sha,
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
}) })
).data[0]; ).data[ 0 ].number;
if (data) {
return data.number;
} else {
return '32';
}
} }
result-encoding: string result-encoding: string
@@ -264,7 +215,6 @@ jobs:
if: | if: |
( github.event_name == 'pull_request_target' ) || ( github.event_name == 'pull_request' ) || ( github.event_name == 'issue_comment' && contains( github.event.comment.html_url, '/pull/' ) && contains( github.event.comment.body, '/rescan' ) ) ( github.event_name == 'pull_request_target' ) || ( github.event_name == 'pull_request' ) || ( github.event_name == 'issue_comment' && contains( github.event.comment.html_url, '/pull/' ) && contains( github.event.comment.body, '/rescan' ) )
with: with:
token: ${{ secrets.ADMINSERV_TOKEN_CL || github.token }}
fetch-depth: 0 fetch-depth: 0
ref: "refs/pull/${{ steps.task_autocheck_issue_num_set.outputs.result }}/merge" ref: "refs/pull/${{ steps.task_autocheck_issue_num_set.outputs.result }}/merge"
@@ -289,7 +239,7 @@ jobs:
- name: >- - name: >-
📄 Get changed files 📄 Get changed files
id: task_autocheck_changed_files_get id: task_autocheck_changed_files_get
uses: tj-actions/changed-files@v46 uses: tj-actions/changed-files@v45
with: with:
separator: "," separator: ","
@@ -333,133 +283,18 @@ jobs:
id: task_autocheck_run id: task_autocheck_run
uses: actions/github-script@v7 uses: actions/github-script@v7
with: with:
github-token: ${{ secrets.ADMINSERV_TOKEN_CL }} github-token: ${{ secrets.ADMINSERV_TOKEN_CL || github.token }}
script: | script: |
console.log('Running Autoscan')
console.log(JSON.stringify(context, null, 4));
console.log(JSON.stringify(github, null, 4));
let ct = context;
/* #
# Example PR used for local act testing
# Uncomment to use in local env
#
# can be tested using act:
# - https://github.com/nektos/act
# command:
# git pull https://github.com/username/repo
# act -W .github/workflows/issues-scan.yml -P ubuntu-latest=catthehacker/ubuntu:full-22.04
# act -W .github/workflows/issues-scan.yml -s TOKEN_CL=XXXXXXXXXX --pull=false
# */
/*
ct = {
"issue": {
"number": 32
},
"repo": {
"owner": "TheBinaryNinja",
"repo": "TVApp2"
},
"payload": {
"action": "synchronize",
"after": "f087c5bea8800f41018ef328463531ea247547ef",
"before": "a8bdd791b80b2fbb78169234690ccb61b9d014f1",
"number": 32,
"organization": {
"avatar_url": "https://avatars.githubusercontent.com/u/200161462?v=4",
"events_url": "https://api.github.com/orgs/TheBinaryNinja/events",
"hooks_url": "https://api.github.com/orgs/TheBinaryNinja/hooks",
"issues_url": "https://api.github.com/orgs/TheBinaryNinja/issues",
"login": "TheBinaryNinja",
"members_url": "https://api.github.com/orgs/TheBinaryNinja/members{/member}",
"public_members_url": "https://api.github.com/orgs/TheBinaryNinja/public_members{/member}",
"repos_url": "https://api.github.com/orgs/TheBinaryNinja/repos",
"url": "https://api.github.com/orgs/TheBinaryNinja"
},
"pull_request": {
"created_at": "2025-03-17T23:32:22Z",
"updated_at": "2025-03-17T23:32:22Z",
"url": "https://api.github.com/repos/TheBinaryNinja/tvapp2",
"title": "Test PR Workflow",
"head": {
"ref": "main"
},
"base": {
"ref": "main"
},
"user": {
"login": "Aetherinox"
},
"labels": [
{
"color": "146b4a",
"default": false,
"description": "Ready to be reviewed",
"id": 7821944832,
"name": "AC Passed",
"node_id": "LA_kwDONW-GkM8AAAAB0jloAA",
"url": "https://api.github.com/repos/TheBinaryNinja/tvapp2/labels/AC%20%E2%80%BA%20Passed"
},
{
"color": "8F1784",
"default": false,
"description": "Normal pull request",
"id": 7821944963,
"name": "Type ◦ Pull Request",
"node_id": "LA_kwDONW-GkM8AAAAB0jlogw",
"url": "https://api.github.com/repos/TheBinaryNinja/tvapp2/labels/Type%20%E2%97%A6%20Pull%20Request"
}
]
},
},
"eventName": "pull_request_target",
"sha": "c938f7a21247f69b29cf352d0c6890a63f260d47",
"ref": "refs/heads/main",
"workflow": "🎫 Issues Scan",
"action": "task_autocheck_run",
"actor": "renovate[bot]",
"job": "job-pr-autoscan",
"runNumber": 45,
"runId": 13911964505,
"apiUrl": "https://api.github.com",
"serverUrl": "https://github.com",
"graphqlUrl": "https://api.github.com/graphql"
}
*/
/* #
# if local env ct isn't used, set ct to context for production
# */
if (!ct) {
ct = context;
}
const fs = require( 'fs' ); const fs = require( 'fs' );
const escape_html = ( unsafe ) => unsafe.replace( /&/g, '&amp;' ).replace( /</g, '&lt;' ).replace( />/g, '&gt;' ).replace( /"/g, '&quot;' ).replace( /'/g, '&#039;' ); const escape_html = ( unsafe ) => unsafe.replace( /&/g, '&amp;' ).replace( /</g, '&lt;' ).replace( />/g, '&gt;' ).replace( /"/g, '&quot;' ).replace( /'/g, '&#039;' );
const labels = []; const labels = [];
/* #
# Get existing labels and add to list
# */
const labelsExisting = await github.rest.issues.listLabelsOnIssue({
issue_number: ct.issue.number,
owner: ct.repo.owner,
repo: ct.repo.repo
})
labelsExisting.data.forEach(({ name }) => {
labels.push(name);
});
const files_List = `${{ steps.task_autocheck_changed_files_get.outputs.all_changed_files }}` || '' const files_List = `${{ steps.task_autocheck_changed_files_get.outputs.all_changed_files }}` || ''
const files_Array = files_List.split(',') const files_Array = files_List.split(',')
const branch_ref = `${ ct.payload.pull_request.head.ref }` const branch_ref = `${ context.payload.pull_request.head.ref }`
let message = [ "\n<br />\n" ] let message = [ "\n<br />\n" ]
message.push ( "## Automatic Self-Check - #" + ct.issue.number + "\n" ); message.push ( "## Automatic Self-Check - #" + context.issue.number + "\n" );
message.push ( `The details of our automated scan for your pull request are listed below. If our scan detected errors, they must be corrected before this pull request will be advanced to the review stage:\n` ); message.push ( `The details of our automated scan for your pull request are listed below. If our scan detected errors, they must be corrected before this pull request will be advanced to the review stage:\n` );
message.push ( "\n<br />\n\n---\n\n<br />\n\n" ); message.push ( "\n<br />\n\n---\n\n<br />\n\n" );
message.push ( "### About\nThis pull request includes the following information:" ); message.push ( "### About\nThis pull request includes the following information:" );
@@ -467,7 +302,7 @@ jobs:
let bHasError = false; let bHasError = false;
let bHasWarning = false; let bHasWarning = false;
let date = new Date( `${ ct.payload.pull_request.created_at }` ); let date = new Date( `${ context.payload.pull_request.created_at }` );
date.toISOString( ) date.toISOString( )
const actor = '${{ github.actor }}'; const actor = '${{ github.actor }}';
@@ -493,20 +328,20 @@ jobs:
let date_created = dateTimeformat( date ) + " UTC"; let date_created = dateTimeformat( date ) + " UTC";
/* # /*
# ct.payload.pull_request.base.repo.owner.login context.payload.pull_request.base.repo.owner.login
# */ */
let md_table = let md_table =
` `
| Category | Value | | Category | Value |
| --- | --- | | --- | --- |
| Title | [ ` + ct.payload.pull_request.title + ` ](https://github.com/` + ct.repo.owner + `/` + ct.repo.repo + `/pull/` + ct.payload.pull_request.number + `) | | Title | [ ` + context.payload.pull_request.title + ` ](https://github.com/` + context.repo.owner + `/` + context.repo.repo + `/pull/` + context.payload.pull_request.number + `) |
| Created | [ ` + date_created + ` ](https://worldtimebuddy.com) | | Created | [ ` + date_created + ` ](https://worldtimebuddy.com) |
| ID | ` + ct.payload.pull_request.html_url + ` | | ID | ` + context.payload.pull_request.html_url + ` |
| Author | [ ` + ct.payload.pull_request.user.login + ` ](https://github.com/` + ct.repo.owner + `/) | | Author | [ ` + context.payload.pull_request.user.login + ` ](https://github.com/` + context.repo.owner + `/) |
| Repo | [ ` + ct.repo.repo + ` ](https://github.com/` + ct.repo.owner + `/` + ct.repo.repo + `) | | Repo | [ ` + context.repo.repo + ` ](https://github.com/` + context.repo.owner + `/` + context.repo.repo + `) |
| Branch | [ ` + ct.payload.pull_request.head.ref + `](https://github.com/` + ct.repo.owner + `/` + ct.repo.repo + `/tree/` + ct.payload.pull_request.head.ref + `) ⇁ [ ` + ct.payload.pull_request.base.ref + `](https://github.com/` + ct.repo.owner + `/` + ct.repo.repo + `/tree/` + ct.payload.pull_request.base.ref + `) | | Branch | [ ` + context.payload.pull_request.head.ref + `](https://github.com/` + context.repo.owner + `/` + context.repo.repo + `/tree/` + context.payload.pull_request.head.ref + `) ⇁ [ ` + context.payload.pull_request.base.ref + `](https://github.com/` + context.repo.owner + `/` + context.repo.repo + `/tree/` + context.payload.pull_request.base.ref + `) |
| Added Files | ${{ steps.task_autocheck_changed_files_get.outputs.added_files_count }} | | Added Files | ${{ steps.task_autocheck_changed_files_get.outputs.added_files_count }} |
| Modified Files | ${{ steps.task_autocheck_changed_files_get.outputs.all_modified_files_count }} | | Modified Files | ${{ steps.task_autocheck_changed_files_get.outputs.all_modified_files_count }} |
| Renamed Files | ${{ steps.task_autocheck_changed_files_get.outputs.renamed_files_count }} | | Renamed Files | ${{ steps.task_autocheck_changed_files_get.outputs.renamed_files_count }} |
@@ -541,14 +376,12 @@ jobs:
const type_dependency = const type_dependency =
[ [
"dependabot/npm_and_yarn", "dependabot/npm_and_yarn"
"renovate/github_actions"
]; ];
const type_gitaction = const type_gitaction =
[ [
"dependabot/github_actions", "dependabot/github_actions"
"renovate/github_actions"
]; ];
const files_skipList = const files_skipList =
@@ -869,7 +702,7 @@ jobs:
if ( bHasError == true ) if ( bHasError == true )
{ {
labels.push( "${{ env.LABEL_CHECK_STATUS_FAILED }}" ); labels.push( "${{ env.LABEL_CHECK_STATUS_FAILED }}" );
core.setFailed( "Pull Request Failed Autocheck: " + ct.issue.number + ": " + ct.payload.pull_request.title + "." ); core.setFailed( "Pull Request Failed Autocheck: " + context.issue.number + ": " + context.payload.pull_request.title + "." );
} }
/* /*
@@ -883,21 +716,21 @@ jobs:
change pr title change pr title
*/ */
const pr_title = `${ ct.payload.pull_request.title }`; const pr_title = `${ context.payload.pull_request.title }`;
const pr_title_append = `PR ${ ct.issue.number }:`; const pr_title_append = `PR ${ context.issue.number }:`;
if ( !pr_title.startsWith( pr_title_append ) && actor != "${{ env.BOT_NAME_RENOVATE }}" ) if ( !pr_title.startsWith( pr_title_append ) )
{ {
await github.rest.pulls.update( await github.rest.pulls.update(
{ {
owner: ct.repo.owner, owner: context.repo.owner,
repo: ct.repo.repo, repo: context.repo.repo,
pull_number: ct.issue.number, pull_number: context.issue.number,
title: `${ pr_title_append } ${ ct.payload.pull_request.title }` title: `${ pr_title_append } ${ context.payload.pull_request.title }`
} ); } );
} }
if ( !ct.payload.pull_request.labels.filter( label => label.name === "${{ env.LABEL_CHECK_CHANGES_REQ }}" ).length > 0 ) if ( !context.payload.pull_request.labels.filter( label => label.name === "${{ env.LABEL_CHECK_CHANGES_REQ }}" ).length > 0 )
labels.push( "${{ env.LABEL_CHECK_REVIEW_READY }}" ); labels.push( "${{ env.LABEL_CHECK_REVIEW_READY }}" );
} }
@@ -908,24 +741,24 @@ jobs:
const bGitaction = type_gitaction.some( s => s.includes( branch_ref ) || branch_ref.includes( s ) ); const bGitaction = type_gitaction.some( s => s.includes( branch_ref ) || branch_ref.includes( s ) );
const bDependency = type_dependency.some( s => s.includes( branch_ref ) || branch_ref.includes( s ) ); const bDependency = type_dependency.some( s => s.includes( branch_ref ) || branch_ref.includes( s ) );
if ( actor == "${{ env.BOT_NAME_DEPENDABOT }}" && bDependency || actor == "${{ env.BOT_NAME_RENOVATE }}" && bDependency ) if ( actor == "${{ env.BOT_NAME_DEPENDABOT }}" && bDependency )
labels.push( "${{ env.LABEL_TYPE_DEPENDENCY }}" ); labels.push( "${{ env.LABEL_TYPE_DEPENDENCY }}" );
else if ( actor == "${{ env.BOT_NAME_DEPENDABOT }}" && bGitaction || actor == "${{ env.BOT_NAME_RENOVATE }}" && bGitaction ) else if ( actor == "${{ env.BOT_NAME_DEPENDABOT }}" && bGitaction )
labels.push( "${{ env.LABEL_TYPE_GITACTION }}" ); labels.push( "${{ env.LABEL_TYPE_GITACTION }}" );
if ( ct.payload.pull_request.labels.filter( label => label.name === "${{ env.LABEL_CHECK_CHANGES_REQ }}" ).length > 0 ) if ( context.payload.pull_request.labels.filter( label => label.name === "${{ env.LABEL_CHECK_CHANGES_REQ }}" ).length > 0 )
labels.push( "${{ env.LABEL_CHECK_CHANGES_REQ }}" ); labels.push( "${{ env.LABEL_CHECK_CHANGES_REQ }}" );
if (ct.payload.pull_request.labels.filter(label => label.name === "${{ env.LABEL_CHECK_REBASE_REQ }}" ).length > 0 ) if (context.payload.pull_request.labels.filter(label => label.name === "${{ env.LABEL_CHECK_REBASE_REQ }}" ).length > 0 )
labels.push( "${{ env.LABEL_CHECK_REBASE_REQ }}" ); labels.push( "${{ env.LABEL_CHECK_REBASE_REQ }}" );
if ( ct.payload.pull_request.labels.filter(label => label.name === "${{ env.LABEL_CHECK_SECURITY_ERR }}" ).length > 0 ) if ( context.payload.pull_request.labels.filter(label => label.name === "${{ env.LABEL_CHECK_SECURITY_ERR }}" ).length > 0 )
labels.push( "${{ env.LABEL_CHECK_SECURITY_ERR }}" ); labels.push( "${{ env.LABEL_CHECK_SECURITY_ERR }}" );
if (ct.payload.pull_request.labels.filter( label => label.name === "${{ env.LABEL_CHECK_STATUS_CHGMADE }}" ).length > 0 ) if (context.payload.pull_request.labels.filter( label => label.name === "${{ env.LABEL_CHECK_STATUS_CHGMADE }}" ).length > 0 )
labels.push( "${{ env.LABEL_CHECK_STATUS_CHGMADE }}" ); labels.push( "${{ env.LABEL_CHECK_STATUS_CHGMADE }}" );
if ( ct.payload.pull_request.labels.filter( label => label.name === "${{ env.LABEL_CHECK_SCAN_SKIPPED }}" ).length > 0 ) if ( context.payload.pull_request.labels.filter( label => label.name === "${{ env.LABEL_CHECK_SCAN_SKIPPED }}" ).length > 0 )
labels.push( "${{ env.LABEL_CHECK_SCAN_SKIPPED }}" ); labels.push( "${{ env.LABEL_CHECK_SCAN_SKIPPED }}" );
labels.push( "${{ env.LABEL_TYPE_PR }}" ); labels.push( "${{ env.LABEL_TYPE_PR }}" );
@@ -936,9 +769,9 @@ jobs:
await github.rest.issues.setLabels( await github.rest.issues.setLabels(
{ {
issue_number: ct.issue.number, issue_number: context.issue.number,
owner: ct.repo.owner, owner: context.repo.owner,
repo: ct.repo.repo, repo: context.repo.repo,
labels, labels,
} ); } );
@@ -948,122 +781,8 @@ jobs:
await github.rest.issues.createComment( await github.rest.issues.createComment(
{ {
issue_number: ct.issue.number, issue_number: context.issue.number,
owner: ct.repo.owner, owner: context.repo.owner,
repo: ct.repo.repo, repo: context.repo.repo,
body: message.join('\n'), body: message.join('\n'),
} ); } );
# #
# Autoscan Get Weekly Commits
# #
- name: >-
🕛 Get Weekly Commit List
id: task_autocheck_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
# #
# Autoscan Notify Github Success
# #
- name: >-
🔔 Send Discord Webhook Message (Success)
id: task_autocheck_notify_discord_success
uses: tsickert/discord-webhook@v7.0.0
if: success()
with:
username: 'Io'
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKfLOWS }}
embed-title: "⚙️ ${{ github.workflow_ref }}"
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-thumbnail-url: 'https://cdn.pixabay.com/photo/2022/01/30/13/33/github-6980894_960_720.png'
embed-description: |
## 🎫 Issues Scan ${{ job.status == 'success' && '✅' || '❌' }}
**${{ job.status == 'success' && '✅ Success' || '❌ Failure' }}** Your container just ran the `Issues Scan` workflow. Every time this workflow is ran, your list of pull requests will be scanned to determine what files have been changed. It will scan each modified file and see if the code conforms with our rules, and will then post a status report inside the pull request that is open.
The PR will be assigned tags depending on the outcome of the code scan. If issues are detected in the code, a list of each file and issue will be posted in the PR.
- Workflow: `${{ github.workflow }} (#${{github.run_number}})`
- Runner: `${{ runner.name }}`
- Triggered By: `${{ github.actor }}`
- Status: `${{ job.status == 'success' && '✅ Successful' || '❌ Failed' }}`
## ${{ github.event.pull_request.title }} (${{ github.event.pull_request.number }})
- Pull Request: ${{ github.event.pull_request.html_url }}
- Author: https://github.com/${{ github.event.pull_request.user.login }} (${{ github.event.pull_request.author_association }})
- Repo: https://github.com/${{ github.repository }}
- Branch: `${{ github.head_ref }}`
- Author: https://github.com/${{ github.event.pull_request.user.login }} (${{ github.event.pull_request.author_association }})
- Status: `${{ github.event.pull_request.state }}`
### Scan Results
- Added Files: ${{ steps.task_autocheck_changed_files_get.outputs.added_files_count }}
- Modified Files: ${{ steps.task_autocheck_changed_files_get.outputs.all_modified_files_count }}
- Renamed Files: ${{ steps.task_autocheck_changed_files_get.outputs.renamed_files_count }}
- Copied Files: ${{ steps.task_autocheck_changed_files_get.outputs.copied_files_count }}
- Deleted Files: ${{ steps.task_autocheck_changed_files_get.outputs.deleted_files_count }}
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.pull_request.user.login }}"
embed-author-url: "${{ github.event.pull_request.html_url }}"
embed-author-icon-url: "${{ github.event.pull_request.user.avatar_url }}"
# #
# Autoscan Notify Github Failure
# #
- name: >-
🔔 Send Discord Webhook Message (Failure)
id: task_autocheck_notify_discord_failure
uses: tsickert/discord-webhook@v7.0.0
if: failure()
with:
username: 'Io'
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKfLOWS }}
embed-title: "⚙️ ${{ github.workflow_ref }}"
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-thumbnail-url: 'https://cdn.pixabay.com/photo/2022/01/30/13/33/github-6980894_960_720.png'
embed-description: |
## 🎫 Issues Scan ${{ job.status == 'success' && '✅' || '❌' }}
**${{ job.status == 'success' && '✅ Success' || '❌ Failure' }}** Your container just ran the `Issues Scan` workflow. Every time this workflow is ran, your list of pull requests will be scanned to determine what files have been changed. It will scan each modified file and see if the code conforms with our rules, and will then post a status report inside the pull request that is open.
The PR will be assigned tags depending on the outcome of the code scan. If issues are detected in the code, a list of each file and issue will be posted in the PR.
- Workflow: `${{ github.workflow }} (#${{github.run_number}})`
- Runner: `${{ runner.name }}`
- Triggered By: `${{ github.actor }}`
- Status: `${{ job.status == 'success' && '✅ Successful' || '❌ Failed' }}`
## ${{ github.event.pull_request.title }} (${{ github.event.pull_request.number }})
- Pull Request: ${{ github.event.pull_request.html_url }}
- Author: https://github.com/${{ github.event.pull_request.user.login }} (${{ github.event.pull_request.author_association }})
- Repo: https://github.com/${{ github.repository }}
- Branch: `${{ github.head_ref }}`
- Author: https://github.com/${{ github.event.pull_request.user.login }} (${{ github.event.pull_request.author_association }})
- Status: `${{ github.event.pull_request.state }}`
### Scan Results
- Added Files: ${{ steps.task_autocheck_changed_files_get.outputs.added_files_count }}
- Modified Files: ${{ steps.task_autocheck_changed_files_get.outputs.all_modified_files_count }}
- Renamed Files: ${{ steps.task_autocheck_changed_files_get.outputs.renamed_files_count }}
- Copied Files: ${{ steps.task_autocheck_changed_files_get.outputs.copied_files_count }}
- Deleted Files: ${{ steps.task_autocheck_changed_files_get.outputs.deleted_files_count }}
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.pull_request.user.login }}"
embed-author-url: "${{ github.event.pull_request.html_url }}"
embed-author-icon-url: "${{ github.event.pull_request.user.avatar_url }}"

55
.github/workflows/issues-stale.yml vendored Executable file → Normal file
View File

@@ -1,15 +1,16 @@
# # # #
# @type github workflow # @type github workflow
# @author Aetherinox # @desc creates repository labels if they are not yet installed
# @url https://github.com/Aetherinox
# @usage creates repository labels if they are not yet installed
# issues marked as stale after 30 days, given tag Status 𐄂 Stale # issues marked as stale after 30 days, given tag Status 𐄂 Stale
# inactive issues closed after 180 days, given tag Status 𐄂 Locked # inactive issues closed after 180 days, given tag Status 𐄂 Locked
# inactive pr closed after 365 days, given tag Status 𐄂 Locked # inactive pr closed after 365 days, given tag Status 𐄂 Locked
# issues marked stale after 30 days, given tag Status 𐄂 Stale # issues marked stale after 30 days, given tag Status 𐄂 Stale
# issues marked closed 7 days after being marked stale, given tag Status 𐄂 Autoclosed # issues marked closed 7 days after being marked stale, given tag Status 𐄂 Autoclosed
# @author Aetherinox
# @url https://github.com/Aetherinox
# #
# @notes This Github action must be activated manually. This workflow script will do the following: # This Github action must be activated manually. This workflow script will do the
# following:
# #
# - Scan issues / pull requests and make sure they have properly assigned labels: # - Scan issues / pull requests and make sure they have properly assigned labels:
# - `Bug` # - `Bug`
@@ -21,31 +22,6 @@
# if they haven't had any replies in 30 days. # if they haven't had any replies in 30 days.
# #
# - Workflow will `autoclose` pr or issues which haven't had action in `365 days`. # - Workflow will `autoclose` pr or issues which haven't had action in `365 days`.
#
# @secrets secrets.SELF_TOKEN self github personal access token (fine-grained)
# secrets.SELF_TOKEN_CL self github personal access token (classic)
# secrets.NPM_TOKEN self npmjs access token
# secrets.PYPI_API_TOKEN self Pypi API token (production site) - https://pypi.org/
# secrets.PYPI_API_TEST_TOKEN self Pypi API token (test site) - https://test.pypi.org/
# secrets.SELF_DOCKERHUB_TOKEN self Dockerhub token
# secrets.ORG_BINARYNINJA_TOKEN org github personal access token (fine-grained)
# secrets.ORG_BINARYNINJA_TOKEN_CL org github personal access token (classic)
# secrets.ORG_BINARYNINJA_DOCKERHUB_TOKEN org dockerhub secret
# secrets.ORG_BINARYNINJA_GITEA_TOKEN org gitea personal access token (classic) with package:write permission
# secrets.BINARYSERV_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
# secrets.BINARYSERV_GPG_PASSPHRASE bot gpg private key passphrase
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES discord webhook to report release notifications from github to discord
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKFLOWS discord webhook to report workflow notifications from github to discord
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_UPDATES discord webhook to report activity notifications from github to discord
#
# @local these workflows can be tested locally through the use of `act`
# https://github.com/nektos/act
# Extract act to folder
# Add system env var with path to act.exe
# Run the commands:
# git pull https://github.com/username/repo
# act -W .github/workflows/issues-stale.yml -P ubuntu-latest=catthehacker/ubuntu:full-22.04
# act -W .github/workflows/issues-stale.yml -s TOKEN_CL=XXXXXXXXXX --pull=false
# # # #
name: "🎫 Issues Stale" name: "🎫 Issues Stale"
@@ -65,15 +41,15 @@ on:
# # # #
env: env:
PREFIX_BUG: "🐛 Bug" PREFIX_BUG: "Bug"
PREFIX_DEPENDENCY: "Dependency" PREFIX_DEPENDENCY: "Dependency"
PREFIX_DOCS: "Docs" PREFIX_DOCS: "Docs"
PREFIX_FEATURE: "💡 Feature" PREFIX_FEATURE: "Feature"
PREFIX_GIT: "Git Action" PREFIX_GIT: "Git Action"
PREFIX_PR: "PR" PREFIX_PR: "PR"
PREFIX_ROADMAP: "🗺️ Roadmap" PREFIX_ROADMAP: "Roadmap"
PREFIX_INTERNAL: "Internal" PREFIX_INTERNAL: "Internal"
PREFIX_URGENT: "Urgent" PREFIX_URGENT: "Urgent"
LABEL_BUG: "Type ◦ Bug" LABEL_BUG: "Type ◦ Bug"
LABEL_DEPENDENCY: "Type ◦ Dependency" LABEL_DEPENDENCY: "Type ◦ Dependency"
@@ -85,12 +61,8 @@ env:
LABEL_INTERNAL: "Type ◦ Internal" LABEL_INTERNAL: "Type ◦ Internal"
LABEL_URGENT: "⚠ Urgent" LABEL_URGENT: "⚠ Urgent"
ASSIGN_USER: Aetherinox
BOT_NAME_1: EuropaServ BOT_NAME_1: EuropaServ
BOT_NAME_2: BinaryServ
BOT_NAME_DEPENDABOT: dependabot[bot] BOT_NAME_DEPENDABOT: dependabot[bot]
BOT_NAME_RENOVATE: renovate[bot]
LABELS_JSON: | LABELS_JSON: |
[ [
{ "name": "AC Changes Made", "color": "8F1784", "description": "Requested changes have been made and are pending a re-scan" }, { "name": "AC Changes Made", "color": "8F1784", "description": "Requested changes have been made and are pending a re-scan" },
@@ -170,7 +142,6 @@ jobs:
name: >- name: >-
🎫 Labels Verify Existing 🎫 Labels Verify Existing
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 4
steps: steps:
# # # #
@@ -246,7 +217,6 @@ jobs:
name: >- name: >-
🎫 Labels Assign Missing 🎫 Labels Assign Missing
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 4
needs: job-labels-create needs: job-labels-create
steps: steps:
@@ -614,7 +584,6 @@ jobs:
name: >- name: >-
💤 Check Stale 💤 Check Stale
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 4
needs: needs:
- job-labels-create - job-labels-create
- job-issues-nolabel - job-issues-nolabel
@@ -634,7 +603,8 @@ jobs:
with: with:
repo-token: ${{ secrets.ADMINSERV_TOKEN_CL }} repo-token: ${{ secrets.ADMINSERV_TOKEN_CL }}
stale-issue-message: | stale-issue-message: |
⚠️ It looks like there hasn't been any recent updates on this issue. If you created this issue and no longer consider it open, then please login to github and close the issue. ⚠️ It looks like there hasn't been any recent updates on this issue. If you created this issue and no longer consider it
open, then please login to github and close the issue.
If there is no further activity on this issue, it will be automatically closed in the next week. If there is no further activity on this issue, it will be automatically closed in the next week.
@@ -644,7 +614,7 @@ jobs:
stale-issue-label: 'Status 𐄂 Stale' stale-issue-label: 'Status 𐄂 Stale'
close-issue-label: 'Status 𐄂 Autoclosed' close-issue-label: 'Status 𐄂 Autoclosed'
exempt-issue-labels: 'Status 𐄂 Accepted,Status 𐄂 Review,Status 𐄂 Pending,Type ◦ Bug,Type ◦ Dependency,Type ◦ Docs,Type ◦ Feature,Type ◦ Git Action,Type ◦ Pull Request,Type ◦ Roadmap' exempt-issue-labels: 'Status 𐄂 Accepted,Status 𐄂 Review,Status 𐄂 Pending,Type ◦ Bug,Type ◦ Dependency,Type ◦ Docs,Type ◦ Feature,Type ◦ Git Action,Type ◦ Pull Request,Type ◦ Roadmap'
days-before-stale: 60 days-before-stale: 14
days-before-close: 7 days-before-close: 7
days-before-pr-stale: -1 days-before-pr-stale: -1
days-before-pr-close: -1 days-before-pr-close: -1
@@ -657,7 +627,6 @@ jobs:
name: >- name: >-
🔒 Check Inactive 🔒 Check Inactive
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 4
needs: needs:
- job-labels-create - job-labels-create
- job-issues-nolabel - job-issues-nolabel

View File

@@ -4,33 +4,10 @@
# @author Aetherinox # @author Aetherinox
# @url https://github.com/Aetherinox # @url https://github.com/Aetherinox
# #
# @notes This Github action must be activated manually. This workflow script will do the following: # This Github action must be activated manually. This workflow script will do the
# following:
#
# - Remove all existing labels in repository # - Remove all existing labels in repository
#
# @secrets secrets.SELF_TOKEN self github personal access token (fine-grained)
# secrets.SELF_TOKEN_CL self github personal access token (classic)
# secrets.NPM_TOKEN self npmjs access token
# secrets.PYPI_API_TOKEN self Pypi API token (production site) - https://pypi.org/
# secrets.PYPI_API_TEST_TOKEN self Pypi API token (test site) - https://test.pypi.org/
# secrets.SELF_DOCKERHUB_TOKEN self Dockerhub token
# secrets.ORG_BINARYNINJA_TOKEN org github personal access token (fine-grained)
# secrets.ORG_BINARYNINJA_TOKEN_CL org github personal access token (classic)
# secrets.ORG_BINARYNINJA_DOCKERHUB_TOKEN org dockerhub secret
# secrets.ORG_BINARYNINJA_GITEA_TOKEN org gitea personal access token (classic) with package:write permission
# secrets.BINARYSERV_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
# secrets.BINARYSERV_GPG_PASSPHRASE bot gpg private key passphrase
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES discord webhook to report release notifications from github to discord
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKFLOWS discord webhook to report workflow notifications from github to discord
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_UPDATES discord webhook to report activity notifications from github to discord
#
# @local these workflows can be tested locally through the use of `act`
# https://github.com/nektos/act
# Extract act to folder
# Add system env var with path to act.exe
# Run the commands:
# git pull https://github.com/username/repo
# act -W .github/workflows/labels-clean.yml -P ubuntu-latest=catthehacker/ubuntu:full-22.04
# act -W .github/workflows/labels-clean.yml -s TOKEN_CL=XXXXXXXXXX --pull=false
# # # #
name: "🎫 Labels Remove" name: "🎫 Labels Remove"
@@ -48,23 +25,10 @@ on:
# # # #
env: env:
ASSIGN_USER: Aetherinox
BOT_NAME_1: EuropaServ BOT_NAME_1: EuropaServ
BOT_NAME_2: BinaryServ
BOT_NAME_DEPENDABOT: dependabot[bot] BOT_NAME_DEPENDABOT: dependabot[bot]
BOT_NAME_RENOVATE: renovate[bot]
LABELS_JSON: | LABELS_JSON: |
[ [
{ "name": "bug", "color": "8F1784", "description": "Default github label" },
{ "name": "documentation", "color": "8F1784", "description": "Default github label" },
{ "name": "duplicate", "color": "8F1784", "description": "Default github label" },
{ "name": "enhancement", "color": "8F1784", "description": "Default github label" },
{ "name": "good first issue", "color": "8F1784", "description": "Default github label" },
{ "name": "help wanted", "color": "8F1784", "description": "Default github label" },
{ "name": "invalid", "color": "8F1784", "description": "Default github label" },
{ "name": "question", "color": "8F1784", "description": "Default github label" },
{ "name": "wontfix", "color": "8F1784", "description": "Default github label" },
{ "name": "AC Changes Made", "color": "8F1784", "description": "Requested changes have been made and are pending a re-scan" }, { "name": "AC Changes Made", "color": "8F1784", "description": "Requested changes have been made and are pending a re-scan" },
{ "name": "AC Changes Required", "color": "8F1784", "description": "Requires changes to be made to the package before being accepted" }, { "name": "AC Changes Required", "color": "8F1784", "description": "Requires changes to be made to the package before being accepted" },
{ "name": "AC Failed", "color": "a61f2d", "description": "Autocheck failed to run through a complete cycle, requires investigation" }, { "name": "AC Failed", "color": "a61f2d", "description": "Autocheck failed to run through a complete cycle, requires investigation" },
@@ -140,9 +104,7 @@ jobs:
issues-labels-remove: issues-labels-remove:
name: >- name: >-
🎫 Labels Remove 🎫 Labels Remove
# runs-on: ubuntu-latest runs-on: ubuntu-latest
runs-on: apollo-x64
timeout-minutes: 4
permissions: permissions:
contents: 'read' contents: 'read'
id-token: 'write' id-token: 'write'
@@ -150,7 +112,7 @@ jobs:
steps: steps:
# # # #
# Labels Start # [ Delete Labels ] Start
# # # #
- name: >- - name: >-
@@ -160,20 +122,7 @@ jobs:
echo "Starting workflow" echo "Starting workflow"
# # # #
# Labels Set Env Variables # [ Delete Labels ] Checkout
# #
- name: >-
🕛 Get Timestamp
id: task_label_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
# #
# Labels Checkout
# # # #
- name: >- - name: >-
@@ -184,7 +133,7 @@ jobs:
fetch-depth: 0 fetch-depth: 0
# # # #
# Labels Start # [ Delete Labels ] Start
# # # #
- name: >- - name: >-
@@ -216,7 +165,6 @@ jobs:
}); });
// const labels = JSON.parse( process.env.LABELS_JSON ); // const labels = JSON.parse( process.env.LABELS_JSON );
let result = Object.keys(labels).length;
for ( const label of labels ) for ( const label of labels )
{ {
try try
@@ -233,89 +181,3 @@ jobs:
console.error("Error: " + err); console.error("Error: " + err);
} }
} }
console.log("[Success]: Added " + result + " labels to repo");
return result
# #
# Labels Get Weekly Commits
# #
- name: >-
🕛 Get Weekly Commit List
id: task_label_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
# #
# Labels Notify Github Success
# #
- name: >-
🔔 Send Discord Webhook Message (Success)
id: task_label_notify_discord_success
uses: tsickert/discord-webhook@v7.0.0
if: success()
with:
username: 'Io'
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_TVAPP2_WORKFLOWS }}
embed-title: "⚙️ ${{ github.workflow_ref }}"
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg'
embed-description: |
## 🎫 Labels Clean ${{ job.status == 'success' && '✅' || '❌' }}
A **successful** workflow has been ran to wipe all labels from your repository.
**${{ steps.task_label_remove_run.outputs.result }}** labels have been removed.
- Labels: `${{ steps.task_label_remove_run.outputs.result }} created`
- Workflow: `${{ github.workflow }} (#${{github.run_number}})`
- Runner: `${{ runner.name }}`
- Triggered By: `${{ github.actor }}`
- Status: `${{ job.status == 'success' && '✅ Successful' || '❌ Failed' }}`
embed-color: ${{ job.status == 'success' && '5763719' || '15418782' }}
embed-footer-text: "Completed at ${{ env.NOW }} UTC"
embed-timestamp: "${{ env.NOW_LONG }}"
embed-author-name: "${{ github.repository_owner }}"
embed-author-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-author-icon-url: "https://avatars.githubusercontent.com/u/200161462"
# #
# Labels Notify Github Failure
# #
- name: >-
🔔 Send Discord Webhook Message (Failure)
id: task_label_notify_discord_failure
uses: tsickert/discord-webhook@v7.0.0
if: failure()
with:
username: 'Io'
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_TVAPP2_WORKFLOWS }}
embed-title: "⚙️ ${{ github.workflow_ref }}"
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg'
embed-description: |
## 🎫 Labels Clean ${{ job.status == 'success' && '✅' || '❌' }}
A **failed** attempt was made to run this workflow. No new labels have been added to your repository.
- Labels: `${{ steps.task_label_remove_run.outputs.result }} created`
- Workflow: `${{ github.workflow }} (#${{github.run_number}})`
- Runner: `${{ runner.name }}`
- Triggered By: `${{ github.actor }}`
- Status: `${{ job.status == 'success' && '✅ Successful' || '❌ Failed' }}`
embed-color: ${{ job.status == 'success' && '5763719' || '15418782' }}
embed-footer-text: "Completed at ${{ env.NOW }} UTC"
embed-timestamp: "${{ env.NOW_LONG }}"
embed-author-name: "${{ github.repository_owner }}"
embed-author-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-author-icon-url: "https://avatars.githubusercontent.com/u/200161462"

140
.github/workflows/labels-create.yml vendored Executable file → Normal file
View File

@@ -1,10 +1,11 @@
# # # #
# @type github workflow # @type github workflow
# @desc manually activated workflow to create issue labels
# @author Aetherinox # @author Aetherinox
# @url https://github.com/Aetherinox # @url https://github.com/Aetherinox
# @usage manually activated workflow to create issue labels
# #
# @notes This Github action must be activated manually. This workflow script will do the following: # This Github action must be activated manually. This workflow script will do the
# following:
# #
# - Scan issues / pull requests and make sure they have properly assigned labels: # - Scan issues / pull requests and make sure they have properly assigned labels:
# - `Bug` # - `Bug`
@@ -16,31 +17,6 @@
# if they haven't had any replies in 30 days. # if they haven't had any replies in 30 days.
# #
# - Workflow will `autoclose` pr or issues which haven't had action in `365 days`. # - Workflow will `autoclose` pr or issues which haven't had action in `365 days`.
#
# @secrets secrets.SELF_TOKEN self github personal access token (fine-grained)
# secrets.SELF_TOKEN_CL self github personal access token (classic)
# secrets.NPM_TOKEN self npmjs access token
# secrets.PYPI_API_TOKEN self Pypi API token (production site) - https://pypi.org/
# secrets.PYPI_API_TEST_TOKEN self Pypi API token (test site) - https://test.pypi.org/
# secrets.SELF_DOCKERHUB_TOKEN self Dockerhub token
# secrets.ORG_BINARYNINJA_TOKEN org github personal access token (fine-grained)
# secrets.ORG_BINARYNINJA_TOKEN_CL org github personal access token (classic)
# secrets.ORG_BINARYNINJA_DOCKERHUB_TOKEN org dockerhub secret
# secrets.ORG_BINARYNINJA_GITEA_TOKEN org gitea personal access token (classic) with package:write permission
# secrets.BINARYSERV_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
# secrets.BINARYSERV_GPG_PASSPHRASE bot gpg private key passphrase
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES discord webhook to report release notifications from github to discord
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKFLOWS discord webhook to report workflow notifications from github to discord
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_UPDATES discord webhook to report activity notifications from github to discord
#
# @local these workflows can be tested locally through the use of `act`
# https://github.com/nektos/act
# Extract act to folder
# Add system env var with path to act.exe
# Run the commands:
# git pull https://github.com/username/repo
# act -W .github/workflows/labels-create.yml -P ubuntu-latest=catthehacker/ubuntu:full-22.04
# act -W .github/workflows/labels-create.yml -s TOKEN_CL=XXXXXXXXXX --pull=false
# # # #
name: "🎫 Labels Create" name: "🎫 Labels Create"
@@ -58,12 +34,10 @@ on:
# # # #
env: env:
ASSIGN_USER: Aetherinox BOT_NAME_1: AdminServ
BOT_NAME_1: EuropaServ BOT_NAME_2: AdminServX
BOT_NAME_2: BinaryServ BOT_NAME_3: EuropaServ
BOT_NAME_DEPENDABOT: dependabot[bot] BOT_NAME_DEPENDABOT: dependabot[bot]
BOT_NAME_RENOVATE: renovate[bot]
LABELS_JSON: | LABELS_JSON: |
[ [
{ "name": "AC Changes Made", "color": "8F1784", "description": "Requested changes have been made and are pending a re-scan" }, { "name": "AC Changes Made", "color": "8F1784", "description": "Requested changes have been made and are pending a re-scan" },
@@ -159,19 +133,6 @@ jobs:
run: | run: |
echo "Assigning labels and assignees" echo "Assigning labels and assignees"
# #
# Create Labels Set Env Variables
# #
- name: >-
🕛 Get Timestamp
id: task_label_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
# # # #
# [ Create Labels ] Checkout # [ Create Labels ] Checkout
# # # #
@@ -189,13 +150,11 @@ jobs:
- name: >- - name: >-
🏷️ Verify Existing Labels 🏷️ Verify Existing Labels
id: task_label_verify_existing
uses: actions/github-script@v7 uses: actions/github-script@v7
with: with:
github-token: ${{ secrets.ADMINSERV_TOKEN_CL }} github-token: ${{ secrets.ADMINSERV_TOKEN_CL }}
script: | script: |
const labels = JSON.parse( process.env.LABELS_JSON ); const labels = JSON.parse( process.env.LABELS_JSON );
let result = Object.keys(labels).length;
for ( const label of labels ) for ( const label of labels )
{ {
try try
@@ -221,90 +180,3 @@ jobs:
} }
} }
} }
console.log("[Success]: Added " + result + " labels to repo");
return result
# #
# Cleanup Get Weekly Commits
# #
- name: >-
🕛 Get Weekly Commit List
id: task_label_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
# #
# Cleanup Notify Github Success
# #
- name: >-
🔔 Send Discord Webhook Message (Success)
id: task_label_notify_discord_success
uses: tsickert/discord-webhook@v7.0.0
if: success()
with:
username: 'Io'
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_TVAPP2_WORKFLOWS }}
embed-title: "⚙️ ${{ github.workflow_ref }}"
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg'
embed-description: |
## 🎫 Labels Create ${{ job.status == 'success' && '✅' || '❌' }}
A **successful** workflow has been ran to generate labels for your repository.
**${{ steps.task_label_verify_existing.outputs.result }}** labels have been added.
- Labels: `${{ steps.task_label_verify_existing.outputs.result }} created`
- Workflow: `${{ github.workflow }} (#${{github.run_number}})`
- Runner: `${{ runner.name }}`
- Triggered By: `${{ github.actor }}`
- Status: `${{ job.status == 'success' && '✅ Successful' || '❌ Failed' }}`
embed-color: ${{ job.status == 'success' && '5763719' || '15418782' }}
embed-footer-text: "Completed at ${{ env.NOW }} UTC"
embed-timestamp: "${{ env.NOW_LONG }}"
embed-author-name: "${{ github.repository_owner }}"
embed-author-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-author-icon-url: "https://avatars.githubusercontent.com/u/200161462"
# #
# Cleanup Notify Github Failure
# #
- name: >-
🔔 Send Discord Webhook Message (Failure)
id: task_label_notify_discord_failure
uses: tsickert/discord-webhook@v7.0.0
if: failure()
with:
username: 'Io'
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_TVAPP2_WORKFLOWS }}
embed-title: "⚙️ ${{ github.workflow_ref }}"
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg'
embed-description: |
## 🎫 Labels Create ${{ job.status == 'success' && '✅' || '❌' }}
A **failed** attempt was made to run this workflow. No new labels have been added to your repository.
- Labels: `${{ steps.task_label_verify_existing.outputs.result }} created`
- Workflow: `${{ github.workflow }} (#${{github.run_number}})`
- Runner: `${{ runner.name }}`
- Triggered By: `${{ github.actor }}`
- Status: `${{ job.status == 'success' && '✅ Successful' || '❌ Failed' }}`
embed-color: ${{ job.status == 'success' && '5763719' || '15418782' }}
embed-footer-text: "Completed at ${{ env.NOW }} UTC"
embed-timestamp: "${{ env.NOW_LONG }}"
embed-author-name: "${{ github.repository_owner }}"
embed-author-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-author-icon-url: "https://avatars.githubusercontent.com/u/200161462"

175
.github/workflows/ping-developer.yml vendored Normal file
View File

@@ -0,0 +1,175 @@
# #
# @type github workflow
# @desc pings the developer
# @author Aetherinox
# @url https://github.com/Aetherinox
# #
name: "⚙️ Ping Developer"
run-name: "⚙️ Ping Developer"
# #
# triggers
# #
on:
issue_comment:
types: [created]
# #
# environment variables
# #
env:
BOT_NAME_1: AdminServ
BOT_NAME_2: AdminServX
BOT_NAME_3: EuropaServ
BOT_NAME_DEPENDABOT: dependabot[bot]
# #
# jobs
#
# env not available for job.if
# #
jobs:
deploy:
runs-on: ubuntu-latest
if: |
contains(github.event.comment.body, '/ping')
steps:
# #
# Job > Complete > Get publish timestamp
# #
- name: "🕛 Get Timestamp"
id: task_complete_timestamp_get
run: |
echo "NOW=$(date +'%m-%d-%Y %H:%M:%S')" >> $GITHUB_ENV
# #
# Add Label to accepted PR
#
# port 465
# server_port: 465
# secure: true
# ignore_cert: false
#
# port 587
# server_port: 587
# secure: false
# #
- name: Send mail
uses: dawidd6/action-send-mail@v4
with:
server_address: ${{secrets.EMAIL_SMTP}}
server_port: 465
secure: true
username: ${{secrets.EMAIL_FROM}}
password: ${{secrets.EMAIL_KEY}}
subject: "Github: Ping notification from ${{ github.repository }}"
to: ${{secrets.EMAIL_TO}}
from: ${{secrets.EMAIL_FROM}}
html_body: |
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Title</title>
<style>
body {
background: url('https://images.unsplash.com/photo-1541422348463-9bc715520974?fm=jpg&q=60&w=3000&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8M3x8ZGFyayUyMG1vdW50YWlufGVufDB8fDB8fHww');
font-size:9pt;
margin:0;
padding:0;
}
.background-overlay {
background-color: #1111119f;
}
.background-header {
background: url('https://process.fs.teachablecdn.com/ADNupMnWyR7kCWRvm76Laz/resize=width:705/https://cdn.filestackcontent.com/MipxnobQRRS5h7raz9aM');
background-size: cover;
background-size: 100%;
background-color:#1b1b1b;
padding:5px;
height:100px;
}
</style>
</head>
<body>
<div class="background-overlay">
<center>
<div class="background-header">
<a href="https://github.com/${{ github.repository }}"><img style="height:80px;padding-top:10px;" src="https://cdn0.iconfinder.com/data/icons/shift-logotypes/32/Github-512.png"></a>
</div>
</center>
<div style="font-size:9pt;padding: 20px;color:#FFF;">
<h3><span style="font-size:9pt;color:#cc6613;">[Github]</span> <span style="font-size:9pt;color:#FFF;">Dear ${{github.repository_owner}},</span></h3>
<p style="font-size:9pt;color:#FFF;"><br />You have received a ping notification from <a href="https://github.com/${{ github.repository }}">${{ github.repository }}</a> by <a href="https://github.com/${{ github.event.comment.user.login }}">${{ github.event.comment.user.login }}</a>.</p>
<br>
<br>
<center>
<table cellspacing="0" cellpadding="0" width="40%" class="center">
<tbody>
<tr>
<td
style="font-size:9pt;background-color:#8a2138;color:#FFF;padding:6px;padding-left:10px;"><b>Repository</b></td>
<td style="font-size:9pt;padding-left:5px;color:#b3b3b3;background-color:#1b1b1b;padding-left:10px;">${{ github.repository }}</td>
</tr>
<tr>
<td
style="font-size:9pt;background-color:#8a2138;color:#FFF;padding:6px;padding-left:10px;"><b>Date</b></td>
<td style="font-size:9pt;padding-left:5px;color:#b3b3b3;background-color:#0f0f0f;padding-left:10px;">${{ env.NOW }}</td>
</tr>
<tr>
<td
style="font-size:9pt;background-color:#8a2138;color:#FFF;padding:6px;padding-left:10px;"><b>Commenter</b></td>
<td style="font-size:9pt;padding-left:5px;color:#b3b3b3;background-color:#1b1b1b;padding-left:10px;">${{ github.event.comment.user.login }}</td>
</tr>
<tr>
<td
style="font-size:9pt;background-color:#8a2138;color:#FFF;padding:6px;padding-left:10px;"><b>Issue #</b></td>
<td style="font-size:9pt;padding-left:5px;color:#b3b3b3;background-color:#0f0f0f;padding-left:10px;">${{ github.event.issue.number }}</td>
</tr>
<tr>
<td
style="font-size:9pt;background-color:#8a2138;color:#FFF;padding:6px;padding-left:10px;"><b>Action</b></td>
<td style="font-size:9pt;padding-left:5px;color:#b3b3b3;background-color:#1b1b1b;padding-left:10px;">Notification</td>
</tr>
</tbody>
</table>
</center>
<br><br>
<center>
<div style="font-family:Consolas;">
<textarea readonly=true style="font-size:9pt;width:60%;background-color:#363636;color:#FFF;padding:15px;border:1px solid #5a5a5a;" id="w3review" name="w3review" rows="20" cols="100">
${{ github.event.comment.body }}
</textarea>
</div>
</center>
<p>&nbsp;</p>
<p style="color:#FFF;"><br /> ~ Github
</p>
</div>
<br /><br />
<div style="background-color:#1b1b1b;padding:5px;line-height:70px;height:70px;text-align:center;">
<span style="color:#FFF;font-size:8pt;">Copyright &copy; 2024 - Betelgeuse</span>
</div>
</div>
</body>
</html>
ignore_cert: true
convert_markdown: true
priority: normal

View File

@@ -1,737 +0,0 @@
# #
# @type github workflow
# @author Aetherinox
# @url https://github.com/Aetherinox
# @usage publishes a new release on Github
#
# @secrets secrets.SELF_TOKEN self github personal access token (fine-grained)
# secrets.SELF_TOKEN_CL self github personal access token (classic)
# secrets.NPM_TOKEN self npmjs access token
# secrets.PYPI_API_TOKEN self Pypi API token (production site) - https://pypi.org/
# secrets.PYPI_API_TEST_TOKEN self Pypi API token (test site) - https://test.pypi.org/
# secrets.SELF_DOCKERHUB_TOKEN self Dockerhub token
# secrets.ORG_BINARYNINJA_TOKEN org github personal access token (fine-grained)
# secrets.ORG_BINARYNINJA_TOKEN_CL org github personal access token (classic)
# secrets.ORG_BINARYNINJA_DOCKERHUB_TOKEN org dockerhub secret
# secrets.ORG_BINARYNINJA_GITEA_TOKEN org gitea personal access token (classic) with package:write permission
# secrets.BINARYSERV_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
# secrets.BINARYSERV_GPG_PASSPHRASE bot gpg private key passphrase
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES discord webhook to report release notifications from github to discord
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKFLOWS discord webhook to report workflow notifications from github to discord
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_UPDATES discord webhook to report activity notifications from github to discord
#
# @local these workflows can be tested locally through the use of `act`
# https://github.com/nektos/act
# Extract act to folder
# Add system env var with path to act.exe
# Run the commands:
# git pull https://github.com/username/repo
# act -W .github/workflows/labels-create.yml -P ubuntu-latest=catthehacker/ubuntu:full-22.04
# act -W .github/workflows/labels-create.yml -s TOKEN_CL=XXXXXXXXXX --pull=false
# #
name: '📦 Release Github'
run-name: '📦 Release Github'
# #
# Triggers
# #
on:
workflow_dispatch:
inputs:
# #
# Name of the plugin to use when creating the release zip filename
# e.g: tvapp2-v1.0.0.zip
# #
PROJECT_NAME:
description: '📦 Name of App'
required: true
default: 'tvapp2'
type: string
# #
# ENABLE: the changelog generated in releases tab will only display single commits.
# DISABLE: the changelog shows pull requests completed based on their labels
# #
CHANGELOG_MODE_COMMIT:
description: '📑 Use Commits Instead of PRs'
required: true
default: true
type: boolean
# #
# ENABLE: Will show all types of commits, including uncategorized
# DISABLE: WIll only show actions that have been categorized using the format
# type(scope): description
# type: description
# #
SHOW_UNCATEGORIZED:
description: '🗂️ Show Uncategorized Commits'
required: true
default: false
type: boolean
# #
# ENABLE: released version will be marked as pre-release
# DISABLE: release version will be marked as stable / normal release
# #
PRERELEASE:
description: '🧪 Build RC (Pre-release)'
required: true
default: false
type: boolean
# #
# Release Candidate version number
# this will be added to the end of your released app in the releases page.
# e.g: tvapp2-v1.0.0-rc.1
# #
VERSION_RC:
description: '🧪 RC (Pre-release) Ver (tvapp2-rc.v1)'
required: false
type: string
default: '1'
# #
# environment variables
# #
env:
PROJECT_NAME: ${{ github.event.inputs.PROJECT_NAME || 'tvapp2' }}
CHANGELOG_MODE_COMMIT: true
SHOW_UNCATEGORIZED: false
PRERELEASE: false
VERSION_RC: '1'
ASSIGN_USER: Aetherinox
BOT_NAME_1: EuropaServ
BOT_NAME_2: BinaryServ
BOT_NAME_DEPENDABOT: dependabot[bot]
BOT_NAME_RENOVATE: renovate[bot]
# #
# Jobs
# #
jobs:
# #
# Jobs Initialize
# #
job-initialize:
name: >-
📦 Initialize
runs-on: ubuntu-latest
outputs:
package_version: ${{ steps.task_initialize_package_getversion.outputs.PACKAGE_VERSION }}
permissions:
contents: write
packages: write
steps:
# #
# Initialize Start
# #
- name: '✅ Start'
id: task_initialize_start
run: |
echo "Starting build"
# #
# Initialize Set Env Variables
# #
- name: >-
🕛 Get Timestamp
id: task_initialize_label_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
# #
# Initialize Checkout
# #
- name: '☑️ Checkout'
id: task_initialize_checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# #
# Initialize Set Package.json Version
# #
- name: '👁️‍🗨️ Package Version Set'
id: task_initialize_package_getversion
working-directory: ./tvapp2
run: |
VER=$(cat package.json | jq -r '.version')
echo "PACKAGE_VERSION=$VER" >> $GITHUB_OUTPUT
# #
# Initialize Get Package.json Version
# #
- name: '👁️‍🗨️ Package Version Get'
id: task_initialize_package_version_get
run: |
echo "VERSION: ${{ steps.task_initialize_package_getversion.outputs.PACKAGE_VERSION }}"
# #
# Job Release Github
# #
job-release:
name: >-
📦 Publish Release
runs-on: ubuntu-latest
needs: [ job-initialize ]
env:
PACKAGE_VERSION: ${{ needs.job-initialize.outputs.package_version }}
outputs:
guid: ${{ steps.task_release_dotenv_get.outputs.GUID }}
uuid: ${{ steps.task_release_dotenv_get.outputs.UUID }}
permissions:
contents: write
packages: write
steps:
# #
# Release Checkout
# #
- name: '☑️ Checkout'
id: task_release_checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# #
# Release Set Env Variables
# #
- name: >-
🕛 Get Timestamp
id: task_release_label_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 Print Version Debug
# #
- name: '🪪 Test Next Job Version'
id: task_release_debug_print_ver
run: |
echo "VERSION: ${{ env.PACKAGE_VERSION }}"
# #
# Release Install package via NPM
# #
- name: '🪪 NPM Install'
id: task_release_npm_install
working-directory: ./tvapp2
run: |
npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.SELF_TOKEN_CL }}
# #
# Release Execute npm generate so that a uuid and guid can be created
# #
- name: '🪪 Generate IDs'
id: task_release_npm_env_generate
working-directory: ./tvapp2
run: |
npm run root:generate
# #
# Release .ENV Get
# Get guid and uuid from env variable generated by npm
# #
- name: '🪪 .ENV Get'
id: task_release_dotenv_get
uses: falti/dotenv-action@v1
with:
path: "./tvapp2/.env"
# #
# Release .ENV Print (Debug)
# Show guid and uuid from env variable generated by npm
# #
- name: '🪪 .ENV Read'
id: task_dotenv_debug_print
run: |
echo "GUID: ${{ steps.task_release_dotenv_get.outputs.GUID }}"
echo "UUID: ${{ steps.task_release_dotenv_get.outputs.UUID }}"
# #
# Release Build Stable
# #
- name: '🔨 Build Stable ( ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip )'
id: task_release_build_st
if: ${{ startsWith( inputs.PRERELEASE, false ) }}
run: |
echo Building STABLE Package ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip
zip -r ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip Dockerfile Dockerfile.aarch64 docker-compose.yml docker-entrypoint.sh root/ tvapp2/package.json README.md LICENSE
echo Building STABLE Package ${{ env.PROJECT_NAME }}-v${{ env.PACKAGE_VERSION }}-docker-compose.zip
zip -r ${{ env.PROJECT_NAME }}-v${{ env.PACKAGE_VERSION }}-docker-compose.zip docker-compose.yml README.md LICENSE
env:
NODE_AUTH_TOKEN: ${{ secrets.ADMINSERV_TOKEN_CL }}
# #
# Release Build Release Candidate
# #
- name: '🔨 Build RC ( ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}.zip )'
id: task_release_build_rc
if: ${{ startsWith( inputs.PRERELEASE, true ) }}
run: |
echo Building PRE-RELEASE Package ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}.zip
zip -r ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}.zip Dockerfile Dockerfile.aarch64 docker-compose.yml docker-entrypoint.sh root/ tvapp2/package.json README.md LICENSE
echo Building PRE-RELEASE Package ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}-docker-compose.zip
zip -r ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}-docker-compose.zip docker-compose.yml README.md LICENSE
env:
NODE_AUTH_TOKEN: ${{ secrets.ADMINSERV_TOKEN_CL }}
# #
# Release Tag Pre Create
#
# in order to use the changelog github action, you must pre-create the tag otherwise
# the changelog action will have no idea what tag you are going to be creating and
# the list of commits will not be for the correct release.
# #
- name: '🔖 Tag Pre Create ${{ env.PACKAGE_VERSION }}'
id: task_release_tag_create
uses: rickstaa/action-create-tag@v1
with:
tag: ${{ env.PACKAGE_VERSION }}
tag_exists_error: false
message: "Latest release"
gpg_private_key: ${{ secrets.ADMINSERV_GPG_KEY_ASC }}
gpg_passphrase: ${{ secrets.ADMINSERV_GPG_PASSPHRASE }}
# #
# Release Tag Confirm
#
# check if tag already exists
# #
- name: '🔖 Tag Confirm ${{ env.PACKAGE_VERSION }}'
id: task_release_tag_get
run: |
echo "Tag already present: ${{ env.TAG_EXISTS }}"
echo "Tag already present: ${{ steps.task_release_tag_create.outputs.tag_exists }}"
# #
# Release Checksum Stable
# #
- name: '🆔 Checksum Stable'
id: task_release_checksum_st_set
if: ${{ startsWith( inputs.PRERELEASE, false ) }}
run: |
filename_zip="${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip"
sha256="$(shasum --algorithm 256 ${filename_zip} | awk '{ print $1 }')"
shasum --algorithm 256 ${filename_zip} > SHA256SUMS.txt
echo "FILE_ZIP=${filename_zip}" >> $GITHUB_ENV
echo "SHA256SUM=${sha256}" >> $GITHUB_ENV
filename_compose_zip="${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-docker-compose.zip"
sha256_compose="$(shasum --algorithm 256 ${filename_compose_zip} | awk '{ print $1 }')"
echo "FILE_COMPOSE_ZIP=${filename_compose_zip}" >> $GITHUB_ENV
# #
# Release Checksum Release Candidate
# #
- name: '🆔 Checksum RC'
id: task_release_checksum_rc_set
if: ${{ startsWith( inputs.PRERELEASE, true ) }}
run: |
filename_zip="${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}.zip"
sha256="$(shasum --algorithm 256 ${filename_zip} | awk '{ print $1 }')"
shasum --algorithm 256 ${filename_zip} > SHA256SUMS.txt
echo "FILE_ZIP=${filename_zip}" >> $GITHUB_ENV
echo "SHA256SUM=${sha256}" >> $GITHUB_ENV
filename_compose_zip="${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}-docker-compose.zip"
sha256_compose="$(shasum --algorithm 256 ${filename_compose_zip} | awk '{ print $1 }')"
echo "FILE_COMPOSE_ZIP=${filename_compose_zip}" >> $GITHUB_ENV
# #
# Release Checksum Print
# #
- name: '🆔 Checksum Print'
id: task_release_checksum_st_get
run: |
echo "${{ env.SHA256SUM }}"
# #
# Release Contributor Images
# #
- name: '🥸 Contributors Generate'
id: task_release_contribs_generate
uses: jaywcjlove/github-action-contributors@main
with:
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
output: CONTRIBUTORS.svg
avatarSize: 42
# #
# Release Checksum Add (Stable)
# #
- name: '📦 Zip Add Checksum Stable'
id: task_release_zip_st
if: ${{ startsWith( inputs.PRERELEASE, false ) }}
run: |
echo Zipping STABLE Package .zip ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip
zip -jr ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip SHA256SUMS.txt
ls
# #
# Release Checksum Add (Release Candidate)
# #
- name: '📦 Zip Add Checksum RC'
id: task_release_zip_rc
if: ${{ startsWith( inputs.PRERELEASE, true ) }}
run: |
echo Zipping PRE-RELEASE Package .zip ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}.zip
zip -jr ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}.zip SHA256SUMS.txt
ls
- name: '📝 Changelog Pre Setup (Categorized Commits)'
id: task_release_changelog_categorized_sha_set
run: |
echo "TAG_LAST=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
echo "COMMIT_LAST=$(git rev-parse HEAD)" >> $GITHUB_ENV
# #
# Release Changelog Build (Categorized)
#
# generates a changelog from the github api. requires a TAG_LAST in order to figure
# out the changes made between the two versions.
#
# outputs:
# ${{ steps.task_release_changelog_categorized.outputs.changelog }}
# #
- name: '📝 Changelog Build (Categorized)'
id: task_release_changelog_categorized
if: |
startsWith( inputs.SHOW_UNCATEGORIZED, false ) ||
startsWith( env.SHOW_UNCATEGORIZED, false )
uses: mikepenz/release-changelog-builder-action@v5
with:
token: ${{ secrets.ADMINSERV_TOKEN }}
#fromTag: "${{ env.TAG_LAST }}"
#toTag: "${{ github.ref }}"
configuration: ".github/changelog-configuration.json"
ignorePreReleases: false
commitMode: ${{ inputs.CHANGELOG_MODE_COMMIT || env.CHANGELOG_MODE_COMMIT }}
fetchReleaseInformation: true
fetchViaCommits: true
configurationJson: |
{
"template": "## Release Info \n| Item | Value |\n| --- | --- |\n|<sub>📄 ${{ env.FILE_ZIP }}</sub>|<sub>Contains TVApp2 node source code and Docker build kit</sub>|\n|<sub>📄 ${{ env.FILE_COMPOSE_ZIP }}</sub>|<sub>Contains `docker-compose.yml`</sub>|\n|<sub>🏷️ SHA256</sub>|<sub>`${{ env.SHA256SUM }}`</sub>|\n|<sub>🏷️ GUID</sub>|<sub>`${{ steps.task_release_dotenv_get.outputs.GUID }}`</sub>|\n|<sub>🏷️ UUID</sub>|<sub>`${{ steps.task_release_dotenv_get.outputs.UUID }}`</sub>|\n|<sub>🕟 Stamp</sub>|<sub>`#{{FROM_TAG}}-#{{FROM_TAG_DATE}} 🔺 #{{TO_TAG}}-#{{TO_TAG_DATE}}`</sub>|\n|<sub>📅 Last Release</sub>|<sub>`#{{DAYS_SINCE}} days ago`</sub>|\n\n<br>\n\n---\n\n<br>\n\n### What's New\nThis release contains the following changes:\n\n<br>\n\n---\n\n<br>\n\n### Statistics\nHow the files have changed:\n<ul><li><a href='#{{RELEASE_DIFF}}'>Changed files</a> : <b>#{{CHANGED_FILES}}</b></li><li>Changes : <b>#{{CHANGES}}</b></li><li>Commits : <b>#{{COMMITS}}</b></li><li>Additions : <b>#{{ADDITIONS}}</b></li><li>Deletions : <b>#{{DELETIONS}}</b></li><li>PRs (categorized) : <b>#{{CATEGORIZED_COUNT}}</b></li><li>PRs (uncategorized) : <b>#{{UNCATEGORIZED_COUNT}}</b></li><li>PRs (open) : <b>#{{OPEN_COUNT}}</b></li>\n<br />\n</ul>\n\n<br>\n\n---\n\n<br>\n\n### Pull Requests\nThis release is associated with the following pull requests:\n#{{CHANGELOG}}\n\n<br>\n\n---\n\n<br>\n\n"
}
env:
GITHUB_TOKEN: ${{ secrets.ADMINSERV_TOKEN }}
# #
# Release Changelog Build (Uncategorized)
#
# generates a changelog from the github api. requires a TAG_LAST in order to figure
# out the changes made between the two versions.
#
# outputs:
# ${{ steps.task_release_changelog_categorized.outputs.changelog }}
#
# shows only categorized commits using the commit standards
# type(scope): description
# type: description
# #
- name: '📝 Changelog Build (Uncategorized)'
id: task_release_changelog_uncategorized
if: |
startsWith( inputs.SHOW_UNCATEGORIZED, true ) ||
startsWith( env.SHOW_UNCATEGORIZED, true )
uses: mikepenz/release-changelog-builder-action@v5
with:
token: ${{ secrets.ADMINSERV_TOKEN }}
#fromTag: "${{ env.TAG_LAST }}"
#toTag: "${{ github.ref }}"
configuration: ".github/changelog-configuration.json"
ignorePreReleases: false
commitMode: ${{ inputs.CHANGELOG_MODE_COMMIT || env.CHANGELOG_MODE_COMMIT }}
fetchReleaseInformation: true
fetchViaCommits: true
configurationJson: |
{
"template": "## Release Info \n| Item | Value |\n| --- | --- |\n|<sub>📄 ${{ env.FILE_ZIP }}</sub>|<sub>Contains TVApp2 node source code and Docker build kit</sub>|\n|<sub>📄 ${{ env.FILE_COMPOSE_ZIP }}</sub>|<sub>Contains `docker-compose.yml`</sub>|\n|<sub>🏷️ SHA256</sub>|<sub>`${{ env.SHA256SUM }}`</sub>|\n|<sub>🏷️ GUID</sub>|<sub>`${{ steps.task_release_dotenv_get.outputs.GUID }}`</sub>|\n|<sub>🏷️ UUID</sub>|<sub>`${{ steps.task_release_dotenv_get.outputs.UUID }}`</sub>|\n|<sub>🕟 Stamp</sub>|<sub>`#{{FROM_TAG}}-#{{FROM_TAG_DATE}} 🔺 #{{TO_TAG}}-#{{TO_TAG_DATE}}`</sub>|\n|<sub>📅 Last Release</sub>|<sub>`#{{DAYS_SINCE}} days ago`</sub>|\n\n<br>\n\n---\n\n<br>\n\n### What's New\nThis release contains the following changes:\n\n<br>\n\n---\n\n<br>\n\n### Statistics\nHow the files have changed:\n<ul><li><a href='#{{RELEASE_DIFF}}'>Changed files</a> : <b>#{{CHANGED_FILES}}</b></li><li>Changes : <b>#{{CHANGES}}</b></li><li>Commits : <b>#{{COMMITS}}</b></li><li>Additions : <b>#{{ADDITIONS}}</b></li><li>Deletions : <b>#{{DELETIONS}}</b></li><li>PRs (categorized) : <b>#{{CATEGORIZED_COUNT}}</b></li><li>PRs (uncategorized) : <b>#{{UNCATEGORIZED_COUNT}}</b></li><li>PRs (open) : <b>#{{OPEN_COUNT}}</b></li>\n<br />\n</ul>\n\n<br>\n\n---\n\n<br>\n\n### Commits (#{{UNCATEGORIZED_COUNT}})\nThe following commits are uncategorized:\n#{{UNCATEGORIZED}}\n\n<br>\n\n---\n\n<br>\n\n### Pull Requests\nThis release is associated with the following pull requests:\n#{{CHANGELOG}}\n\n<br>\n\n"
}
env:
GITHUB_TOKEN: ${{ secrets.ADMINSERV_TOKEN }}
# #
# Release Changelog Convert step into ENV
#
# This is a requirement in order for the action mikepenz/release-changelog-builder-action@v5 to work properly.
# If you use special characters like quotes and tildes in your push comments, bash will have no way of knowing
# if it's part of the changelog, or code itself.
#
# By converting the step into an env var, we quote the text, and it fixes the issue.
#
# For every step that you need to print the changelog text, first define the env var
# env:
# CHANGELOG_CATEGORIZED: ${{ steps.task_release_changelog_categorized.outputs.changelog }}
#
# Then you can call the changelog in the body / run command with
# echo "$CHANGELOG_CATEGORIZED"
# #
- name: '🙊 Changelog Step to Env Categorized'
id: task_release_changelog_escape_categorized
if: |
startsWith( inputs.SHOW_UNCATEGORIZED, false ) ||
startsWith( env.SHOW_UNCATEGORIZED, false )
env:
CHANGELOG_CATEGORIZED: ${{ steps.task_release_changelog_categorized.outputs.changelog }}
run: |
echo "$CHANGELOG_CATEGORIZED"
- name: '🙊 Changelog Step to Env Uncategorized'
id: task_release_changelog_escape_uncategorized
if: |
startsWith( inputs.SHOW_UNCATEGORIZED, true ) ||
startsWith( env.SHOW_UNCATEGORIZED, true )
env:
CHANGELOG_UNCATEGORIZED: ${{ steps.task_release_changelog_categorized.outputs.changelog }}
run: |
echo "$CHANGELOG_UNCATEGORIZED"
# #
# Release List Tree
# #
- name: '⚙️ Debug Clean Dist Folder'
id: task_release_debug_tree
run: |
tree
# #
# Release Post Release (Stable)
#
# outputs:
# [RELEASE ID]:
# ${{ steps.task_release_bundle_rc.outputs.id
# ${{ steps.task_release_bundle_st.outputs.id
# #
- name: '🏳️ Post Stable'
id: task_release_bundle_st
if: |
startsWith( inputs.PRERELEASE, false ) ||
startsWith( env.PRERELEASE, false )
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.ADMINSERV_TOKEN_CL }}
with:
token: ${{ secrets.ADMINSERV_TOKEN_CL }}
name: v${{ env.PACKAGE_VERSION }}
tag_name: ${{ env.PACKAGE_VERSION }}
target_commitish: ${{ github.event.inputs.branch }}
draft: false
generate_release_notes: false
files: |
${{ env.PROJECT_NAME }}-v${{ env.PACKAGE_VERSION }}-docker-compose.zip
${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip
SHA256SUMS.txt
prerelease: false
body: |
${{ steps.task_release_changelog_categorized.outputs.changelog }}
${{ steps.task_release_changelog_uncategorized.outputs.changelog }}
# #
# Release Post Release (Release Candidate)
#
# outputs:
# [RELEASE ID]:
# ${{ steps.task_release_bundle_rc.outputs.id
# ${{ steps.task_release_bundle_st.outputs.id
# #
- name: "🏳️ Post Release Candidate"
id: task_release_bundle_rc
if: |
startsWith( inputs.PRERELEASE, true ) ||
startsWith( env.PRERELEASE, true )
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.ADMINSERV_TOKEN }}
with:
token: ${{ secrets.ADMINSERV_TOKEN }}
name: v${{ env.PACKAGE_VERSION }}
tag_name: ${{ env.PACKAGE_VERSION }}
target_commitish: ${{ github.event.inputs.branch }}
draft: false
generate_release_notes: false
files: |
${{ env.PROJECT_NAME }}-v${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}-docker-compose.zip
${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}.zip
SHA256SUMS.txt
prerelease: false
body: |
> [!WARNING]
> This is a **release candidate**, which means it is not a stable release and could contain bugs. You should download it at your own risk.
${{ steps.task_release_changelog_categorized.outputs.changelog }}
${{ steps.task_release_changelog_uncategorized.outputs.changelog }}
# #
# Release Print Status
#
# For every step that you need to print the changelog text, first define the env var
# env:
# CHANGELOG_CATEGORIZED: ${{ steps.task_release_changelog_categorized.outputs.changelog }}
#
# Then you can call the changelog in the body / run command with
# echo "$CHANGELOG_CATEGORIZED"
# #
- name: "🎛️ Status Print"
id: task_release_status_print
env:
CHANGELOG_CATEGORIZED: ${{ steps.task_release_changelog_categorized.outputs.changelog }}
CHANGELOG_UNCATEGORIZED: ${{ steps.task_release_changelog_categorized.outputs.changelog }}
run: |
echo "Printing Variables"
echo
echo "---- CHANGELOG ---------------------------------------------------------------"
echo "$CHANGELOG_CATEGORIZED"
echo "$CHANGELOG_UNCATEGORIZED"
echo "---- CHANGELOG ---------------------------------------------------------------"
echo ""
echo ""
echo "---- VARIABLES ---------------------------------------------------------------"
echo "Package Version ............ ${{ env.PACKAGE_VERSION }}"
echo "Tag: Previous .............. ${{ env.TAG_LAST }}"
echo "Tag: Now.... ............... ${{ github.ref }}"
echo "Last Commit ................ ${{ env.COMMIT_LAST }}"
echo "ST Output ID ............... ${{ steps.task_release_bundle_st.outputs.id }}"
echo "RC Output ID ............... ${{ steps.task_release_bundle_rc.outputs.id }}"
echo "---- CHANGELOG ---------------------------------------------------------------"
# #
# Release Upload Artifacts Release Files
# #
- name: >-
📋 Upload Artifacts ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip
id: task_release_artifact
uses: actions/upload-artifact@v4
if: always()
with:
name: "${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}"
path: ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip
retention-days: 30
# #
# Job Complete
# #
job-complete:
name: >-
🆗 Successful Deployment
runs-on: ubuntu-latest
needs: [ job-initialize, job-release ]
env:
PACKAGE_VERSION: ${{ needs.job-initialize.outputs.package_version }}
GUID: ${{ needs.job-release.outputs.guid }}
UUID: ${{ needs.job-release.outputs.uuid }}
steps:
# #
# Complete Download Artifacts
# #
- name: "📁 Download Saved Artifacts"
id: task_complete_artifacts_download
uses: actions/download-artifact@v4
# #
# Complete Get publish timestamp
# #
- name: >-
🕛 Get Timestamp
id: task_complete_timestamp_get
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
# #
# Complete Set ENVs
# #
- name: "🕛 Get Env Vars"
id: task_complete_set_envs
run: |
release_stable_file="${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}/${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip"
release_stable_sha256="$(shasum --algorithm 256 ${release_stable_file} | awk '{ print $1 }')"
echo "FILE_STABLE=${release_stable_file}" >> $GITHUB_ENV
echo "SHA_STABLE=${release_stable_sha256}" >> $GITHUB_ENV
# #
# Complete Summary of publish
# #
- name: "🆗 Completed: ${{ env.NOW }}"
id: task_complete_summary
run: |
echo ""
echo ""
echo "| File | Result |" >> $GITHUB_STEP_SUMMARY
echo "| ------------------------------- | ----------------------- |" >> $GITHUB_STEP_SUMMARY
echo "| 📦 **Project** | ${{ env.PROJECT_NAME }} |" >> $GITHUB_STEP_SUMMARY
echo "| 🕛 **Deploy Time** | ${{ env.NOW }} |" >> $GITHUB_STEP_SUMMARY
echo ""
echo "### 📄 File (${{ env.FILE_STABLE }}) " >> $GITHUB_STEP_SUMMARY
echo "This is the main release. It contains all required docker files, and the TVApp2 `package.json`" >> $GITHUB_STEP_SUMMARY
echo "| File | Result |" >> $GITHUB_STEP_SUMMARY
echo "| ------------------------------- | ----------------------- |" >> $GITHUB_STEP_SUMMARY
echo "| 🏷️ **SHA256** | ${{ env.SHA_STABLE }} |" >> $GITHUB_STEP_SUMMARY
echo "| 🏷️ **GUID** | ${{ env.GUID }} |" >> $GITHUB_STEP_SUMMARY
echo "| 🏷️ **UUID** | ${{ env.UUID }} |" >> $GITHUB_STEP_SUMMARY

316
.gitignore vendored Executable file → Normal file
View File

@@ -1,322 +1,64 @@
# # # #
# Dependency directories # Windows image file caches
# # # #
node_modules/ Thumbs.db
jspm_packages/ ehthumbs.db
# # # #
# Snowpack dependency directory (https://snowpack.dev/) # Folder config file
# # # #
web_modules/ Desktop.ini
# # # #
# TypeScript cache # Recycle Bin used on file shares
# # # #
\*.tsbuildinfo $RECYCLE.BIN/
# # # #
# Optional npm cache directory # Windows Installer files
# # # #
.npm *.cab
*.msi
*.msm
*.msp
# # # #
# npm files # Windows shortcuts
# # # #
.npmrc *.lnk
# # # #
# Optional eslint cache # Operating System Files
# # # #
.eslintcache .DS_Store
.AppleDouble
.LSOverride
# # # #
# Optional stylelint cache # Thumbnails
# # # #
.stylelintcache ._*
# # # #
# Microbundle cache # Other
# # # #
.rpt2_cache/ .Spotlight-V100
.rts2_cache_cjs/ .Trashes
.rts2_cache_es/
.rts2_cache_umd/
# # # #
# Optional REPL history # Directories potentially created on remote AFP share
# # # #
.node_repl_history .AppleDB
.AppleDesktop
# # Network Trash Folder
# Output of 'npm pack' Temporary Items
# # .apdisk
\*.tgz
# #
# Yarn Integrity file
# #
.yarn-integrity
# #
# Binaries
# #
*.exe
*.exe~
*.dll
*.so
*.dylib
# #
# TVApp2 Specific
# #
*.dat
*.xml
*.txt
# #
# Test binary
# build with `go test -c`
# #
*.test
# #
# Coverage directory used by tools like istanbul
# #
coverage
\*.lcov
*.out
# #
# nyc test coverage
# #
.nyc_output
# #
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
# #
.grunt
# #
# Bower dependency directory (https://bower.io/)
# #
bower_components
# #
# node-waf configuration
# #
.lock-wscript
# #
# Compiled binary addons (https://nodejs.org/api/addons.html)
# #
build/Release
# #
# Dependency directories (remove the comment below to include it)
# vendor/
# #
# #
# Go workspace file
# #
go.work
# #
# Mac
# #
.DS_STORE
# #
# Visual Studio Code
# #
.vscode/
# #
# Temp folders
# #
.temp/
temp/
work/
# #
# Python Cache
# #
__pycache__/
# #
# Logs
# #
logs
_.log
npm-debug.log_
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# #
# yarn v2
# #
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.\*
# #
# wrangler project
# #
.dev.vars
.wrangler/
# #
# sources
# #
.src
# #
# dist
# #
.dist
# #
# Private Files
# #
.dev
keys
# #
# dotenv environment variable files
# #
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
# #
# parcel-bundler cache (https://parceljs.org/)
# #
.cache
.parcel-cache
# #
# Next.js build output
# #
.next
# #
# Nuxt.js build / generate output
# #
.nuxt
# #
# vuepress build output
# #
.vuepress/dist
# #
# Docusaurus cache and generated files
# #
.docusaurus
# #
# Serverless directories
# #
.serverless/
# #
# FuseBox cache
# #
.fusebox/
# #
# DynamoDB Local files
# #
.dynamodb/
# #
# TernJS port file
# #
.tern-port
# #
# Gatsby files
# #
.cache/
# #
# Misc
# #
tmp
*.user
# #
# Python files
# #
.opt-*
# #
# Diagnostic reports (https://nodejs.org/api/report.html)
# #
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
# #
# Runtime data
# #
pids
_.pid
_.seed
\*.pid.lock
# #
# Directory for instrumented libs generated by jscoverage/JSCover
# #
lib-cov

389
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,389 @@
<div align="center">
<h6>Thank you for your interest in contributing!</h6>
<h1>♾️ Contributing ♾️</h1>
<br />
<!-- prettier-ignore-start -->
[![Version][github-version-img]][github-version-uri]
[![Build Status][github-build-img]][github-build-uri]
[![Downloads][github-downloads-img]][github-downloads-uri]
[![Size][github-size-img]][github-size-img]
[![Last Commit][github-commit-img]][github-commit-img]
[![Contributors][contribs-all-img]](#contributors-)
<!-- prettier-ignore-end -->
</div>
<br />
---
<br />
## About
Below are a list of ways that you can help contribute to this project, as well as policies and guides that explain how to get started.
Please review everything on this page before you submit your contribution.
<br />
---
<br />
- [About](#about)
- [Issues, Bugs, Ideas](#issues-bugs-ideas)
- [Contributing](#contributing)
- [Before Submitting Pull Requests](#before-submitting-pull-requests)
- [Conventional Commit Specification](#conventional-commit-specification)
- [Types](#types)
- [Example 1:](#example-1)
- [Example 2:](#example-2)
- [Commiting](#commiting)
- [Commenting](#commenting)
- [Casing](#casing)
- [Indentation Style](#indentation-style)
- [Spaces Instead Of Tabs](#spaces-instead-of-tabs)
<br />
---
<br />
## Issues, Bugs, Ideas
Stuff happens, and sometimes as best as we try, there may be issues within this project that we are unaware of. That is the great thing about open-source; anyone can use the program and contribute to making it better.
<br />
If you have found a bug, have an issue, or maybe even a cool idea; you can let us know by [submitting it](https://github.com/aetherinox/thetvapp-docker/issues). However, before you submit your new issue, bug report, or feature request; head over to the [Issues Section](https://github.com/aetherinox/thetvapp-docker/issues) and ensure nobody else has already submitted it.
<br />
Once you are sure that your issue has not already being dealt with; you may submit a new issue at [here](https://github.com/aetherinox/thetvapp-docker/issues/new/choose). You'll be asked to specify exactly what your new submission targets, such as:
- Bug report
- Feature Suggestion
<br />
When writing a new submission; ensure you fill out any of the questions asked of you. If you do not provide enough information, we cannot help. Be as detailed as possible, and provide any logs or screenshots you may have to help us better understand what you mean. Failure to fill out the submission properly may result in it being closed without a response.
<br />
If you are submitting a bug report:
- Explain the issue
- Describe how you expect for a feature to work, and what you're seeing instead of what you expected.
- List possible options for a resolution or insight
- Provide screenshots, logs, or anything else that can visually help track down the issue.
<br />
<div align="center">
[![Submit Issue][btn-github-submit-img]][btn-github-submit-uri]
</div>
<br />
<div align="center">
**[`^ back to top ^`](#about)**
</div>
<br />
---
<br />
## Contributing
If you are looking to contribute to this project by actually submit your own code; please review this section completely. There is important information and policies provided below that you must follow for your pull request to get accepted.
The source is here for everyone to collectively share and colaborate on. If you think you have a possible solution to a problem; don't be afraid to get your hands dirty.
All contributions are made via pull requests. To create a pull request, you need a GitHub account. If you are unclear on this process, see [GitHub's documentation on forking and pull requests](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork). Pull requests should be targeted at the master branch.
<br />
### Before Submitting Pull Requests
- Follow the repository's code formatting conventions (see below);
- Include tests that prove that the change works as intended and does not add regressions;
- Document the changes in the code and/or the project's documentation;
- Your PR must pass the CI pipeline;
- When submitting your Pull Request, use one of the following branches:
- For bug fixes: `main` branch
- For features & functionality: `development` branch
- Include a proper git commit message following the [Conventional Commit Specification](https://www.conventionalcommits.org/en/v1.0.0/#specification).
<br />
If you have completed the above tasks, the pull request is ready to be reviewed and your pull request's label will be changed to "Ready for Review". At this point, a human will need to step in and manually verify your submission.
Reviewers will approve the pull request once they are satisfied with the patch it will be merged.
<br />
### Conventional Commit Specification
When commiting your changes, we require you to follow the [Conventional Commit Specification](https://www.conventionalcommits.org/en/v1.0.0/#specification). The **Conventional Commits** is a specification for the format and content of a commit message. The concept behind Conventional Commits is to provide a rich commit history that can be read and understood by both humans and automated tools. Conventional Commits have the following format:
<br />
```
<type>[(optional <scope>)]: <description>
[optional <body>]
[optional <footer(s)>]
```
<br />
#### Types
| Type | Description |
| --- | --- |
| `feat` | Introduce new feature |
| `fix` | Bug fix |
| `deps` | Add or update existing dependencies |
| `docs` | Change website or markdown documents. Does not mean changes to the documentation generator script itself, only the documents created from the generator. <br/><br/><small>E.g: documentation, readme.md or markdown</small> <br /><br /> |
| `build` | Changes to the build / compilation / packaging process or auxiliary tools such as doc generation<br /><br/><small>E.g: create new build tasks, update release script, etc.</small> |
| `test` | Add or refactor tests, no production code change. Changes the suite of automated tests for the app. |
| `perf` | Performance improvement of algorithms or execution time of the app. Does not change an existing feature. |
| `style` | Update / reformat style of source code. Does not change the way app is implemented. Changes that do not affect the meaning of the code<br /><br/><small>E.g: white-space, formatting, missing semi-colons, change tabs to spaces, etc)</small> |
| `refactor` | Change to production code that leads to no behavior difference,<br/><br/><small>E.g: split files, rename variables, rename package, improve code style, etc.</small> |
| `change` | Change an existing feature. |
| `chore` | Includes technical or preventative maintenance task that is necessary for managing the app or repo, such as updating grunt tasks, but is not tied to any specific feature. Usually done for maintanence purposes.<br/><br/><small>E.g: Edit .gitignore, .prettierrc, .prettierignore, .gitignore, eslint.config.js file</small> |
| `ci` | Changes related to Continuous Integration (usually `yml` and other configuration files). |
| `misc` | Anything that doesn't fit into another commit type. Usually doesn't change production code; yet is not ci, test or chore. |
| `revert` | Revert a previous commit |
| `remove` | Remove a feature from app. Features are usually first deprecated for a period of time before being removed. Removing a feature from the app may be considered a breaking change that will require a major version number increment.|
| `deprecate` | Deprecate existing functionality, but does not remove it from the app.|
<br />
##### Example 1:
```
feat(core): bug affecting menu [#22]
^───^────^ ^────────────────^ ^───^
| | | |
| | | └───⫸ (ISSUE): Reference issue ID
│ │ │
│ │ └───⫸ (DESC): Summary in present tense. Use lower case not title case!
│ │
│ └───────────⫸ (SCOPE): The package(s) that this change affects
└───────────────⫸ (TYPE): See list above
```
<br />
##### Example 2:
```
<type>(<scope>): <short summary> [issue]
| | | |
| | | └─⫸ Reference issue id (optional)
│ │ │
│ │ └─⫸ Summary in present tense. Not capitalized. No period at the end.
│ │
│ └─⫸ Commit Scope: animations|bazel|benchpress|common|compiler|compiler-cli|core|
│ elements|forms|http|language-service|localize|platform-browser|
│ platform-browser-dynamic|platform-server|router|service-worker|
│ upgrade|zone.js|packaging|changelog|docs-infra|migrations|ngcc|ve|
│ devtools....
└─⫸ Commit Type: build|ci|doc|docs|feat|fix|perf|refactor|test
website|chore|style|type|revert|deprecate
```
<br />
### Commiting
If you are pushing a commit which addresses a submitted issue, reference your issue at the end of the commit message. You may also optionally add the major issue to the end of your commit body.
References should be on their own line, following the word `Ref` or `Refs`
```
Title: fix(core): fix error message displayed to users. [#22]
Description: The description of your commit
Ref: #22, #34, #37
```
<br />
### Commenting
Comment your code. If someone else comes along, they should be able to do a quick glance and have an idea of what is going on. Plus it helps novice readers to better understand the process.
You may use block style commenting, or single lines:
```bash
# #
# set perms and import user crontabs
# #
checkown "${cron_user}":"${cron_user}" "/config/crontabs/${cron_user}"
crontab -u "${cron_user}" "/config/crontabs/${cron_user}"
```
<br />
At the top of any new file introduced, please add the following header:
```bash
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
# #
# @project thetvapp-docker
# @about DESCRIPTION OF WHAT FILE DOES
# @file /path/to/file.ext
# @repo https://github.com/Aetherinox/thetvapp-docker
# #
```
<br />
### Casing
When calling environment variables, you should use `UPPERCASE`:
```bash
arg_cron=$(echo ${CRON_TIME})
if [ -z "${arg_cron}" ]; then
arg_cron="0/60 * * * *"
fi
```
<br />
When defining general variables, use `snake_case`
```bash
migrations_dir="/migrations"
migrations_history="/config/.migrations"
```
<br />
### Indentation Style
You should be using the `Allman Style`. This style puts the brace associated with a control statement on the next line, indented. Statements within the braces are indented to the same level as the braces.
<br />
```javascript
location ~ ^(.+\.php)(.*)$
{
# enable the next two lines for http auth
# auth_basic "Restricted";
# auth_basic_user_file /config/nginx/.htpasswd;
fastcgi_split_path_info ^(.+\.php)(.*)$;
if (!-f $document_root$fastcgi_script_name) { return 404; }
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
}
# deny access to .htaccess/.htpasswd files
location ~ /\.ht
{
deny all;
}
```
<br />
### Spaces Instead Of Tabs
When writing your code, set your IDE to utilize **spaces**, with a configured size of `4 characters`. If this project utilizes ESLint, you should find the file `.editorconfig` in the root directory of the repo which defines how the file should be formatted. Load that file into programs such as Visual Studio Code.
<br />
<br />
<div align="center">
**[`^ back to top ^`](#about)**
</div>
<br />
<br />
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<!-- BADGE > GENERAL -->
[general-npmjs-uri]: https://npmjs.com
[general-nodejs-uri]: https://nodejs.org
[general-npmtrends-uri]: http://npmtrends.com/thetvapp-docker
<!-- BADGE > VERSION > GITHUB -->
[github-version-img]: https://img.shields.io/github/v/tag/Aetherinox/thetvapp-docker?logo=GitHub&label=Version&color=ba5225
[github-version-uri]: https://github.com/Aetherinox/thetvapp-docker/releases
<!-- BADGE > VERSION > NPMJS -->
[npm-version-img]: https://img.shields.io/npm/v/thetvapp-docker?logo=npm&label=Version&color=ba5225
[npm-version-uri]: https://npmjs.com/package/thetvapp-docker
<!-- BADGE > VERSION > PYPI -->
[pypi-version-img]: https://img.shields.io/pypi/v/thetvapp-docker-plugin
[pypi-version-uri]: https://pypi.org/project/thetvapp-docker-plugin/
<!-- BADGE > LICENSE > MIT -->
[license-mit-img]: https://img.shields.io/badge/MIT-FFF?logo=creativecommons&logoColor=FFFFFF&label=License&color=9d29a0
[license-mit-uri]: https://github.com/Aetherinox/thetvapp-docker/blob/main/LICENSE
<!-- BADGE > GITHUB > DOWNLOAD COUNT -->
[github-downloads-img]: https://img.shields.io/github/downloads/Aetherinox/thetvapp-docker/total?logo=github&logoColor=FFFFFF&label=Downloads&color=376892
[github-downloads-uri]: https://github.com/Aetherinox/thetvapp-docker/releases
<!-- BADGE > NPMJS > DOWNLOAD COUNT -->
[npmjs-downloads-img]: https://img.shields.io/npm/dw/%40aetherinox%2Fmkdocs-link-embeds?logo=npm&&label=Downloads&color=376892
[npmjs-downloads-uri]: https://npmjs.com/package/thetvapp-docker
<!-- BADGE > GITHUB > DOWNLOAD SIZE -->
[github-size-img]: https://img.shields.io/github/repo-size/Aetherinox/thetvapp-docker?logo=github&label=Size&color=59702a
[github-size-uri]: https://github.com/Aetherinox/thetvapp-docker/releases
<!-- BADGE > NPMJS > DOWNLOAD SIZE -->
[npmjs-size-img]: https://img.shields.io/npm/unpacked-size/thetvapp-docker/latest?logo=npm&label=Size&color=59702a
[npmjs-size-uri]: https://npmjs.com/package/thetvapp-docker
<!-- BADGE > CODECOV > COVERAGE -->
[codecov-coverage-img]: https://img.shields.io/codecov/c/github/Aetherinox/thetvapp-docker?token=MPAVASGIOG&logo=codecov&logoColor=FFFFFF&label=Coverage&color=354b9e
[codecov-coverage-uri]: https://codecov.io/github/Aetherinox/thetvapp-docker
<!-- BADGE > ALL CONTRIBUTORS -->
[contribs-all-img]: https://img.shields.io/github/all-contributors/Aetherinox/thetvapp-docker?logo=contributorcovenant&color=de1f6f&label=contributors
[contribs-all-uri]: https://github.com/all-contributors/all-contributors
<!-- BADGE > GITHUB > BUILD > NPM -->
[github-build-img]: https://img.shields.io/github/actions/workflow/status/Aetherinox/thetvapp-docker/deploy-docker.yml?logo=github&logoColor=FFFFFF&label=Build&color=%23278b30
[github-build-uri]: https://github.com/Aetherinox/thetvapp-docker/actions/workflows/deploy-docker.yml
<!-- BADGE > GITHUB > BUILD > Pypi -->
[github-build-pypi-img]: https://img.shields.io/github/actions/workflow/status/Aetherinox/thetvapp-docker/release-pypi.yml?logo=github&logoColor=FFFFFF&label=Build&color=%23278b30
[github-build-pypi-uri]: https://github.com/Aetherinox/thetvapp-docker/actions/workflows/pypi-release.yml
<!-- BADGE > GITHUB > TESTS -->
[github-tests-img]: https://img.shields.io/github/actions/workflow/status/Aetherinox/thetvapp-docker/npm-tests.yml?logo=github&label=Tests&color=2c6488
[github-tests-uri]: https://github.com/Aetherinox/thetvapp-docker/actions/workflows/npm-tests.yml
<!-- BADGE > GITHUB > COMMIT -->
[github-commit-img]: https://img.shields.io/github/last-commit/Aetherinox/thetvapp-docker?logo=conventionalcommits&logoColor=FFFFFF&label=Last%20Commit&color=313131
[github-commit-uri]: https://github.com/Aetherinox/thetvapp-docker/commits/main/
<!-- BADGE > BUTTON > SUBMIT ISSUES -->
[btn-github-submit-img]: https://img.shields.io/badge/submit%20new%20issue-de1f5c?style=for-the-badge&logo=github&logoColor=FFFFFF
[btn-github-submit-uri]: https://github.com/aetherinox/thetvapp-docker/issues
<!-- prettier-ignore-end -->
<!-- markdownlint-restore -->

View File

@@ -1,132 +1,118 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
# # # #
# @project TVApp2
# @usage docker image which allows you to download a m3u playlist and EPG guide data from
# multiple IPTV services.
# @file Dockerfile # @file Dockerfile
# @repo https://github.com/TheBinaryNinja/tvapp2 # @about This docker file installs:
# https://git.binaryninja.net/BinaryNinja/tvapp2 # - nginx
# https://github.com/aetherinox/docker-base-alpine # - php-fpm
# # - theapptv
# you can build your own image by running
# amd64 docker build --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250218 -t tvapp2:latest -t tvapp2:1.0.0 -t tvapp2:1.0.0-amd64 -f Dockerfile .
# arm64 docker build --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250218 -t tvapp2:1.0.0-arm64 -f Dockerfile.aarch64 .
#
# if you prefer to use `docker buildx`
# create docker buildx create --driver docker-container --name container --bootstrap --use
# amd64 docker buildx build --no-cache --pull --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250218 -t tvapp2:latest -t tvapp2:1.0.0 --platform=linux/amd64 --output type=docker --output type=docker .
# arm64 docker buildx build --no-cache --pull --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250218 -t tvapp2:latest -t tvapp2:1.0.0 --platform=linux/arm64 --output type=docker --output type=docker .
# # # #
# # # #
# FROM # Base Image
# any args defined before FROM cannot be called after FROM and the ARE is classified outside the build process. # This container uses a modified version of the Linux server alpine image
# You will have to re-define the arg after FROM to utilize it anywhere else in the build process.
#
# @ref https://docs.docker.com/reference/dockerfile/#understand-how-arg-and-from-interact
# # # #
ARG ARCH=amd64 FROM ghcr.io/linuxserver/baseimage-alpine:3.20
FROM --platform=linux/${ARCH} ghcr.io/aetherinox/alpine-base:3.21
# #
# Set Args
# #
ARG ARCH=amd64
ARG BUILDDATE
ARG VERSION
# # # #
# Set Labels # Set Labels
# # # #
LABEL org.opencontainers.image.authors="Aetherinox, iFlip721, Optx" LABEL maintainer="Aetherinox"
LABEL org.opencontainers.image.vendor="BinaryNinja" LABEL org.opencontainers.image.authors="Aetherinox"
LABEL org.opencontainers.image.title="TVApp2" LABEL org.opencontainers.image.vendor="Aetherinox"
LABEL org.opencontainers.image.description="Automatic m3u and xml guide updater for TheTvApp, TVPass, and MoveOnJoy utilized within your IPTV client." LABEL org.opencontainers.image.title="TheTVApp Grabber"
LABEL org.opencontainers.image.source="https://github.com/thebinaryninja/tvapp2" LABEL org.opencontainers.image.description="thetvapp image by Aetherinox"
LABEL org.opencontainers.image.repo.1="https://github.com/thebinaryninja/tvapp2" LABEL org.opencontainers.image.source="https://github.com/Aetherinox/thetvapp-docker"
LABEL org.opencontainers.image.repo.2="https://git.binaryninja.net/binaryninja/tvapp2" LABEL org.opencontainers.image.documentation="https://github.com/Aetherinox/thetvapp-docker"
LABEL org.opencontainers.image.repo.3="https://github.com/aetherinox/docker-base-alpine" LABEL org.opencontainers.image.url="https://github.com/Aetherinox/thetvapp-docker"
LABEL org.opencontainers.image.documentation="https://thebinaryninja.github.io/tvapp2"
LABEL org.opencontainers.image.url="https://github.com/thebinaryninja/tvapp2/pkgs/container/tvapp2"
LABEL org.opencontainers.image.licenses="MIT" LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.architecture="${ARCH}" LABEL build_version="1.0.0"
LABEL org.opencontainers.image.ref.name="main"
LABEL org.opencontainers.image.registry="local"
LABEL org.tvapp2.image.maintainers="Aetherinox, iFlip721, Optx"
LABEL org.tvapp2.image.build-version="Version:- ${VERSION} Date:- ${BUILDDATE}"
# # # #
# Set Env Var # Set Args
# # # #
ENV NODE_VERSION=22.8.0 ARG BUILD_DATE
ENV YARN_VERSION=1.22.22 ARG VERSION
ENV DIR_BUILD=/usr/src/app ARG NGINX_VERSION
ENV DIR_RUN=/usr/bin/app ARG CRON_TIME
ENV URL_REPO="https://git.binaryninja.net/binaryninja/" ENV CRON_TIME="0/60 * * * *"
ENV WEB_IP="0.0.0.0"
ENV WEB_PORT=4124
ENV STREAM_QUALITY="hd"
ENV FILE_PLAYLIST="playlist.m3u8"
ENV FILE_EPG="xmltv.xml"
ENV LOG_LEVEL=4
ENV TZ="Etc/UTC" ENV TZ="Etc/UTC"
ENV URL_XML="https://raw.githubusercontent.com/dtankdempse/thetvapp-m3u/refs/heads/main/guide/epg.xml"
ENV URL_XML_GZ="https://raw.githubusercontent.com/dtankdempse/thetvapp-m3u/refs/heads/main/guide/epg.xml.gz"
ENV URL_M3U="https://thetvapp-m3u.data-search.workers.dev/playlist"
ENV FILE_NAME="thetvapp"
ENV PORT_HTTP=80
ENV PORT_HTTPS=443
# # # #
# Install # Install
# # # #
RUN \ RUN \
if [ -z ${NGINX_VERSION+x} ]; then \
NGINX_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:nginx$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
fi && \
apk add --no-cache \ apk add --no-cache \
wget \ wget \
bash \ logrotate \
nano \ openssl \
npm \ apache2-utils \
openssl nginx \
nginx==${NGINX_VERSION} \
nginx-mod-http-fancyindex==${NGINX_VERSION} && \
echo "**** Install Build Packages ****" && \
echo "**** Configure Nginx ****" && \
echo 'fastcgi_param HTTP_PROXY ""; # https://httpoxy.org/' >> \
/etc/nginx/fastcgi_params && \
echo 'fastcgi_param PATH_INFO $fastcgi_path_info; # http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_split_path_info' >> \
/etc/nginx/fastcgi_params && \
echo 'fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # https://www.nginx.com/resources/wiki/start/topics/examples/phpfcgi/#connecting-nginx-to-php-fpm' >> \
/etc/nginx/fastcgi_params && \
echo 'fastcgi_param SERVER_NAME $host; # Send HTTP_HOST as SERVER_NAME. If HTTP_HOST is blank, send the value of server_name from nginx (default is `_`)' >> \
/etc/nginx/fastcgi_params && \
rm -f /etc/nginx/http.d/default.conf && \
rm -f /etc/nginx/conf.d/stream.conf && \
rm -f /config/www/index.html && \
echo "**** Setup Logrotate ****" && \
sed -i "s#/var/log/messages {}.*# #g" \
/etc/logrotate.conf && \
sed -i 's#/usr/sbin/logrotate /etc/logrotate.conf#/usr/sbin/logrotate /etc/logrotate.conf -s /config/log/logrotate.status#g' \
/etc/periodic/daily/logrotate
# # # #
# Copy docker-entrypoint # Set work directory
# # # #
COPY docker-entrypoint.sh /usr/local/bin/ WORKDIR /config/www
# # # #
# copy s6-overlays root to image root # add local files
# # # #
COPY root/ / COPY root/ /
# # # #
# set work directory # ports and volumes
# # # #
WORKDIR ${DIR_BUILD} EXPOSE ${PORT_HTTP} ${PORT_HTTPS}
# # # #
# copy tvapp2 project to workdir # Add Cron Task Files
# # # #
COPY tvapp2/ ./ ADD run.sh /
ADD download.sh /
# #
# set work dir to built app
# #
WORKDIR ${DIR_RUN}
# #
# Ports and volumes
# #
EXPOSE ${WEB_PORT}/tcp
# # # #
# In case user sets up the cron for a longer duration, do a first run # In case user sets up the cron for a longer duration, do a first run
# and then keep the container running. Hacky, but whatever. # and then keep the container running. Hacky, but whatever.
# # # #
ENTRYPOINT ["/init"] CMD ["sh", "-c", "/run.sh ; /download.sh ; tail -f /dev/null"]

134
Dockerfile-php.template Normal file
View File

@@ -0,0 +1,134 @@
# syntax=docker/dockerfile:1
# #
# @file Dockerfile.IncPhp
# @about This docker file installs:
# - nginx
# - php-fpm
# - theapptv
# #
# #
# Base Image
# This container uses a modified version of the Linux server alpine image
# #
FROM ghcr.io/linuxserver/baseimage-alpine:3.20
# #
# Set Labels
# #
LABEL maintainer="Aetherinox"
LABEL org.opencontainers.image.authors="Aetherinox"
LABEL org.opencontainers.image.vendor="Aetherinox"
LABEL org.opencontainers.image.title="TheTVApp Grabber"
LABEL org.opencontainers.image.description="thetvapp image by Aetherinox"
LABEL org.opencontainers.image.source="https://github.com/Aetherinox/thetvapp-docker"
LABEL org.opencontainers.image.documentation="https://github.com/Aetherinox/thetvapp-docker"
LABEL org.opencontainers.image.url="https://github.com/Aetherinox/thetvapp-docker"
LABEL org.opencontainers.image.licenses="MIT"
LABEL build_version="1.0.0"
# #
# Set Args
# #
ARG BUILD_DATE
ARG VERSION
ARG NGINX_VERSION
ARG CRON_TIME
ENV CRON_TIME="0/60 * * * *"
ENV TZ="Etc/UTC"
ENV URL_XML="https://raw.githubusercontent.com/dtankdempse/thetvapp-m3u/refs/heads/main/guide/epg.xml"
ENV URL_XML_GZ="https://raw.githubusercontent.com/dtankdempse/thetvapp-m3u/refs/heads/main/guide/epg.xml.gz"
ENV URL_M3U="https://thetvapp-m3u.data-search.workers.dev/playlist"
ENV FILE_NAME="thetvapp"
ENV PORT_HTTP=80
ENV PORT_HTTPS=443
# #
# Install
# #
RUN \
if [ -z ${NGINX_VERSION+x} ]; then \
NGINX_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:nginx$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
fi && \
apk add --no-cache \
wget \
logrotate \
openssl \
apache2-utils \
nginx \
php83 \
php83-fileinfo \
php83-fpm \
php83-mbstring \
nginx==${NGINX_VERSION} \
nginx-mod-http-fancyindex==${NGINX_VERSION} && \
echo "**** Install Build Packages ****" && \
echo "**** Configure Nginx ****" && \
echo 'fastcgi_param HTTP_PROXY ""; # https://httpoxy.org/' >> \
/etc/nginx/fastcgi_params && \
echo 'fastcgi_param PATH_INFO $fastcgi_path_info; # http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_split_path_info' >> \
/etc/nginx/fastcgi_params && \
echo 'fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # https://www.nginx.com/resources/wiki/start/topics/examples/phpfcgi/#connecting-nginx-to-php-fpm' >> \
/etc/nginx/fastcgi_params && \
echo 'fastcgi_param SERVER_NAME $host; # Send HTTP_HOST as SERVER_NAME. If HTTP_HOST is blank, send the value of server_name from nginx (default is `_`)' >> \
/etc/nginx/fastcgi_params && \
rm -f /etc/nginx/http.d/default.conf && \
rm -f /etc/nginx/conf.d/stream.conf && \
rm -f /config/www/index.html && \
echo "**** Check PHP version and symlink ****" && \
if [ "$(readlink /usr/bin/php)" != "php83" ]; then \
rm -rf /usr/bin/php && \
ln -s /usr/bin/php83 /usr/bin/php; \
fi && \
echo "**** Configure PHP ****" && \
sed -i "s#;error_log = log/php83/error.log.*#error_log = /config/log/php/error.log#g" \
/etc/php83/php-fpm.conf && \
sed -i "s#user = nobody.*#user = abc#g" \
/etc/php83/php-fpm.d/www.conf && \
sed -i "s#group = nobody.*#group = abc#g" \
/etc/php83/php-fpm.d/www.conf && \
echo "**** Setup Logrotate ****" && \
sed -i "s#/var/log/messages {}.*# #g" \
/etc/logrotate.conf && \
sed -i 's#/usr/sbin/logrotate /etc/logrotate.conf#/usr/sbin/logrotate /etc/logrotate.conf -s /config/log/logrotate.status#g' \
/etc/periodic/daily/logrotate
# #
# Set work directory
# #
WORKDIR /config/www
# #
# add local files
# #
COPY root/ /
# #
# ports and volumes
# #
EXPOSE ${PORT_HTTP} ${PORT_HTTPS}
# #
# Add Cron Task Files
# #
ADD run.sh /
ADD download.sh /
# #
# In case user sets up the cron for a longer duration, do a first run
# and then keep the container running. Hacky, but whatever.
# #
CMD ["sh", "-c", "/run.sh ; /download.sh ; tail -f /dev/null"]

View File

@@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2025 BinaryNinja Gistr - Copyright (c) 2025 Aetherinox
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

1637
README.md

File diff suppressed because it is too large Load Diff

View File

@@ -1,50 +0,0 @@
# #
# TVApp2 Docker-compose.yml
#
# Automatic M3U playlist and XML guide updater for TheTvApp, TVPass, and MoveOnJoy utilized within your IPTV client.
#
# @url https://github.com/TheBinaryNinja/tvapp2
# https://git.binaryninja.net/BinaryNinja/tvapp2
#
# @image:github ghcr.io/thebinaryninja/tvapp2:latest
# ghcr.io/thebinaryninja/tvapp2:amd64
# ghcr.io/thebinaryninja/tvapp2:arm64
#
# @image:dockerhub thebinaryninja/tvapp2:latest
# thebinaryninja/tvapp2:1.0.0-amd64
# thebinaryninja/tvapp2:1.0.0-arm64
#
# @image:gitea git.binaryninja.net/binaryninja/tvapp2:latest
# git.binaryninja.net/binaryninja/tvapp2:1.0.0-amd64
# git.binaryninja.net/binaryninja/tvapp2:1.0.0-arm64
# #
services:
# #
# Service > TVApp2
# #
tvapp2:
container_name: tvapp2
image: ghcr.io/thebinaryninja/tvapp2:latest # Image: Github
# image: thebinaryninja/tvapp2:latest # Image: Dockerhub
# image: git.binaryninja.net/binaryninja/tvapp2:latest # Image: Gitea
# image: tvapp2:latest # Image: Locally built
hostname: tvapp2
environment:
TZ: "Etc/UTC"
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock
- ./config:/config
- ./app:/usr/bin/app
ulimits:
memlock:
soft: -1
hard: -1
healthcheck:
test: [ "CMD", "curl", "--fail", "http://127.0.0.1:4124" ]
interval: 30s
retries: 5

View File

@@ -1,31 +0,0 @@
#!/bin/sh
# #
# @project TVApp2
# @usage docker image which allows you to download a m3u playlist and EPG guide data from
# multiple IPTV services.
# @file docker-entrypoint.sh
# @repo https://github.com/TheBinaryNinja/tvapp2
# https://git.binaryninja.net/BinaryNinja/tvapp2
# https://github.com/aetherinox/docker-base-alpine
#
# you can build your own image by running
# amd64 docker build --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250218 -t tvapp2:latest -t tvapp2:1.0.0 -t tvapp2:1.0.0-amd64 -f Dockerfile .
# arm64 docker build --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250218 -t tvapp2:1.0.0-arm64 -f Dockerfile.aarch64 .
#
# if you prefer to use `docker buildx`
# create docker buildx create --driver docker-container --name container --bootstrap --use
# amd64 docker buildx build --no-cache --pull --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250218 -t tvapp2:latest -t tvapp2:1.0.0 --platform=linux/amd64 --output type=docker --output type=docker .
# arm64 docker buildx build --no-cache --pull --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250218 -t tvapp2:latest -t tvapp2:1.0.0 --platform=linux/arm64 --output type=docker --output type=docker .
# #
set -e
# Run command with node if the first argument contains a "-" or is not a system command. The last
# part inside the "{}" is a workaround for the following bug in ash/dash:
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874264
if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ] || { [ -f "${1}" ] && ! [ -x "${1}" ]; }; then
set -- node "$@"
fi
exec "$@"

2
docs/.gitattributes vendored
View File

@@ -1,2 +0,0 @@
# Enforce Unix newlines
* text=auto eol=lf

75
docs/.gitignore vendored
View File

@@ -1,75 +0,0 @@
# #
# Copyright (c) 2025 Aetherinox
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# #
# #
# Node, TypeScript, Python
# #
# Dependencies
node_modules
__pycache__
venv
.venv
# Build files
build
site
# Distribution files
dist
mkdocs_material.egg-info
# Caches and logs
*.cpuprofile
*.log
*.tsbuildinfo
.cache
.eslintcache
__pycache__
# Examples
example
example.zip
# -----------------------------------------------------------------------------
# General
# -----------------------------------------------------------------------------
# Never ignore .gitkeep files
!**/.gitkeep
# macOS internals
.DS_Store
# Temporary files
TODO
tmp
# IDEs & Editors
.idea
*~
# -----------------------------------------------------------------------------
# Misc
# -----------------------------------------------------------------------------
encryptcontent.cache

View File

@@ -1,26 +0,0 @@
---
title: Changelog
tags:
- changelog
---
# Changelog
<p align="center" markdown="1">
![Version](https://img.shields.io/github/v/tag/TheBinaryNinja/tvapp2?logo=GitHub&label=version&color=ba5225)
![Downloads](https://img.shields.io/github/downloads/TheBinaryNinja/tvapp2/total)
![Repo Size](https://img.shields.io/github/repo-size/TheBinaryNinja/tvapp2?label=size&color=59702a)
![Last Commit)](https://img.shields.io/github/last-commit/TheBinaryNinja/tvapp2?color=b43bcc)
</p>
### <!-- md:version stable- --> 1.0.0 <small>Feb 24, 2025</small> { id="1.0.0" }
<br />
---
<br />

View File

@@ -1,109 +0,0 @@
# Conventions
This documentation use some symbols for illustration purposes. Before you read
on, please make sure you've made yourself familiar with the following list of
conventions:
<br />
### <!-- md:version --> Release Type { data-toc-label="Version" }
The tag symbol in conjunction with a version number denotes when a specific feature or behavior was added. Make sure you're at least on this version if you want to use it.
: <!-- md:version stable- --> stable
: <!-- md:version beta- --> beta
<br />
### <!-- md:control --> Controls { #default data-toc-label="Control" }
These icons define what type of control a specified setting uses.
: <!-- md:control toggle --> toggle
: <!-- md:control textbox --> textbox
: <!-- md:control dropdown --> dropdown
: <!-- md:control button --> button
: <!-- md:control slider --> slider
: <!-- md:control color --> color wheel
<br />
### <!-- md:default --> Default Value { #default data-toc-label="Default value" }
This defines what the default value for a setting is.
: <!-- md:default --> Specified setting has a default value
: <!-- md:default none --> Specified setting has no default value and is empty
: <!-- md:default computed --> Specified setting is automatically computed by the app
<br />
### <!-- md:command --> Command { #command data-toc-label="Command" }
This defines a command
: <!-- md:command --> Specified setting has a default value
<br />
### <!-- md:flag experimental --> Experimental { data-toc-label="Experimental" }
Anything listed with this icon are features or functionality that are still in development and may change in future versions.
<br />
### <!-- md:flag required --> Required value { #required data-toc-label="Required value" }
Items listed with this symbol indicate that they are required to be set.
<br />
### <!-- md:flag customization --> Customization { #customization data-toc-label="Customization" }
This symbol denotes that the item described is a customization which affects the overall look of the app.
<br />
### <!-- md:3rdparty --> 3rd Party { data-toc-label="3rd Party" }
This symbol denotes that the item described is classified as something that changes the overall functionality of the plugin.
<br />
### <!-- md:flag metadata --> Metadata property { #metadata data-toc-label="Metadata property" }
This symbol denotes that the item described is a metadata property, which can
be used in Markdown documents as part of the front matter definition.
<br />
### <!-- md:flag setting --> Configurable Setting { #setting data-toc-label="Configurable Setting" }
This symbol denotes that an item is configurable by the user
<br />
### <!-- md:flag multiple --> Multiple instances { #multiple-instances data-toc-label="Multiple instances" }
This symbol denotes that the plugin supports multiple instances, i.e, that it
can be used multiple times in the `plugins` setting in `mkdocs.yml`.
<br />
### <!-- md:feature --> Optional feature { #feature data-toc-label="Optional feature" }
Most of the features are hidden behind feature flags, which means they must
be explicitly enabled via `mkdocs.yml`. This allows for the existence of
potentially orthogonal features.
<br />
### <!-- md:backers --> Backers only { data-toc-label="Backers only" }
The pumping heart symbol denotes that a specific feature or behavior is only
available to backers. Normal users will not have access to this particular item.
<br />
---
<br />

View File

@@ -1,29 +0,0 @@
# License
**MIT License**
Copyright (c) 2025 Aetherinox
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
<br />
---
<br />

View File

@@ -1,11 +0,0 @@
# Tags
Following is a list of relevant tags:
<!-- material/tags -->
<br />
---
<br />

View File

@@ -1,13 +0,0 @@
---
title: About TVApp2
tags:
- info
---
# About TVApp2
<br />
---
<br />

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 KiB

View File

@@ -1,16 +0,0 @@
authors:
Aetherinox:
name: Aetherinox
description: Developer
avatar: https://avatars.githubusercontent.com/u/118329232
url: https://github.com/Aetherinox
iflip721:
name: iflip721
description: Developer
avatar: https://avatars.githubusercontent.com/u/28721588
url: https://github.com/iflip721
Optx:
name: Optx
description: Developer
avatar: https://avatars.githubusercontent.com/u/32874812
url: https://github.com/Nvmdfth

View File

@@ -1,3 +0,0 @@
comments: true
hide:
- feedback

View File

@@ -1 +0,0 @@
# Blog

View File

@@ -1,34 +0,0 @@
---
title: Home
tags:
- home
---
<p align="center"><img src="https://techcrunch.com/wp-content/uploads/2017/10/roku-live-tv-screen-1600x900.png" width="860"></p>
<h1 align="center"><b>TVApp2</b></h1>
<p align="center" markdown="1">
![Version](https://img.shields.io/github/v/tag/TheBinaryNinja/tvapp2?logo=GitHub&label=version&color=ba5225)
![Downloads](https://img.shields.io/github/downloads/TheBinaryNinja/tvapp2/total)
![Repo Size](https://img.shields.io/github/repo-size/TheBinaryNinja/tvapp2?label=size&color=59702a)
![Last Commit)](https://img.shields.io/github/last-commit/TheBinaryNinja/tvapp2?color=b43bcc)
</p>
This documentation is related to the github repository for <a href="https://github.com/TheBinaryNinja/tvapp2">TVApp2</a>; a NodeJS powered application which allows you to fetch M3U playlists and EPG guide data from various popular online IPTV services such as TheTvApp, TVPass, and MoveOnJoy. These services provide high-quality and premium channels available as Live TV.
<br />
This documentation covers the following:
- How to install and configure TVApp2
- Managing your TVApp2 docker image
- Building your own docker image
- Traefik and Authentik Integration
<br />
---
<br />

View File

@@ -1,9 +0,0 @@
---
template: home.html
title: TVApp2
social:
cards_layout_options:
title: TVApp2
---
Welcome to the TVApp2 documentation

File diff suppressed because it is too large Load Diff

BIN
docs/img/002.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 636 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

BIN
docs/img/banner-sq.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
docs/img/banner.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

View File

@@ -1,23 +0,0 @@
# #
# Copyright (c) 2025 Aetherinox
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# #
__version__ = "9.5.13"

View File

@@ -1,21 +0,0 @@
# #
# Copyright (c) 2025 Aetherinox
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# #

View File

@@ -1,100 +0,0 @@
# #
# Copyright (c) 2025 Aetherinox
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# #
from __future__ import annotations
import codecs
import functools
import material
import os
from glob import iglob
from inspect import getfile
from markdown import Markdown
from pymdownx import emoji, twemoji_db
from xml.etree.ElementTree import Element
# -----------------------------------------------------------------------------
# Functions
# -----------------------------------------------------------------------------
# Create twemoji index
def twemoji(options: object, md: Markdown):
paths = options.get("custom_icons", [])[:]
return _load_twemoji_index(tuple(paths))
# Create emoji or icon
def to_svg(
index: str, shortname: str, alias: str, uc: str | None, alt: str,
title: str, category: str, options: object, md: Markdown
):
if not uc:
icons = md.inlinePatterns["emoji"].emoji_index["emoji"]
# Create and return element to host icon
el = Element("span", { "class": options.get("classes", index) })
el.text = md.htmlStash.store(_load(icons[shortname]["path"]))
return el
# Delegate to `pymdownx.emoji` extension
return emoji.to_svg(
index, shortname, alias, uc, alt, title, category, options, md
)
# -----------------------------------------------------------------------------
# Helper functions
# -----------------------------------------------------------------------------
# Load icon
@functools.lru_cache(maxsize = None)
def _load(file: str):
with codecs.open(file, encoding = "utf-8") as f:
return f.read()
# Load twemoji index and add icons
@functools.lru_cache(maxsize = None)
def _load_twemoji_index(paths):
index = {
"name": "twemoji",
"emoji": twemoji_db.emoji,
"aliases": twemoji_db.aliases
}
# Compute path to theme root and traverse all icon directories
root = os.path.dirname(getfile(material))
root = os.path.join(root, "templates", ".icons")
for path in [*paths, root]:
base = os.path.normpath(path)
# Index icons provided by the theme and via custom icons
glob = os.path.join(base, "**", "*.svg")
glob = iglob(os.path.normpath(glob), recursive = True)
for file in glob:
icon = file[len(base) + 1:-4].replace(os.path.sep, "-")
# Add icon to index
name = f":{icon}:"
if not any(name in index[key] for key in ["emoji", "aliases"]):
index["emoji"][name] = { "name": name, "path": file }
# Return index
return index

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><defs><style>.fa-secondary{opacity:.4}</style></defs><path class="fa-secondary" d="M162.4 6c-1.5-3.6-5-6-8.9-6h-19c-3.9 0-7.5 2.4-8.9 6L104.9 57.7c-3.2 8-14.6 8-17.8 0L66.4 6c-1.5-3.6-5-6-8.9-6H48C21.5 0 0 21.5 0 48V256v22.4V288H9.6 374.4 384v-9.6V256 48c0-26.5-21.5-48-48-48H230.5c-3.9 0-7.5 2.4-8.9 6L200.9 57.7c-3.2 8-14.6 8-17.8 0L162.4 6z"/><path class="fa-primary" d="M0 288H384v32c0 35.3-28.7 64-64 64H256v64c0 35.3-28.7 64-64 64s-64-28.7-64-64V384H64c-35.3 0-64-28.7-64-64V288zM192 464a16 16 0 1 0 0-32 16 16 0 1 0 0 32z"/></svg>

Before

Width:  |  Height:  |  Size: 767 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><defs><style>.fa-secondary{opacity:.4}</style></defs><path class="fa-secondary" d="M432 80a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0 112a80 80 0 1 0 0-160 80 80 0 1 0 0 160z"/><path class="fa-primary" d="M0 320C0 426 86 512 192 512s192-86 192-192c0-91.2-130.2-262.3-166.6-308.3C211.4 4.2 202.5 0 192.9 0h-1.8c-9.6 0-18.5 4.2-24.5 11.7C130.2 57.7 0 228.8 0 320z"/></svg>

Before

Width:  |  Height:  |  Size: 594 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><defs><style>.fa-secondary{opacity:.4}</style></defs><path class="fa-secondary" d="M192 512C86 512 0 426 0 320C0 228.8 130.2 57.7 166.6 11.7C172.6 4.2 181.5 0 191.1 0h1.8c9.6 0 18.5 4.2 24.5 11.7C253.8 57.7 384 228.8 384 320c0 106-86 192-192 192zm75.3-267.3c-6.2-6.2-16.4-6.2-22.6 0l-128 128c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0l128-128c6.2-6.2 6.2-16.4 0-22.6zM136 288a24 24 0 1 0 0-48 24 24 0 1 0 0 48zM248 400a24 24 0 1 0 0-48 24 24 0 1 0 0 48z"/><path class="fa-primary" d="M267.3 267.3c6.2-6.2 6.2-16.4 0-22.6s-16.4-6.2-22.6 0l-128 128c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0l128-128zM160 264a24 24 0 1 0 -48 0 24 24 0 1 0 48 0zM272 376a24 24 0 1 0 -48 0 24 24 0 1 0 48 0z"/></svg>

Before

Width:  |  Height:  |  Size: 921 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><defs><style>.fa-secondary{opacity:.4}</style></defs><path class="fa-secondary" d="M320 512c53.2 0 101.4-21.6 136.1-56.6l-298.3-235C140 257.1 128 292.3 128 320c0 106 86 192 192 192zM205.8 136L505.2 370.7c4.4-16.1 6.8-33.1 6.8-50.7c0-91.2-130.2-262.3-166.6-308.3C339.4 4.2 330.5 0 320.9 0h-1.8c-9.6 0-18.5 4.2-24.5 11.7C277.8 33 240.7 81.3 205.8 136zM224 336c0 44.2 35.8 80 80 80c8.8 0 16 7.2 16 16s-7.2 16-16 16c-61.9 0-112-50.1-112-112c0-8.8 7.2-16 16-16s16 7.2 16 16z"/><path class="fa-primary" d="M5.1 9.2C13.3-1.2 28.4-3.1 38.8 5.1l592 464c10.4 8.2 12.3 23.3 4.1 33.7s-23.3 12.3-33.7 4.1L9.2 42.9C-1.2 34.7-3.1 19.6 5.1 9.2z"/></svg>

Before

Width:  |  Height:  |  Size: 867 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><defs><style>.fa-secondary{opacity:.4}</style></defs><path class="fa-secondary" d="M192 512C86 512 0 426 0 320C0 228.8 130.2 57.7 166.6 11.7C172.6 4.2 181.5 0 191.1 0h1.8c9.6 0 18.5 4.2 24.5 11.7C253.8 57.7 384 228.8 384 320c0 106-86 192-192 192zM96 336c0-8.8-7.2-16-16-16s-16 7.2-16 16c0 61.9 50.1 112 112 112c8.8 0 16-7.2 16-16s-7.2-16-16-16c-44.2 0-80-35.8-80-80z"/><path class="fa-primary" d="M80 320c8.8 0 16 7.2 16 16c0 44.2 35.8 80 80 80c8.8 0 16 7.2 16 16s-7.2 16-16 16c-61.9 0-112-50.1-112-112c0-8.8 7.2-16 16-16z"/></svg>

Before

Width:  |  Height:  |  Size: 761 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><defs><style>.fa-secondary{opacity:.4}</style></defs><path class="fa-secondary" d="M576 128V384H64V128H576zM64 64C28.7 64 0 92.7 0 128V384c0 35.3 28.7 64 64 64H576c35.3 0 64-28.7 64-64V128c0-35.3-28.7-64-64-64H64z"/><path class="fa-primary" d="M104 184c0-13.3 10.7-24 24-24s24 10.7 24 24V328c0 13.3-10.7 24-24 24s-24-10.7-24-24V184z"/></svg>

Before

Width:  |  Height:  |  Size: 571 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><defs><style>.fa-secondary{opacity:.4}</style></defs><path class="fa-secondary" d="M576 128V384H64V128H576zM64 64C28.7 64 0 92.7 0 128V384c0 35.3 28.7 64 64 64H576c35.3 0 64-28.7 64-64V128c0-35.3-28.7-64-64-64H64z"/><path class="fa-primary" d="M205.9 174.3c-3.9-8.7-12.4-14.3-21.9-14.3s-18.1 5.6-21.9 14.3l-64 144c-5.4 12.1 .1 26.3 12.2 31.7s26.3-.1 31.7-12.2l4.3-9.7h75.5l4.3 9.7c5.4 12.1 19.6 17.6 31.7 12.2s17.6-19.6 12.2-31.7l-64-144zM200.4 280H167.6L184 243.1 200.4 280zM304 184v8 64 64 8c0 13.3 10.7 24 24 24h68c33.1 0 60-26.9 60-60c0-18.6-8.5-35.3-21.8-46.3c3.7-7.8 5.8-16.5 5.8-25.7c0-33.1-26.9-60-60-60H328c-13.3 0-24 10.7-24 24zm48 24h28c6.6 0 12 5.4 12 12s-5.4 12-12 12H352V208zm0 96V280h28 16c6.6 0 12 5.4 12 12s-5.4 12-12 12H352z"/></svg>

Before

Width:  |  Height:  |  Size: 981 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><defs><style>.fa-secondary{opacity:.4}</style></defs><path class="fa-secondary" d="M325.5 192L32 192c-17.7 0-32-14.3-32-32s14.3-32 32-32H325.5c-3.5 10-5.5 20.8-5.5 32s1.9 22 5.5 32zM186.5 384c3.5-10 5.5-20.8 5.5-32s-1.9-22-5.5-32H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H186.5z"/><path class="fa-primary" d="M416 192a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm0-128a96 96 0 1 0 0 192 96 96 0 1 0 0-192zM96 384a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm0-128a96 96 0 1 0 0 192 96 96 0 1 0 0-192z"/></svg>

Before

Width:  |  Height:  |  Size: 717 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><defs><style>.fa-secondary{opacity:.4}</style></defs><path class="fa-secondary" d="M64 480c-35.3 0-64-28.7-64-64V96C0 60.7 28.7 32 64 32H384c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64zM224 352c6.7 0 13-2.8 17.6-7.7l104-112c6.5-7 8.2-17.2 4.4-25.9s-12.5-14.4-22-14.4H120c-9.5 0-18.2 5.7-22 14.4s-2.1 18.9 4.4 25.9l104 112c4.5 4.9 10.9 7.7 17.6 7.7z"/><path class="fa-primary" d="M241.6 344.3c-4.5 4.9-10.9 7.7-17.6 7.7s-13-2.8-17.6-7.7l-104-112c-6.5-7-8.2-17.2-4.4-25.9s12.5-14.4 22-14.4H328c9.5 0 18.2 5.7 22 14.4s2.1 18.9-4.4 25.9l-104 112z"/></svg>

Before

Width:  |  Height:  |  Size: 786 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><defs><style>.fa-secondary{opacity:.4}</style></defs><path class="fa-secondary" d="M192 128c-70.7 0-128 57.3-128 128s57.3 128 128 128H384c70.7 0 128-57.3 128-128s-57.3-128-128-128H192zM384 64c106 0 192 86 192 192s-86 192-192 192H192C86 448 0 362 0 256S86 64 192 64H384z"/><path class="fa-primary" d="M192 128a128 128 0 1 0 0 256 128 128 0 1 0 0-256z"/></svg>

Before

Width:  |  Height:  |  Size: 588 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><defs><style>.fa-secondary{opacity:.4}</style></defs><path class="fa-secondary" d="M192 64C86 64 0 150 0 256S86 448 192 448H384c106 0 192-86 192-192s-86-192-192-192H192zm192 64a128 128 0 1 1 0 256 128 128 0 1 1 0-256z"/><path class="fa-primary" d="M384 128a128 128 0 1 0 0 256 128 128 0 1 0 0-256z"/></svg>

Before

Width:  |  Height:  |  Size: 536 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><defs><style>.fa-secondary{opacity:.4}</style></defs><path class="fa-secondary" d="M192 128c-70.7 0-128 57.3-128 128s57.3 128 128 128H384c70.7 0 128-57.3 128-128s-57.3-128-128-128H192zM384 64c106 0 192 86 192 192s-86 192-192 192H192C86 448 0 362 0 256S86 64 192 64H384z"/><path class="fa-primary" d="M96 256a96 96 0 1 0 192 0A96 96 0 1 0 96 256z"/></svg>

Before

Width:  |  Height:  |  Size: 584 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><defs><style>.fa-secondary{opacity:.4}</style></defs><path class="fa-secondary" d="M192 64C86 64 0 150 0 256S86 448 192 448H384c106 0 192-86 192-192s-86-192-192-192H192zm192 96a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"/><path class="fa-primary" d="M288 256a96 96 0 1 1 192 0 96 96 0 1 1 -192 0z"/></svg>

Before

Width:  |  Height:  |  Size: 529 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M64 32C28.7 32 0 60.7 0 96V256 416c0 35.3 28.7 64 64 64H192c70.7 0 128-57.3 128-128c0-46.5-24.8-87.3-62-109.7c18.7-22.3 30-51 30-82.3c0-70.7-57.3-128-128-128H64zm96 192H64V96h96c35.3 0 64 28.7 64 64s-28.7 64-64 64zM64 288h96 32c35.3 0 64 28.7 64 64s-28.7 64-64 64H64V288z"/></svg>

Before

Width:  |  Height:  |  Size: 519 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M50.7 58.5L0 160H208V32H93.7C75.5 32 58.9 42.3 50.7 58.5zM240 160H448L397.3 58.5C389.1 42.3 372.5 32 354.3 32H240V160zm208 32H0V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V192z"/></svg>

Before

Width:  |  Height:  |  Size: 430 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M162.4 6c-1.5-3.6-5-6-8.9-6h-19c-3.9 0-7.5 2.4-8.9 6L104.9 57.7c-3.2 8-14.6 8-17.8 0L66.4 6c-1.5-3.6-5-6-8.9-6H48C21.5 0 0 21.5 0 48V224v22.4V256H9.6 374.4 384v-9.6V224 48c0-26.5-21.5-48-48-48H230.5c-3.9 0-7.5 2.4-8.9 6L200.9 57.7c-3.2 8-14.6 8-17.8 0L162.4 6zM0 288v32c0 35.3 28.7 64 64 64h64v64c0 35.3 28.7 64 64 64s64-28.7 64-64V384h64c35.3 0 64-28.7 64-64V288H0zM192 432a16 16 0 1 1 0 32 16 16 0 1 1 0-32z"/></svg>

Before

Width:  |  Height:  |  Size: 657 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M192 512C86 512 0 426 0 320C0 228.8 130.2 57.7 166.6 11.7C172.6 4.2 181.5 0 191.1 0h1.8c9.6 0 18.5 4.2 24.5 11.7C253.8 57.7 384 228.8 384 320c0 106-86 192-192 192zM96 336c0-8.8-7.2-16-16-16s-16 7.2-16 16c0 61.9 50.1 112 112 112c8.8 0 16-7.2 16-16s-7.2-16-16-16c-44.2 0-80-35.8-80-80z"/></svg>

Before

Width:  |  Height:  |  Size: 531 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M128 40c0-22.1 17.9-40 40-40s40 17.9 40 40V188.2c8.5-7.6 19.7-12.2 32-12.2c20.6 0 38.2 13 45 31.2c8.8-9.3 21.2-15.2 35-15.2c25.3 0 46 19.5 47.9 44.3c8.5-7.7 19.8-12.3 32.1-12.3c26.5 0 48 21.5 48 48v48 16 48c0 70.7-57.3 128-128 128l-16 0H240l-.1 0h-5.2c-5 0-9.9-.3-14.7-1c-55.3-5.6-106.2-34-140-79L8 336c-13.3-17.7-9.7-42.7 8-56s42.7-9.7 56 8l56 74.7V40zM240 304c0-8.8-7.2-16-16-16s-16 7.2-16 16v96c0 8.8 7.2 16 16 16s16-7.2 16-16V304zm48-16c-8.8 0-16 7.2-16 16v96c0 8.8 7.2 16 16 16s16-7.2 16-16V304c0-8.8-7.2-16-16-16zm80 16c0-8.8-7.2-16-16-16s-16 7.2-16 16v96c0 8.8 7.2 16 16 16s16-7.2 16-16V304z"/></svg>

Before

Width:  |  Height:  |  Size: 846 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M64 128V384H576V128H64zM0 128C0 92.7 28.7 64 64 64H576c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128zm144 56V328c0 13.3-10.7 24-24 24s-24-10.7-24-24V184c0-13.3 10.7-24 24-24s24 10.7 24 24z"/></svg>

Before

Width:  |  Height:  |  Size: 465 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M64 128V384H576V128H64zM0 128C0 92.7 28.7 64 64 64H576c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128zm184 32c9.5 0 18.1 5.6 21.9 14.3l64 144c5.4 12.1-.1 26.3-12.2 31.7s-26.3-.1-31.7-12.2l-4.3-9.7H146.3l-4.3 9.7c-5.4 12.1-19.6 17.6-31.7 12.2s-17.6-19.6-12.2-31.7l64-144c3.9-8.7 12.4-14.3 21.9-14.3zm0 83.1L167.6 280h32.8L184 243.1zM304 184c0-13.3 10.7-24 24-24h52c33.1 0 60 26.9 60 60c0 9.2-2.1 17.9-5.8 25.7c13.3 11 21.8 27.6 21.8 46.3c0 33.1-26.9 60-60 60H328c-13.3 0-24-10.7-24-24v-8V256 192v-8zm48 24v24h28c6.6 0 12-5.4 12-12s-5.4-12-12-12H352zm0 96h44c6.6 0 12-5.4 12-12s-5.4-12-12-12H380 352v24z"/></svg>

Before

Width:  |  Height:  |  Size: 877 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zM448 192V416H64V192H448zM436.7 96c7.1 0 10.7 8.6 5.7 13.7l-36.7 36.7c-3.1 3.1-8.2 3.1-11.3 0l-36.7-36.7c-5-5-1.5-13.7 5.7-13.7h73.4zM128 232c-13.3 0-24 10.7-24 24s10.7 24 24 24H384c13.3 0 24-10.7 24-24s-10.7-24-24-24H128zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24H384c13.3 0 24-10.7 24-24s-10.7-24-24-24H128z"/></svg>

Before

Width:  |  Height:  |  Size: 659 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M512 256c0 .9 0 1.8 0 2.7c-.4 36.5-33.6 61.3-70.1 61.3H344c-26.5 0-48 21.5-48 48c0 3.4 .4 6.7 1 9.9c2.1 10.2 6.5 20 10.8 29.9c6.1 13.8 12.1 27.5 12.1 42c0 31.8-21.6 60.7-53.4 62c-3.5 .1-7 .2-10.6 .2C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-96a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"/></svg>

Before

Width:  |  Height:  |  Size: 671 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M384 480c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0zM224 352c-6.7 0-13-2.8-17.6-7.7l-104-112c-6.5-7-8.2-17.2-4.4-25.9s12.5-14.4 22-14.4l208 0c9.5 0 18.2 5.7 22 14.4s2.1 18.9-4.4 25.9l-104 112c-4.5 4.9-10.9 7.7-17.6 7.7z"/></svg>

Before

Width:  |  Height:  |  Size: 531 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M0 80V229.5c0 17 6.7 33.3 18.7 45.3l176 176c25 25 65.5 25 90.5 0L418.7 317.3c25-25 25-65.5 0-90.5l-176-176c-12-12-28.3-18.7-45.3-18.7H48C21.5 32 0 53.5 0 80zm112 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"/></svg>

Before

Width:  |  Height:  |  Size: 447 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M345 39.1L472.8 168.4c52.4 53 52.4 138.2 0 191.2L360.8 472.9c-9.3 9.4-24.5 9.5-33.9 .2s-9.5-24.5-.2-33.9L438.6 325.9c33.9-34.3 33.9-89.4 0-123.7L310.9 72.9c-9.3-9.4-9.2-24.6 .2-33.9s24.6-9.2 33.9 .2zM0 229.5V80C0 53.5 21.5 32 48 32H197.5c17 0 33.3 6.7 45.3 18.7l168 168c25 25 25 65.5 0 90.5L277.3 442.7c-25 25-65.5 25-90.5 0l-168-168C6.7 262.7 0 246.5 0 229.5zM144 144a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"/></svg>

Before

Width:  |  Height:  |  Size: 652 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M192 384a128 128 0 1 1 0-256 128 128 0 1 1 0 256zm0 64H384c106 0 192-86 192-192s-86-192-192-192H192C86 64 0 150 0 256S86 448 192 448zm143.1-64c30.4-34 48.9-78.8 48.9-128s-18.5-94-48.9-128H384c70.7 0 128 57.3 128 128s-57.3 128-128 128H335.1z"/></svg>

Before

Width:  |  Height:  |  Size: 488 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M192 64C86 64 0 150 0 256S86 448 192 448H384c106 0 192-86 192-192s-86-192-192-192H192zm192 64a128 128 0 1 1 0 256 128 128 0 1 1 0-256z"/></svg>

Before

Width:  |  Height:  |  Size: 382 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M384 128c70.7 0 128 57.3 128 128s-57.3 128-128 128H192c-70.7 0-128-57.3-128-128s57.3-128 128-128H384zM576 256c0-106-86-192-192-192H192C86 64 0 150 0 256S86 448 192 448H384c106 0 192-86 192-192zM192 352a96 96 0 1 0 0-192 96 96 0 1 0 0 192z"/></svg>

Before

Width:  |  Height:  |  Size: 486 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M192 64C86 64 0 150 0 256S86 448 192 448H384c106 0 192-86 192-192s-86-192-192-192H192zm192 96a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"/></svg>

Before

Width:  |  Height:  |  Size: 378 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M320 96v320a160.019 160.019 0 0 0 113.138-46.862 160.019 160.019 0 0 0 34.683-174.367 160.006 160.006 0 0 0-86.591-86.592A160.019 160.019 0 0 0 320 96ZM0 256l160.002 160 160.001-160L160.002 96 0 256Zm480 0a160 160 0 0 0 160 160V96a160.002 160.002 0 0 0-160 160Z"/></svg>

Before

Width:  |  Height:  |  Size: 551 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M103.3 344.3c-6.5-14.2-6.9-18.3 7.4-23.1 25.6-8 8 9.2 43.2 49.2h.3v-93.9c1.2-50.2 44-92.2 97.7-92.2 53.9 0 97.7 43.5 97.7 96.8 0 63.4-60.8 113.2-128.5 93.3-10.5-4.2-2.1-31.7 8.5-28.6 53 0 89.4-10.1 89.4-64.4 0-61-77.1-89.6-116.9-44.6-23.5 26.4-17.6 42.1-17.6 157.6 50.7 31 118.3 22 160.4-20.1 24.8-24.8 38.5-58 38.5-93 0-35.2-13.8-68.2-38.8-93.3-24.8-24.8-57.8-38.5-93.3-38.5s-68.8 13.8-93.5 38.5c-.3.3-16 16.5-21.2 23.9l-.5.6c-3.3 4.7-6.3 9.1-20.1 6.1-6.9-1.7-14.3-5.8-14.3-11.8V20c0-5 3.9-10.5 10.5-10.5h241.3c8.3 0 8.3 11.6 8.3 15.1 0 3.9 0 15.1-8.3 15.1H130.3v132.9h.3c104.2-109.8 282.8-36 282.8 108.9 0 178.1-244.8 220.3-310.1 62.8zm63.3-260.8c-.5 4.2 4.6 24.5 14.6 20.6C306 56.6 384 144.5 390.6 144.5c4.8 0 22.8-15.3 14.3-22.8-93.2-89-234.5-57-238.3-38.2zM393 414.7C283 524.6 94 475.5 61 310.5c0-12.2-30.4-7.4-28.9 3.3 24 173.4 246 256.9 381.6 121.3 6.9-7.8-12.6-28.4-20.7-20.4zM213.6 306.6c0 4 4.3 7.3 5.5 8.5 3 3 6.1 4.4 8.5 4.4 3.8 0 2.6.2 22.3-19.5 19.6 19.3 19.1 19.5 22.3 19.5 5.4 0 18.5-10.4 10.7-18.2L265.6 284l18.2-18.2c6.3-6.8-10.1-21.8-16.2-15.7L249.7 268c-18.6-18.8-18.4-19.5-21.5-19.5-5 0-18 11.7-12.4 17.3L234 284c-18.1 17.9-20.4 19.2-20.4 22.6z"/></svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M423.9 255.8 411 413.1c-3.3 40.7-63.9 35.1-60.6-4.9l10-122.5-41.1 2.3c10.1 20.7 15.8 43.9 15.8 68.5 0 41.2-16.1 78.7-42.3 106.5l-39.3-39.3c57.9-63.7 13.1-167.2-74-167.2-25.9 0-49.5 9.9-67.2 26L73 243.2c22-20.7 50.1-35.1 81.4-40.2l75.3-85.7-42.6-24.8-51.6 46c-30 26.8-70.6-18.5-40.5-45.4l68-60.7c9.8-8.8 24.1-10.2 35.5-3.6 0 0 139.3 80.9 139.5 81.1 16.2 10.1 20.7 36 6.1 52.6L285.7 229l106.1-5.9c18.5-1.1 33.6 14.4 32.1 32.7zm-64.9-154c28.1 0 50.9-22.8 50.9-50.9C409.9 22.8 387.1 0 359 0c-28.1 0-50.9 22.8-50.9 50.9 0 28.1 22.8 50.9 50.9 50.9zM179.6 456.5c-80.6 0-127.4-90.6-82.7-156.1l-39.7-39.7C36.4 287 24 320.3 24 356.4c0 130.7 150.7 201.4 251.4 122.5l-39.7-39.7c-16 10.9-35.3 17.3-56.1 17.3z"/></svg>

Before

Width:  |  Height:  |  Size: 985 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M322.1 252v-1l-51.2-65.8s-12 1.6-25 15.1c-9 9.3-242.1 239.1-243.4 240.9-7 10 1.6 6.8 15.7 1.7.8 0 114.5-36.6 114.5-36.6.5-.6-.1-.1.6-.6-.4-5.1-.8-26.2-1-27.7-.6-5.2 2.2-6.9 7-8.9l92.6-33.8c.6-.8 88.5-81.7 90.2-83.3zm160.1 120.1c13.3 16.1 20.7 13.3 30.8 9.3 3.2-1.2 115.4-47.6 117.8-48.9 8-4.3-1.7-16.7-7.2-23.4-2.1-2.5-205.1-245.6-207.2-248.3-9.7-12.2-14.3-12.9-38.4-12.8-10.2 0-106.8.5-116.5.6-19.2.1-32.9-.3-19.2 16.9C250 75 476.5 365.2 482.2 372.1zm152.7 1.6c-2.3-.3-24.6-4.7-38-7.2 0 0-115 50.4-117.5 51.6-16 7.3-26.9-3.2-36.7-14.6l-57.1-74c-5.4-.9-60.4-9.6-65.3-9.3-3.1.2-9.6.8-14.4 2.9-4.9 2.1-145.2 52.8-150.2 54.7-5.1 2-11.4 3.6-11.1 7.6.2 2.5 2 2.6 4.6 3.5 2.7.8 300.9 67.6 308 69.1 15.6 3.3 38.5 10.5 53.6 1.7 2.1-1.2 123.8-76.4 125.8-77.8 5.4-4 4.3-6.8-1.7-8.2z"/></svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

Some files were not shown because too many files have changed in this diff Show More