Compare commits

..

161 Commits
1.0.0 ... 1.1.0

Author SHA1 Message Date
a76543d7a7 ci: clean up release workflow 2025-03-25 14:24:48 -07:00
e6d4cb7e4f ci: update release workflow summary 2025-03-25 14:13:52 -07:00
d567ea4517 ci: update release workflow output summary 2025-03-25 14:09:36 -07:00
424a4efb7a ci: update release workflow step to output changelogs 2025-03-25 14:05:23 -07:00
03d863f5e7 ci: update workflow env variables 2025-03-25 14:01:52 -07:00
820f770619 ci: update workflows 2025-03-25 13:59:57 -07:00
b6d5505c2d ci: fix variables 2025-03-25 13:53:11 -07:00
6af347f5d2 ci: modify workflow internal env management 2025-03-25 13:51:48 -07:00
eb0f7a5a72 ci: output workflow release changelogs 2025-03-25 13:32:49 -07:00
01415e13d5 ci: update env variables for release workflow 2025-03-25 13:26:55 -07:00
9329a3a032 ci: update release workflow 2025-03-25 12:43:20 -07:00
e857bfee03 fix: correct uuidv5 call for cjs to esm 2025-03-25 11:07:28 -07:00
7e71ff5e37 docs(readme): update env variables 2025-03-25 00:45:38 -07:00
bc629d6384 docs(readme): add screenshot 2025-03-25 00:42:30 -07:00
21d1c8bacf refactor: set primary gzip keyword to /gzip 2025-03-25 00:28:01 -07:00
f086e806df feat: add multiple url subpath keywords for assets 2025-03-25 00:27:23 -07:00
fdd9093f49 feat: change gzip compression from tar package to zlib 2025-03-24 23:27:02 -07:00
7fad9689c6 build(package): remove package tar 2025-03-24 23:26:10 -07:00
2b2795b7dd chore: remove fonts.min.css 2025-03-24 23:25:37 -07:00
fab2bc636a fix: initialization steps should wait on tar.gz promise to continue 2025-03-24 02:01:03 -07:00
f0237eb488 feat: add favicon; support for binary data 2025-03-24 00:01:48 -07:00
1160f43820 feat: add documentation icon to header of web ui 2025-03-23 22:57:09 -07:00
d7b2e338d9 feat: report human readable date in filelist for file mtime 2025-03-23 22:56:42 -07:00
2d61f8516d build(package): add documentation url 2025-03-23 22:55:54 -07:00
7c1483184a refactor: set header icons font-size clamp smaller 2025-03-23 22:55:32 -07:00
5f03e374d4 build(package): add new package moment.js 2025-03-23 22:41:41 -07:00
d391676a8e refactor: decrease font-size clamp maximum 2025-03-23 22:40:46 -07:00
25ed3c38e7 chore: removal of fonts.min.css - no longer needed 2025-03-23 22:38:03 -07:00
37195341c5 build: ensure app only installs production dependencies on docker deployment 2025-03-23 21:12:10 -07:00
6f0602f49b Merge remote-tracking branch 'origin/main' 2025-03-23 21:11:12 -07:00
b163dff842 feat: add filesize to list of files hosted in app 2025-03-23 21:10:07 -07:00
renovate[bot]
439b706060 chore(deps): lock file maintenance (#40)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-24 01:45:40 +00:00
44f7f8c6c2 refactor: variable names for xml and m3u 2025-03-23 18:44:06 -07:00
075303e9b6 feat: add xml.tar.gz compression during startup 2025-03-23 18:43:01 -07:00
62da08860d refactor: rename envFileEPG to envFileXML; add env var to rename 2025-03-23 05:31:51 -07:00
a6abfcde90 feat: add ejs template system 2025-03-23 03:57:23 -07:00
9f394e84cb chore: add debug logs 2025-03-23 03:36:53 -07:00
e0062d181d feat: add new template folder www 2025-03-23 03:27:00 -07:00
bc0ed61e1a build: update packages 2025-03-23 03:22:41 -07:00
6965d2eaa4 chore: template html migrated to independent file 2025-03-23 03:22:06 -07:00
016751ddbd chore: update script stylesheets 2025-03-23 03:21:23 -07:00
06bf294f8a feat: add new template system; index.html 2025-03-23 03:20:43 -07:00
23f2726ff8 build: add eslint flat config 2025-03-23 03:14:58 -07:00
9e54446f44 build: convert root.js from CJS to ESM 2025-03-23 03:14:21 -07:00
811380215a fix: viewport resizing on table content fitting screen 2025-03-22 05:51:56 -07:00
b4675dac70 style: minor edits to text ordering 2025-03-22 05:24:21 -07:00
d4df854820 feat: add link to xml, epg in new filelist table 2025-03-22 05:23:49 -07:00
94a55d5922 ci: update workflow 2025-03-22 01:29:23 -07:00
02f5d5e7d9 ci: test workflow build 2025-03-22 01:06:16 -07:00
f8ce387f4f ci: update workflow action docker/build-push-action network 2025-03-21 23:47:04 -07:00
8e01deba82 build: bump tvapp2 to v1.1.0 2025-03-21 13:57:33 -07:00
5dbf387bf0 docs(readme): add env vars to table 2025-03-21 05:10:56 -07:00
8a13954718 docs(readme): document newly added env variables 2025-03-21 04:50:18 -07:00
a05c4d3684 build(dockerfile): add new env variables 2025-03-21 04:50:00 -07:00
a6543fdc28 chore: set env LOG_LEVEL default to 4 2025-03-21 04:49:38 -07:00
23d4d523d6 chore: change css stylesheet for header 2025-03-21 04:16:00 -07:00
b6a8bb2e66 fix: make sure localhost warning box does not show if hidden 2025-03-21 03:09:09 -07:00
dea4a21f92 feat: new dark theme for webserver page 2025-03-21 02:16:36 -07:00
074fbe67d8 chore: remove cjs require in favor of new esm import method 2025-03-21 02:16:08 -07:00
eee25769c8 fix: add default value for env variable if running locally 2025-03-21 02:14:56 -07:00
cbef38f970 feat: add new env variable STREAM_QUALITY 2025-03-21 02:14:05 -07:00
03ab50f557 feat: add new env variables: FILE_PLAYLIST and FILE_EPG 2025-03-21 02:12:10 -07:00
6b88664db0 fix: server unable to be started via localhost; server ip var invalid 2025-03-21 02:09:58 -07:00
ceafd71461 feat: add new logging method; add env LOG_LEVEL 2025-03-21 02:09:07 -07:00
614a0a2daf build: convert code from CJS to ESM 2025-03-21 01:59:26 -07:00
e6bde3e0de chore: add tvapp2.min.js javascript 2025-03-20 20:05:54 -07:00
50c724869e chore: add tvapp2.min.css stylesheet 2025-03-20 20:01:44 -07:00
b595aa09a5 build(package): add type module for node esm 2025-03-20 19:08:31 -07:00
7e68e55ae6 build(dockerfile): fix arg ARCH being defined after initial pull 2025-03-20 19:06:42 -07:00
1a423d0def Merge pull request #36 from TheBinaryNinja/renovate/user-agents-1.x-lockfile
fix(deps): update dependency user-agents to v1.1.484
2025-03-20 00:41:36 -07:00
renovate[bot]
e107475252 fix(deps): update dependency user-agents to v1.1.484 2025-03-20 06:50:02 +00:00
667b260aff Merge pull request #32 from TheBinaryNinja/renovate/playwright-monorepo
fix(deps): update dependency playwright to v1.51.1
2025-03-19 10:18:03 -07:00
4036117d6c Merge pull request #35 from TheBinaryNinja/renovate/user-agents-1.x-lockfile
fix(deps): update dependency user-agents to v1.1.483
2025-03-19 10:17:33 -07:00
renovate[bot]
83ee35b9ae fix(deps): update dependency user-agents to v1.1.483 2025-03-19 12:33:41 +00:00
9cca602585 build: add healthcheck to docker-compose.yml 2025-03-17 22:59:31 -07:00
05944d284e build: bump base to alpine:3.21; add platform parameter 2025-03-17 22:36:28 -07:00
b8d6e4f538 ci: style workflows 2025-03-17 19:30:01 -07:00
a45541f0b9 ci: update workflow commenting 2025-03-17 18:49:10 -07:00
d836665df3 ci: minor refactoring of comment blocks to workflow issues-scan 2025-03-17 17:56:06 -07:00
21cb2a90c8 ci: add name to main job in workflow issues-scan 2025-03-17 17:54:11 -07:00
renovate[bot]
259f0a1fe1 fix(deps): update dependency playwright to v1.51.1 2025-03-18 00:44:02 +00:00
731ca00390 ci: update issues-scan workflow for compatibility with renovate bot 2025-03-17 17:42:42 -07:00
c938f7a212 ci: add debugging to github workflows 2025-03-17 16:32:13 -07:00
b11f85caf5 ci: add debugging for js context 2025-03-17 16:25:50 -07:00
0e0eefba2b ci: fix workflow pr issue 2025-03-17 16:22:03 -07:00
06cbd4663c ci: list existing labels for workflow 2025-03-17 12:57:56 -07:00
a578677137 ci: update labels for workflow 2025-03-17 12:52:26 -07:00
e5cecbac54 ci: get existing labels in workflow 2025-03-17 12:48:16 -07:00
42597e0652 ci: update issues-scan workflow 2025-03-17 12:39:39 -07:00
8ccd339d05 ci: change package manager node to nodenv 2025-03-17 12:22:48 -07:00
54afd779b3 ci: add node manager to renovate config 2025-03-17 12:19:33 -07:00
f83ef42653 ci: update renovate labels for packageRules 2025-03-17 12:11:47 -07:00
dc36741c72 ci: update renovate rangeStrategy to auto 2025-03-17 12:08:03 -07:00
2ec3b6ed19 ci: update renovate rangeStrategy to pin 2025-03-17 12:07:14 -07:00
77ae969d28 docs(readme): update expired discord invite link #8 2025-03-17 11:41:26 -07:00
f8bf7afbe2 ci: disable updatePinnedDependencies on renovate 2025-03-17 03:40:19 -07:00
aa61eeec34 ci: add gitAuthor to renovate 2025-03-17 03:35:12 -07:00
7cdb4b9109 ci: enable forkProcessing in renovate 2025-03-17 03:32:09 -07:00
99c0491cb5 ci: update renovate config 2025-03-17 03:28:37 -07:00
e889bb37b6 ci: update preserveSemverRanges for renovate 2025-03-17 03:20:46 -07:00
2db3ea8c62 ci: enable renovate dependency dashboard 2025-03-17 03:12:57 -07:00
d54303d0d7 Merge pull request #30 from TheBinaryNinja/renovate/user-agents-1.x
PR 30: fix(deps): update dependency user-agents to ^1.1.480
2025-03-17 03:00:31 -07:00
renovate[bot]
f6fa7054bd fix(deps): update dependency user-agents to ^1.1.480 2025-03-17 07:11:23 +00:00
renovate[bot]
6249d3ad42 chore(deps): lock file maintenance (#29)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-17 07:10:06 +00:00
da241a8c9e Merge pull request #27 from TheBinaryNinja/renovate/user-agents-1.x
fix(deps): update dependency user-agents to ^1.1.477
2025-03-16 20:51:45 -07:00
525dae72e1 Merge pull request #28 from TheBinaryNinja/renovate/tj-actions-changed-files-46.x
chore(deps): update tj-actions/changed-files action to v46
2025-03-16 16:30:02 -07:00
renovate[bot]
6182a1c3d4 chore(deps): update tj-actions/changed-files action to v46 2025-03-16 06:34:40 +00:00
renovate[bot]
a00aaa77cf fix(deps): update dependency user-agents to ^1.1.477 2025-03-14 12:00:29 +00:00
57aa72b355 Merge pull request #23 from TheBinaryNinja/renovate/playwright-monorepo
fix(deps): update dependency playwright to ^1.51.0
2025-03-13 01:20:26 -07:00
5ad42e6388 Merge pull request #25 from TheBinaryNinja/renovate/tsickert-discord-webhook-7.x
chore(deps): update tsickert/discord-webhook action to v7
2025-03-13 01:17:58 -07:00
renovate[bot]
d0b2f0a4f4 fix(deps): update dependency playwright to ^1.51.0 2025-03-13 08:17:55 +00:00
af90927a84 ci: update renovate config 2025-03-13 01:16:35 -07:00
5a5c0606a7 Merge pull request #22 from TheBinaryNinja/renovate/user-agents-1.x-lockfile
fix(deps): update dependency user-agents to v1.1.477
2025-03-13 01:03:50 -07:00
renovate[bot]
946469a4db chore(deps): update tsickert/discord-webhook action to v7 2025-03-13 08:03:43 +00:00
renovate[bot]
5aa8e1ad7e fix(deps): update dependency user-agents to v1.1.477 2025-03-13 08:00:11 +00:00
b29144be8f Merge pull request #21 from TheBinaryNinja/renovate/configure
chore: Configure Renovate
2025-03-13 00:58:51 -07:00
c13bb89584 chore: stage package-lock.json 2025-03-13 00:56:30 -07:00
renovate[bot]
aaed36e18b Add renovate.json 2025-03-13 07:56:18 +00:00
57f84e4bba chore: bump node version in dockerfile 2025-03-13 00:55:30 -07:00
8983cabd48 docs(readme): modify traefik instructions 2025-03-13 00:53:05 -07:00
8d856a30bd fix: correct typo default arch amd64 in Dockerfile 2025-03-02 04:33:33 -07:00
2518424ad1 build: add label architecture 2025-02-26 16:15:50 -07:00
f587291d72 ci: add workflow steps for digest exporting and readme extraction 2025-02-26 16:15:27 -07:00
b8dbba7a7e ci: update env variables for workflows 2025-02-26 14:22:57 -07:00
7d29ab31ce build: add org.opencontainers.image.registry 2025-02-26 07:36:30 -07:00
61345f3bcd ci: add org.opencontainers.image.registry 2025-02-26 07:36:16 -07:00
7c21adb843 ci: update tagging for deployment workflows 2025-02-26 05:42:25 -07:00
dd88789f14 ci: update github deployment workflows; add annotations list 2025-02-26 03:39:51 -07:00
4d8794d3d0 ci: add index-annotation to workflow action int128/docker-manifest-create-action 2025-02-26 02:46:35 -07:00
aa0028901a ci: update github deployment workflow; add annotations 2025-02-26 02:40:07 -07:00
901a11382d ci: add README.md cache to deployment workflow, inject docker label org.opencontainers.image.description` 2025-02-26 02:08:58 -07:00
9e19d9798f ci: add docker untagged image cleanup step 2025-02-26 01:55:15 -07:00
97f01942af ci: update deployment workflow to clean up untagged docker images 2025-02-26 01:48:33 -07:00
d622de1341 ci: update deployment workflow to add single and double digit version numbers 2025-02-26 01:38:17 -07:00
6e1ed71674 ci: set global flavor value to false, utilize tag instead 2025-02-25 12:25:57 -07:00
4ee2e79446 ci: remove global property flavor => latest in favor of labels for workflow docker/metadata-action 2025-02-25 11:20:38 -07:00
c70553093d ci: add REGISTRY_REPO_ORG_AUTHOR_LC and REGISTRY_REPO_AUTHOR_LC to remove uppercase conflict 2025-02-25 07:42:41 -07:00
57b0d44c7d chore: update docker image labels to conform with opencontainers spec
https://github.com/opencontainers/image-spec/blob/main/annotations.md
2025-02-25 06:41:37 -07:00
71fad013cf ci: add new build args VERSION BUILDDATE for action docker/build-push-action 2025-02-25 05:48:59 -07:00
d2aee89c21 build: update label BUILDVERSION syntax 2025-02-25 05:23:20 -07:00
544302de6e ci: replace env.ref_name with github.ref_name 2025-02-25 05:22:55 -07:00
dfdc44b1e3 ci: update deployment workflows to output debugging parameters during process 2025-02-25 05:05:22 -07:00
05ab495a46 ci: update gitea workflow to return output of parameters 2025-02-25 04:58:38 -07:00
f5829034a2 fix: workflow deploy-docker-all: up to 10 inputs for a workflow_dispatch event 2025-02-25 04:06:35 -07:00
f186dd8030 ci: update account token secret var for gitea.com registry 2025-02-25 04:02:29 -07:00
ec885559af ci: add docker deployment workflow for gitea.com registry 2025-02-25 03:55:05 -07:00
57c4547a66 ci: add IMAGE_GITEA_WEBSITE env var for dispatch workflow 2025-02-25 03:54:43 -07:00
f8a90a3e33 ci: fix issues-new and issues-stale to detect correct prefix in labels and not re-name 2025-02-25 03:09:37 -07:00
6700d94abb ci: create release meta as to not override existing sha256 before manifest merge completed 2025-02-24 18:32:17 -07:00
577b28cd6d ci: modify meta data generation for arm64 docker container for gitea 2025-02-24 18:16:09 -07:00
f5c767426f ci: modify arm64 workflow step tag to not conflict with amd64 before merge 2025-02-24 18:07:07 -07:00
9a9b18bfbc ci: modify gitea workflow image author and app name 2025-02-24 17:56:16 -07:00
a2aaddb9b2 build: update package.json with revised docker:build:arch commands 2025-02-24 16:55:42 -07:00
eac58e39aa docs(readme): update docker tags / registry list to show new structure of tags 2025-02-24 16:53:41 -07:00
6ec3894175 ci: add registry url to front of manifest paths before merge completed 2025-02-24 16:33:02 -07:00
f8b333af70 build: dockerfile and dockerfile.aarch64 merged, no longer needed 2025-02-24 16:25:52 -07:00
d021aaaea5 ci: merge amd64 and arm64 build process into single job 2025-02-24 16:25:09 -07:00
0a892a80ad ci: update deployment workflow metadata tags 2025-02-24 15:35:43 -07:00
17ecda57fe ci: remove requirement depending on deprecated job job-docker-release-dockerhub-arm64 2025-02-24 15:17:09 -07:00
4c0af665d5 ci: refactor dockerhub deployment process to handle both architectures in one step 2025-02-24 15:12:47 -07:00
3ef13657cd build: add arg $ARCH to Dockerfile and prep to combine architectures 2025-02-24 15:12:12 -07:00
30 changed files with 9780 additions and 3045 deletions

View File

@@ -1,15 +1,35 @@
# # # #
# @type github workflow # @type github workflow
# @desc cleans up the list of deployments in the environment history
# edit the 'environment:' to determine which deployment to keep clean
# - can be ran manually
# @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_CL Github Access Token (Classic) # @secrets secrets.SELF_TOKEN self github personal access token (fine-grained)
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKfLOWS Discord Webbhook URL; right-click on channel, click "Integrations" # 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"
@@ -30,10 +50,10 @@ on:
# # # #
DEPLOYMENT_ENV: DEPLOYMENT_ENV:
description: '📦 Deployment Environment' description: '📦 Deployment Environment'
required: true required: true
default: 'orion' default: 'orion'
type: string type: string
# # # #
# Delay # Delay
@@ -42,20 +62,22 @@ on:
# # # #
DEPLOYMENT_DELAY: DEPLOYMENT_DELAY:
description: '🕛 Delete Delay' description: '🕛 Delete Delay'
required: true required: true
default: '1000' default: '1000'
type: string type: string
# # # #
# environment variables # environment variables
# # # #
env: env:
DEPLOYMENT_ENV: ${{ github.event.inputs.DEPLOYMENT_ENV || 'orion' }} DEPLOYMENT_ENV: ${{ github.event.inputs.DEPLOYMENT_ENV || 'orion' }}
DEPLOYMENT_DELAY: ${{ github.event.inputs.DEPLOYMENT_DELAY || '1000' }} DEPLOYMENT_DELAY: ${{ github.event.inputs.DEPLOYMENT_DELAY || '1000' }}
BOT_NAME_1: EuropaServ BOT_NAME_1: EuropaServ
BOT_NAME_DEPENDABOT: dependabot[bot] BOT_NAME_2: BinaryServ
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" },
@@ -128,7 +150,6 @@ jobs:
runs-on: apollo-x64 runs-on: apollo-x64
timeout-minutes: 20 timeout-minutes: 20
permissions: write-all permissions: write-all
steps: steps:
# # # #
@@ -188,7 +209,7 @@ jobs:
- name: >- - name: >-
🔔 Send Discord Webhook Message (Success) 🔔 Send Discord Webhook Message (Success)
id: task_cleanup_notify_discord_success id: task_cleanup_notify_discord_success
uses: tsickert/discord-webhook@v6.0.0 uses: tsickert/discord-webhook@v7.0.0
if: success() if: success()
with: with:
username: 'Io' username: 'Io'
@@ -224,7 +245,7 @@ jobs:
- name: >- - name: >-
🔔 Send Discord Webhook Message (Failure) 🔔 Send Discord Webhook Message (Failure)
id: task_cleanup_notify_discord_failure id: task_cleanup_notify_discord_failure
uses: tsickert/discord-webhook@v6.0.0 uses: tsickert/discord-webhook@v7.0.0
if: failure() if: failure()
with: with:
username: 'Io' username: 'Io'

File diff suppressed because it is too large Load Diff

View File

@@ -4,10 +4,31 @@
# @url https://github.com/Aetherinox # @url https://github.com/Aetherinox
# @usage deploys docker container to Dockerhub and send message to discord # @usage deploys docker container to Dockerhub and send message to discord
# upload this workflow to both the `main` branch of the tvapp2 repository # upload this workflow to both the `main` branch of the tvapp2 repository
# @secrets secrets.ADMINSERV_GPG_KEY_ASC gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK #
# secrets.ADMINSERV_GPG_PASSPHRASE gpg private key passphrase # @secrets secrets.SELF_TOKEN self github personal access token (fine-grained)
# secrets.ORG_BINARYNINJA_DOCKERHUB_TOKEN github personal access token (classic) with package:write permission # secrets.SELF_TOKEN_CL self github personal access token (classic)
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES Discord webhook to report releases from github to discord # 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" name: "📦 Deploy Docker Dockerhub"
@@ -36,10 +57,10 @@ on:
# # # #
IMAGE_NAME: IMAGE_NAME:
description: '📦 Image Name' description: '📦 Image Name'
required: true required: true
default: 'tvapp2' default: 'tvapp2'
type: string type: string
# # # #
# Image Version # Image Version
@@ -118,8 +139,11 @@ env:
IMAGE_VERSION: ${{ github.event.inputs.IMAGE_VERSION || '1.0.0' }} IMAGE_VERSION: ${{ github.event.inputs.IMAGE_VERSION || '1.0.0' }}
IMAGE_DOCKERHUB_AUTHOR: ${{ github.event.inputs.IMAGE_DOCKERHUB_AUTHOR || 'thebinaryninja' }} IMAGE_DOCKERHUB_AUTHOR: ${{ github.event.inputs.IMAGE_DOCKERHUB_AUTHOR || 'thebinaryninja' }}
IMAGE_DOCKERHUB_USERNAME: ${{ github.event.inputs.IMAGE_DOCKERHUB_USERNAME || 'thebinaryninja' }} IMAGE_DOCKERHUB_USERNAME: ${{ github.event.inputs.IMAGE_DOCKERHUB_USERNAME || 'thebinaryninja' }}
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]
# # # #
# Jobs # Jobs
@@ -203,282 +227,21 @@ jobs:
gpg_passphrase: ${{ secrets.ADMINSERV_GPG_PASSPHRASE }} gpg_passphrase: ${{ secrets.ADMINSERV_GPG_PASSPHRASE }}
# # # #
# Job Docker Release Dockerhub Arm64 # Job Docker Release Dockerhub
# # # #
job-docker-release-dockerhub-arm64: job-docker-release-dockerhub:
name: >- name: >-
📦 Release Dockerhub Arm64 📦 Release Dockerhub
# runs-on: ubuntu-latest # runs-on: ubuntu-latest
runs-on: apollo-x64 runs-on: apollo-x64
timeout-minutes: 10 timeout-minutes: 10
permissions:
contents: write
packages: write
attestations: write
id-token: write
needs: [ job-docker-release-tags-create ] needs: [ job-docker-release-tags-create ]
permissions:
contents: write
packages: write
attestations: write
id-token: write
steps:
# #
# Release Dockerhub Start Arm64
# #
- name: '🏳️ Start'
id: task_release_dh_start
run: |
echo "Starting Dockerhub arm64"
# #
# 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 "DOCKER_IMAGE=`echo ${{github.repository}} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV}
echo "DOCKER_SHA=${GITHUB_SHA}" >> $GITHUB_ENV
echo "NOW=$(date +'%m-%d-%Y %H:%M:%S')" >> $GITHUB_ENV
echo "NOW_SHORT=$(date +'%m-%d-%Y')" >> $GITHUB_ENV
echo "NOW_LONG=$(date +'%m-%d-%Y %H:%M')" >> $GITHUB_ENV
echo "NOW_DOCKER_LABEL=$(date +'%Y%m%d')" >> $GITHUB_ENV
# #
# Release Dockerhub 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 Arm64
# #
- name: '⚙️ Set up QEMU'
id: task_release_dh_qemu
uses: docker/setup-qemu-action@v3
# #
# Release Dockerhub Setup BuildX Arm64
# #
- 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 Arm64
# #
- 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 Meta Arm64
# #
- name: '🔨 Dockerhub: Meta - Arm64'
id: task_release_dh_meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.IMAGE_DOCKERHUB_AUTHOR }}/${{ 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.VERSION=${{ env.IMAGE_VERSION }}
org.opencontainers.image.BUILDDATE=${{ env.NOW_DOCKER_LABEL }}
org.opencontainers.image.licenses=MIT
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.vendor=${{ env.IMAGE_DOCKERHUB_AUTHOR }}
org.opencontainers.image.ref.name=${{ env.ref_name }}
org.opencontainers.image.development=${{ inputs.DEV_RELEASE == true && 'true' || 'false' }}
# #
# Release Dockerhub Build and Push Arm64
# #
- name: '📦 Build & Push (linux/arm64)'
id: task_release_dh_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_dh_meta.outputs.tags }}
labels: ${{ steps.task_release_dh_meta.outputs.labels }}
provenance: false
# #
# Release Dockerhub Checkpoint Arm64
# #
- name: '⚠️ Checkpoint'
id: task_release_dh_checkpoint
run: |
echo "registry ............. Dockerhub"
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 "inputs.DRY_RUN ....... ${{ inputs.DRY_RUN }}"
echo "env.AUTHOR ........... ${{ env.IMAGE_DOCKERHUB_AUTHOR }}"
echo "tags ................. ${{ steps.task_release_dh_meta.outputs.tags }}"
echo "labels ............... ${{ steps.task_release_dh_meta.outputs.labels }}"
echo "docker image ......... ${{ env.DOCKER_IMAGE }}"
echo "docker sha ........... ${{ env.DOCKER_SHA }}"
echo "docker image id ...... ${{ steps.task_release_dh_push.outputs.imageid }}"
echo "docker digest ........ ${{ steps.task_release_dh_push.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'
id: task_release_notifications_discord_send
uses: tsickert/discord-webhook@v6.0.0
if: success()
with:
username: 'Io'
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES }}
embed-title: "⚙️ ${{ 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 (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://github.com/${{ github.repository }}/pkgs/container/${{ env.IMAGE_NAME }}
- Release Type: `${{ inputs.DEV_RELEASE == true && '⚠️⚠️ Development / Pre-release ⚠️⚠️' || 'Stable' }}`
- Pull: `docker pull ${{ env.DOCKER_IMAGE }}:${{ inputs.DEV_RELEASE == true && 'development' || env.IMAGE_VERSION }}-amd64`
- Pull: `docker pull ${{ env.DOCKER_IMAGE }}@${{ steps.task_release_dh_push.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' || '' }}`
- 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_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"
# #
# Job Docker Release Dockerhub Amd64
# #
job-docker-release-dockerhub-amd64:
name: >-
📦 Release Dockerhub 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-dockerhub-arm64 ]
steps: steps:
# # # #
@@ -507,12 +270,16 @@ jobs:
- name: '🕛 Get Timestamp' - name: '🕛 Get Timestamp'
id: task_release_set_timestamp id: task_release_set_timestamp
run: | run: |
echo "DOCKER_IMAGE=`echo ${{github.repository}} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} echo "IMAGE_VERSION_1DIGIT=`echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-1`" >> ${GITHUB_ENV} # 1
echo "DOCKER_SHA=${GITHUB_SHA}" >> $GITHUB_ENV echo "IMAGE_VERSION_2DIGIT=`echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-2`" >> ${GITHUB_ENV} # 1.0
echo "NOW=$(date +'%m-%d-%Y %H:%M:%S')" >> $GITHUB_ENV echo "REGISTRY_REPO_ORG_AUTHOR_LC=`echo ${{ env.IMAGE_DOCKERHUB_AUTHOR }}/${{ env.IMAGE_NAME }} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} # thebinaryninja/tvapp2
echo "NOW_SHORT=$(date +'%m-%d-%Y')" >> $GITHUB_ENV echo "REGISTRY_REPO_AUTHOR_LC=`echo ${{ env.IMAGE_DOCKERHUB_AUTHOR }} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} # thebinaryninja
echo "NOW_LONG=$(date +'%m-%d-%Y %H:%M')" >> $GITHUB_ENV echo "DOCKER_SHA=${GITHUB_SHA}" >> $GITHUB_ENV # 71fad013cfce9116ec62779e4a7e627fe4c33627
echo "NOW_DOCKER_LABEL=$(date +'%Y%m%d')" >> $GITHUB_ENV 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 # Release Dockerhub Install Dependencies
@@ -530,7 +297,9 @@ jobs:
- name: '🔐 Apply dos2unix' - name: '🔐 Apply dos2unix'
id: task_release_dh_dos2unix id: task_release_dh_dos2unix
run: | 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 -- 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 # Release Dockerhub Fix Permissions
@@ -582,50 +351,93 @@ jobs:
password: ${{ secrets.ORG_BINARYNINJA_DOCKERHUB_TOKEN }} password: ${{ secrets.ORG_BINARYNINJA_DOCKERHUB_TOKEN }}
# # # #
# Release Dockerhub Meta Amd64 # Release Dockerhub Read Readme
#
# @usage org.opencontainers.image.description=${{ steps.task_release_dh_readme_cache.outputs.content }}
# # # #
- name: '🔨 Dockerhub: Meta - Amd64' - 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 id: task_release_dh_meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
with: with:
images: | images: |
${{ env.IMAGE_DOCKERHUB_AUTHOR }}/${{ env.IMAGE_NAME }} ${{ env.REGISTRY_REPO_AUTHOR_LC }}/${{ env.IMAGE_NAME }}
tags: | tags: |
# latest yes # tag latest = yes ( no dev )
type=raw,value=latest,enable=${{ !inputs.DEV_RELEASE }} type=raw,value=latest,enable=${{ !inputs.DEV_RELEASE }}
# tag add amd64 # tag add pr tag ( PR or push only )
# type=raw,enable=true,priority=1000,value=amd64 type=ref,enable=${{ github.event_name == 'pull_request' || github.event_name == 'push' }},priority=600,prefix=,suffix=,event=tag
# dispatch add x1.x.x-amd64 # tag add 1.0.0 ( dispatch only + no dev )
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=300,prefix=,suffix=-amd64,value=${{ env.IMAGE_VERSION }} type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=450,prefix=,suffix=,value=${{ env.IMAGE_VERSION }}
# dispatch add amd64-development # tag add 1.0 ( dispatch only + no dev )
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == true }},priority=300,prefix=,suffix=-amd64,value=development type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=425,prefix=,suffix=,value=${{ env.IMAGE_VERSION_2DIGIT }}
# tag add tag-arm64 # tag add 1 ( dispatch only + no dev )
type=ref,enable=${{ github.event_name == 'pull_request' || github.event_name == 'push' }},priority=600,prefix=,suffix=-amd64,event=tag type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=400,prefix=,suffix=,value=${{ env.IMAGE_VERSION_1DIGIT }}
# add development tag to default architecture (amd64) # 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 type=raw,enable=${{ inputs.DEV_RELEASE }},priority=400,prefix=,suffix=,value=development
flavor: | flavor: |
latest=${{ !inputs.DEV_RELEASE }} latest=false
labels: | labels: |
org.opencontainers.image.VERSION=${{ env.IMAGE_VERSION }} org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
org.opencontainers.image.BUILDDATE=${{ env.NOW_DOCKER_LABEL }} org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
org.opencontainers.image.licenses=MIT org.opencontainers.image.licenses=MIT
org.opencontainers.image.revision=${{ github.sha }} org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.vendor=${{ env.IMAGE_DOCKERHUB_AUTHOR }} org.opencontainers.image.vendor=${{ env.REGISTRY_REPO_AUTHOR_LC }}
org.opencontainers.image.ref.name=${{ env.ref_name }} org.opencontainers.image.ref.name=${{ github.ref_name }}
org.opencontainers.image.development=${{ inputs.DEV_RELEASE == true && 'true' || 'false' }} 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 # Release Dockerhub Build and Push Amd64
# # # #
- name: '📦 Build & Push (linux/amd64)' - name: '📦 Build & Push (linux/amd64)'
id: task_release_dh_push id: task_release_dh_push_amd64
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' ) if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
with: with:
@@ -633,9 +445,110 @@ jobs:
file: Dockerfile file: Dockerfile
platforms: linux/amd64 platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.task_release_dh_meta.outputs.tags }}
labels: ${{ steps.task_release_dh_meta.outputs.labels }} labels: ${{ steps.task_release_dh_meta.outputs.labels }}
tags: |
${{ steps.task_release_dh_meta.outputs.tags }}
provenance: false 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 # Release Dockerhub Checkpoint Amd64
@@ -644,19 +557,53 @@ jobs:
- name: '⚠️ Checkpoint' - name: '⚠️ Checkpoint'
id: task_release_dh_checkpoint id: task_release_dh_checkpoint
run: | run: |
echo "registry ............. Dockerhub" echo ""
echo "github.actor.......... ${{ github.actor }}" echo "[ GITHUB ] ---------------------------------------------------------------------------------------------"
echo "github.ref ........... ${{ github.ref }}" echo "github.actor.............................. ${{ github.actor }}"
echo "github.ref_name ...... ${{ github.ref_name }}" echo "github.ref ............................... ${{ github.ref }}"
echo "github.event_name .... ${{ github.event_name }}" echo "github.ref_name .......................... ${{ github.ref_name }}"
echo "inputs.DRY_RUN ....... ${{ inputs.DRY_RUN }}" echo "github.event_name ........................ ${{ github.event_name }}"
echo "env.AUTHOR ........... ${{ env.IMAGE_DOCKERHUB_AUTHOR }}" echo "github.repository_owner .................. ${{ github.repository_owner }}"
echo "tags ................. ${{ steps.task_release_dh_meta.outputs.tags }}" echo "github.repository ........................ ${{ github.repository }}"
echo "labels ............... ${{ steps.task_release_dh_meta.outputs.labels }}" echo ""
echo "docker image ......... ${{ env.DOCKER_IMAGE }}" echo "[ INPUTS ] ---------------------------------------------------------------------------------------------"
echo "docker sha ........... ${{ env.DOCKER_SHA }}" echo "inputs.IMAGE_NAME ........................ ${{ inputs.IMAGE_NAME }}"
echo "docker image id ...... ${{ steps.task_release_dh_push.outputs.imageid }}" echo "inputs.IMAGE_VERSION ..................... ${{ inputs.IMAGE_VERSION }}"
echo "docker digest ........ ${{ steps.task_release_dh_push.outputs.digest }}" 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 # Release Dockerhub Get Weekly Commits
@@ -674,7 +621,7 @@ jobs:
# # # #
- name: '🔔 Send Discord Webhook Message' - name: '🔔 Send Discord Webhook Message'
uses: tsickert/discord-webhook@v6.0.0 uses: tsickert/discord-webhook@v7.0.0
if: success() if: success()
with: with:
username: 'Io' username: 'Io'
@@ -684,19 +631,20 @@ jobs:
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg' embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg'
embed-description: | embed-description: |
## 📦 Docker Deploy (Dockerhub) ${{ job.status == 'success' && '✅' || '❌' }} `${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}` ### 📦 Deploy (Dockerhub) ${{ job.status == 'success' && '✅' || '❌' }} `${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}`
${{ inputs.DEV_RELEASE == true && '### ⚠️⚠️ Development / Pre-release ⚠️⚠️' || '' }} ${{ 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: A new version of the docker container `${{ env.IMAGE_NAME }}` has been released from Github to Dockerhub. The image is available at:
- https://github.com/${{ github.repository }}/pkgs/container/${{ env.IMAGE_NAME }} - 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' }}` - Release Type: `${{ inputs.DEV_RELEASE == true && '⚠️⚠️ Development / Pre-release ⚠️⚠️' || 'Stable' }}`
- Pull: `docker pull ${{ env.DOCKER_IMAGE }}:${{ inputs.DEV_RELEASE == true && 'development' || env.IMAGE_VERSION }}-amd64` - Pull: `docker pull ${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}:${{ inputs.DEV_RELEASE == true && 'development' || env.IMAGE_VERSION }}`
- Pull: `docker pull ${{ env.DOCKER_IMAGE }}@${{ steps.task_release_dh_push.outputs.digest }}` - 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 }}` - Dry Run: `${{ inputs.DRY_RUN }}`
- Source: `Dockerhub` https://hub.docker.com/r/${{ env.IMAGE_DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }} - 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' || '' }}` - Docker Image: `${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}`
- Version: `${{ env.IMAGE_VERSION }}`
- Branch: `${{ github.ref_name }}` - Branch: `${{ github.ref_name }}`
- Workflow: `${{ github.workflow }} (#${{github.run_number}})` - Workflow: `${{ github.workflow }} (#${{github.run_number}})`
- Runner: `${{ runner.name }}` - Runner: `${{ runner.name }}`

View File

@@ -4,10 +4,31 @@
# @url https://github.com/Aetherinox # @url https://github.com/Aetherinox
# @usage deploys docker container to Gitea and send message to discord # @usage deploys docker container to Gitea and send message to discord
# upload this workflow to both the `main` branch of the tvapp2 repository # upload this workflow to both the `main` branch of the tvapp2 repository
# @secrets secrets.ADMINSERV_GPG_KEY_ASC gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK #
# secrets.ADMINSERV_GPG_PASSPHRASE gpg private key passphrase # @secrets secrets.SELF_TOKEN self github personal access token (fine-grained)
# secrets.ORG_BINARYNINJA_GITEA_TOKEN gitea personal access token (classic) with package:write permission # secrets.SELF_TOKEN_CL self github personal access token (classic)
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES Discord webhook to report releases from gitea to discord # 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" name: "📦 Deploy Docker Gitea"
@@ -36,10 +57,10 @@ on:
# # # #
IMAGE_NAME: IMAGE_NAME:
description: '📦 Image Name' description: '📦 Image Name'
required: true required: true
default: 'tvapp2' default: 'tvapp2'
type: string type: string
# # # #
# Image Version # Image Version
@@ -48,10 +69,10 @@ on:
# # # #
IMAGE_VERSION: IMAGE_VERSION:
description: '🏷️ Image Version' description: '🏷️ Image Version'
required: true required: true
default: '1.0.0' default: '1.0.0'
type: string type: string
# # # #
# Gitea Author # Gitea Author
@@ -61,10 +82,10 @@ on:
# # # #
IMAGE_GITEA_AUTHOR: IMAGE_GITEA_AUTHOR:
description: '🪪 Image Author' description: '🪪 Image Author'
required: true required: true
default: 'BinaryNinja' default: 'BinaryNinja'
type: string type: string
# # # #
# Gitea Username # Gitea Username
@@ -78,6 +99,18 @@ on:
default: 'aetherinox' default: 'aetherinox'
type: string 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 # true no changes to the repo will be made
# false workflow will behave normally, and push any changes detected to the files # false workflow will behave normally, and push any changes detected to the files
@@ -113,12 +146,16 @@ on:
# # # #
env: env:
IMAGE_NAME: ${{ github.event.inputs.IMAGE_NAME || 'tvapp2' }} IMAGE_NAME: ${{ github.event.inputs.IMAGE_NAME || 'tvapp2' }}
IMAGE_VERSION: ${{ github.event.inputs.IMAGE_VERSION || '1.0.0' }} IMAGE_VERSION: ${{ github.event.inputs.IMAGE_VERSION || '1.0.0' }}
IMAGE_GITEA_AUTHOR: ${{ github.event.inputs.IMAGE_GITEA_AUTHOR || 'BinaryNinja' }} IMAGE_GITEA_AUTHOR: ${{ github.event.inputs.IMAGE_GITEA_AUTHOR || 'BinaryNinja' }}
IMAGE_GITEA_USERNAME: ${{ github.event.inputs.IMAGE_GITEA_USERNAME || 'BinaryNinja' }} IMAGE_GITEA_USERNAME: ${{ github.event.inputs.IMAGE_GITEA_USERNAME || 'BinaryNinja' }}
BOT_NAME_1: EuropaServ IMAGE_GITEA_WEBSITE: ${{ github.event.inputs.IMAGE_GITEA_WEBSITE || 'git.binaryninja.net' }}
BOT_NAME_DEPENDABOT: dependabot[bot]
BOT_NAME_1: EuropaServ
BOT_NAME_2: BinaryServ
BOT_NAME_DEPENDABOT: dependabot[bot]
BOT_NAME_RENOVATE: renovate[bot]
# # # #
# Jobs # Jobs
@@ -202,282 +239,21 @@ jobs:
gpg_passphrase: ${{ secrets.ADMINSERV_GPG_PASSPHRASE }} gpg_passphrase: ${{ secrets.ADMINSERV_GPG_PASSPHRASE }}
# # # #
# Job Docker Release Gitea Arm64 # Job Docker Release Gitea
# # # #
job-docker-release-gitea-arm64: job-docker-release-gitea:
name: >- name: >-
📦 Release Gitea Arm64 📦 Release Gitea
# runs-on: ubuntu-latest # runs-on: ubuntu-latest
runs-on: apollo-x64 runs-on: apollo-x64
timeout-minutes: 10 timeout-minutes: 10
permissions:
contents: write
packages: write
attestations: write
id-token: write
needs: [ job-docker-release-tags-create ] 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 "Starting Gitea Docker arm64"
# #
# Release Gitea Checkout Arm64
# #
- 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 "DOCKER_IMAGE=`echo ${{github.repository}} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV}
echo "DOCKER_SHA=${GITHUB_SHA}" >> $GITHUB_ENV
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 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: git.binaryninja.net
username: ${{ env.IMAGE_GITEA_USERNAME }}
password: ${{ secrets.ORG_BINARYNINJA_GITEA_TOKEN }}
# #
# Release Gitea Meta Arm64
# #
- name: '🔨 Gitea: Meta - Arm64'
id: task_release_gi_meta
uses: docker/metadata-action@v5
with:
images: |
git.binaryninja.net/${{ env.IMAGE_GITEA_AUTHOR }}/${{ 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.VERSION=${{ env.IMAGE_VERSION }}
org.opencontainers.image.BUILDDATE=${{ env.NOW_DOCKER_LABEL }}
org.opencontainers.image.licenses=MIT
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.vendor=${{ env.IMAGE_GITEA_AUTHOR }}
org.opencontainers.image.ref.name=${{ env.ref_name }}
org.opencontainers.image.development=${{ inputs.DEV_RELEASE == true && 'true' || 'false' }}
# #
# 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 "inputs.DRY_RUN ....... ${{ inputs.DRY_RUN }}"
echo "env.AUTHOR ........... ${{ env.IMAGE_GITEA_AUTHOR }}"
echo "tags ................. ${{ steps.task_release_gi_meta.outputs.tags }}"
echo "labels ............... ${{ steps.task_release_gi_meta.outputs.labels }}"
echo "docker image ......... ${{ env.DOCKER_IMAGE }}"
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@v6.0.0
if: success()
with:
username: 'Io'
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES }}
embed-title: "⚙️ ${{ 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://git.binaryninja.net/${{ env.IMAGE_GITEA_USERNAME }}/${{ env.IMAGE_NAME }}/packages
- Release Type: `${{ inputs.DEV_RELEASE == true && '⚠️⚠️ Development / Pre-release ⚠️⚠️' || 'Stable' }}`
- Pull: `docker pull git.binaryninja.net/${{ env.DOCKER_IMAGE }}:${{ inputs.DEV_RELEASE == true && 'development' || env.IMAGE_VERSION }}-arm64`
- Pull: `docker pull git.binaryninja.net/${{ env.DOCKER_IMAGE }}@${{ steps.task_release_gi_push.outputs.digest }}`
- Dry Run: `${{ inputs.DRY_RUN }}`
- Source: `Gitea` https://git.binaryninja.net/${{ 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: steps:
# # # #
@@ -506,12 +282,16 @@ jobs:
- name: '🕛 Get Timestamp' - name: '🕛 Get Timestamp'
id: task_release_set_timestamp id: task_release_set_timestamp
run: | run: |
echo "DOCKER_IMAGE=`echo ${{github.repository}} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} echo "IMAGE_VERSION_1DIGIT=`echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-1`" >> ${GITHUB_ENV} # 1
echo "DOCKER_SHA=${GITHUB_SHA}" >> $GITHUB_ENV echo "IMAGE_VERSION_2DIGIT=`echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-2`" >> ${GITHUB_ENV} # 1.0
echo "NOW=$(date +'%m-%d-%Y %H:%M:%S')" >> $GITHUB_ENV echo "REGISTRY_REPO_ORG_AUTHOR_LC=`echo ${{ env.IMAGE_GITEA_AUTHOR }}/${{ env.IMAGE_NAME }} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} # thebinaryninja/tvapp2
echo "NOW_SHORT=$(date +'%m-%d-%Y')" >> $GITHUB_ENV echo "REGISTRY_REPO_AUTHOR_LC=`echo ${{ env.IMAGE_GITEA_AUTHOR }} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} # thebinaryninja
echo "NOW_LONG=$(date +'%m-%d-%Y %H:%M')" >> $GITHUB_ENV echo "DOCKER_SHA=${GITHUB_SHA}" >> $GITHUB_ENV # 71fad013cfce9116ec62779e4a7e627fe4c33627
echo "NOW_DOCKER_LABEL=$(date +'%Y%m%d')" >> $GITHUB_ENV 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 # Release Gitea Install Dependencies
@@ -529,7 +309,9 @@ jobs:
- name: '🔐 Apply dos2unix' - name: '🔐 Apply dos2unix'
id: task_release_gi_dos2unix id: task_release_gi_dos2unix
run: | 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 -- 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 # Release Gitea Fix Permissions
@@ -577,55 +359,209 @@ jobs:
id: task_release_gi_registry id: task_release_gi_registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: git.binaryninja.net registry: ${{ env.IMAGE_GITEA_WEBSITE }}
username: ${{ env.IMAGE_GITEA_USERNAME }} username: ${{ env.IMAGE_GITEA_USERNAME }}
password: ${{ secrets.ORG_BINARYNINJA_GITEA_TOKEN }} password: ${{ secrets.ORG_BINARYNINJA_GITEA_TOKEN }}
# # # #
# Release Gitea Meta Amd64 # Release Gitea Read Readme
#
# @usage org.opencontainers.image.description=${{ steps.task_release_gi_readme_cache.outputs.content }}
# # # #
- name: '🔨 Gitea: Meta - Amd64' - name: '📄 Cache README.md'
id: task_release_gi_meta 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 uses: docker/metadata-action@v5
with: with:
images: | images: |
git.binaryninja.net/${{ env.IMAGE_GITEA_AUTHOR }}/${{ env.IMAGE_NAME }} ${{ env.IMAGE_GITEA_WEBSITE }}/${{ env.REGISTRY_REPO_AUTHOR_LC }}/${{ env.IMAGE_NAME }}
tags: | tags: |
# latest yes # tag latest = yes ( no dev )
type=raw,value=latest,enable=${{ !inputs.DEV_RELEASE }} type=raw,value=latest,enable=${{ !inputs.DEV_RELEASE }}
# tag add amd64 # tag add tag-amd64 ( PR or push only )
# 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 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) # 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 type=raw,enable=${{ inputs.DEV_RELEASE }},priority=400,prefix=,suffix=,value=development
flavor: | flavor: |
latest=${{ !inputs.DEV_RELEASE }} latest=false
labels: | labels: |
org.opencontainers.image.VERSION=${{ env.IMAGE_VERSION }} org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
org.opencontainers.image.BUILDDATE=${{ env.NOW_DOCKER_LABEL }} org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
org.opencontainers.image.licenses=MIT org.opencontainers.image.licenses=MIT
org.opencontainers.image.revision=${{ github.sha }} org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.vendor=${{ env.IMAGE_GITEA_AUTHOR }} org.opencontainers.image.vendor=${{ env.REGISTRY_REPO_AUTHOR_LC }}
org.opencontainers.image.ref.name=${{ env.ref_name }} org.opencontainers.image.ref.name=${{ github.ref_name }}
org.opencontainers.image.development=${{ inputs.DEV_RELEASE == true && 'true' || 'false' }} 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 # Release Gitea Build and Push Amd64
# # # #
- name: '📦 Build & Push (linux/amd64)' - name: '📦 Build & Push (linux/amd64)'
id: task_release_gi_push id: task_release_gi_push_amd64
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' ) if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
with: with:
@@ -633,30 +569,171 @@ jobs:
file: Dockerfile file: Dockerfile
platforms: linux/amd64 platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.task_release_gi_meta.outputs.tags }} labels: ${{ steps.task_release_gi_meta_amd64.outputs.labels }}
labels: ${{ steps.task_release_gi_meta.outputs.labels }} tags: |
${{ steps.task_release_gi_meta_amd64.outputs.tags }}
provenance: false provenance: false
sbom: false
build-args: |-
ARCH=amd64
VERSION=${{ env.IMAGE_VERSION }}
BUILDDATE=${{ env.NOW_DOCKER_LABEL }}
# # # #
# Release Gitea Checkpoint Amd64 # 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' - name: '⚠️ Checkpoint'
id: task_release_gi_checkpoint id: task_release_gi_checkpoint
run: | run: |
echo "registry ............. Gitea" echo ""
echo "github.actor.......... ${{ github.actor }}" echo "[ GITHUB ] ---------------------------------------------------------------------------------------------"
echo "github.ref ........... ${{ github.ref }}" echo "github.actor.............................. ${{ github.actor }}"
echo "github.ref_name ...... ${{ github.ref_name }}" echo "github.ref ............................... ${{ github.ref }}"
echo "github.event_name .... ${{ github.event_name }}" echo "github.ref_name .......................... ${{ github.ref_name }}"
echo "inputs.DRY_RUN ....... ${{ inputs.DRY_RUN }}" echo "github.event_name ........................ ${{ github.event_name }}"
echo "env.AUTHOR ........... ${{ env.IMAGE_GITEA_AUTHOR }}" echo "github.repository_owner .................. ${{ github.repository_owner }}"
echo "tags ................. ${{ steps.task_release_gi_meta.outputs.tags }}" echo "github.repository ........................ ${{ github.repository }}"
echo "labels ............... ${{ steps.task_release_gi_meta.outputs.labels }}" echo ""
echo "docker image ......... ${{ env.DOCKER_IMAGE }}" echo "[ INPUTS ] ---------------------------------------------------------------------------------------------"
echo "docker sha ........... ${{ env.DOCKER_SHA }}" echo "inputs.IMAGE_NAME ........................ ${{ inputs.IMAGE_NAME }}"
echo "docker image id ...... ${{ steps.task_release_gi_push.outputs.imageid }}" echo "inputs.IMAGE_VERSION ..................... ${{ inputs.IMAGE_VERSION }}"
echo "docker digest ........ ${{ steps.task_release_gi_push.outputs.digest }}" 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 # Release Gitea Get Weekly Commits
@@ -674,7 +751,7 @@ jobs:
# # # #
- name: '🔔 Send Discord Webhook Message' - name: '🔔 Send Discord Webhook Message'
uses: tsickert/discord-webhook@v6.0.0 uses: tsickert/discord-webhook@v7.0.0
if: success() if: success()
with: with:
username: 'Io' username: 'Io'
@@ -684,19 +761,20 @@ jobs:
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg' embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg'
embed-description: | embed-description: |
## 📦 Docker Deploy (Gitea) ${{ job.status == 'success' && '✅' || '❌' }} `${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}` ### 📦 Deploy (Gitea) ${{ job.status == 'success' && '✅' || '❌' }} `${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}`
${{ inputs.DEV_RELEASE == true && '### ⚠️⚠️ Development / Pre-release ⚠️⚠️' || '' }} ${{ 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: A new version of the docker container `${{ env.IMAGE_NAME }}` has been released from Github to Gitea. The image is available at:
- https://git.binaryninja.net/${{ env.IMAGE_GITEA_USERNAME }}/${{ env.IMAGE_NAME }}/packages - 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 git.binaryninja.net/${{ env.DOCKER_IMAGE }}:${{ inputs.DEV_RELEASE == true && 'development' || env.IMAGE_VERSION }}-amd64`
- Pull: `docker pull git.binaryninja.net/${{ env.DOCKER_IMAGE }}@${{ steps.task_release_gi_push.outputs.digest }}`
- Dry Run: `${{ inputs.DRY_RUN }}`
- Source: `Gitea` https://git.binaryninja.net/${{ 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 }}` - 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 }}` - Branch: `${{ github.ref_name }}`
- Workflow: `${{ github.workflow }} (#${{github.run_number}})` - Workflow: `${{ github.workflow }} (#${{github.run_number}})`
- Runner: `${{ runner.name }}` - Runner: `${{ runner.name }}`
@@ -707,14 +785,14 @@ jobs:
-# This docker image will use the following tags: -# This docker image will use the following tags:
``` ```
${{ steps.task_release_gi_meta.outputs.tags }} ${{ steps.task_release_gi_meta_amd64.outputs.tags }}
``` ```
### Labels ### Labels
-# This docker image embeds the following labels: -# This docker image embeds the following labels:
``` ```
${{ steps.task_release_gi_meta.outputs.labels }} ${{ steps.task_release_gi_meta_amd64.outputs.labels }}
``` ```
embed-color: ${{ job.status == 'success' && '5763719' || '15418782' }} embed-color: ${{ job.status == 'success' && '5763719' || '15418782' }}
embed-footer-text: "Completed at ${{ env.NOW }} UTC" embed-footer-text: "Completed at ${{ env.NOW }} UTC"

View File

@@ -0,0 +1,783 @@
# #
# @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

@@ -4,10 +4,31 @@
# @url https://github.com/Aetherinox # @url https://github.com/Aetherinox
# @usage deploys docker container to github and send message to discord # @usage deploys docker container to github and send message to discord
# upload this workflow to both the `main` branch of the tvapp2 repository # upload this workflow to both the `main` branch of the tvapp2 repository
# @secrets secrets.ADMINSERV_GPG_KEY_ASC gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK #
# secrets.ADMINSERV_GPG_PASSPHRASE gpg private key passphrase # @secrets secrets.SELF_TOKEN self github personal access token (fine-grained)
# secrets.ORG_BINARYNINJA_TOKEN_CL github personal access token (classic) with package:write permission # secrets.SELF_TOKEN_CL self github personal access token (classic)
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES Discord webhook to report releases from github to discord # 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" name: "📦 Deploy Docker Github"
@@ -36,10 +57,10 @@ on:
# # # #
IMAGE_NAME: IMAGE_NAME:
description: '📦 Image Name' description: '📦 Image Name'
required: true required: true
default: 'tvapp2' default: 'tvapp2'
type: string type: string
# # # #
# Image Version # Image Version
@@ -48,10 +69,10 @@ on:
# # # #
IMAGE_VERSION: IMAGE_VERSION:
description: '🏷️ Image Version' description: '🏷️ Image Version'
required: true required: true
default: '1.0.0' default: '1.0.0'
type: string type: string
# # # #
# Image Author # Image Author
@@ -61,10 +82,10 @@ on:
# # # #
IMAGE_GHCR_AUTHOR: IMAGE_GHCR_AUTHOR:
description: '🪪 Image Author' description: '🪪 Image Author'
required: true required: true
default: 'TheBinaryNinja' default: 'TheBinaryNinja'
type: string type: string
# # # #
# Image ghcr username # Image ghcr username
@@ -113,12 +134,15 @@ on:
# # # #
env: env:
IMAGE_NAME: ${{ github.event.inputs.IMAGE_NAME || 'tvapp2' }} IMAGE_NAME: ${{ github.event.inputs.IMAGE_NAME || 'tvapp2' }}
IMAGE_VERSION: ${{ github.event.inputs.IMAGE_VERSION || '1.0.0' }} IMAGE_VERSION: ${{ github.event.inputs.IMAGE_VERSION || '1.0.0' }}
IMAGE_GHCR_AUTHOR: ${{ github.event.inputs.IMAGE_GHCR_AUTHOR || 'BinaryNinja' }} IMAGE_GHCR_AUTHOR: ${{ github.event.inputs.IMAGE_GHCR_AUTHOR || 'BinaryNinja' }}
IMAGE_GHCR_USERNAME: ${{ github.event.inputs.IMAGE_GHCR_USERNAME || 'BinaryNinja' }} IMAGE_GHCR_USERNAME: ${{ github.event.inputs.IMAGE_GHCR_USERNAME || 'BinaryNinja' }}
BOT_NAME_1: EuropaServ
BOT_NAME_DEPENDABOT: dependabot[bot] BOT_NAME_1: EuropaServ
BOT_NAME_2: BinaryServ
BOT_NAME_DEPENDABOT: dependabot[bot]
BOT_NAME_RENOVATE: renovate[bot]
# # # #
# Jobs # Jobs
@@ -202,280 +226,21 @@ jobs:
gpg_passphrase: ${{ secrets.ADMINSERV_GPG_PASSPHRASE }} gpg_passphrase: ${{ secrets.ADMINSERV_GPG_PASSPHRASE }}
# # # #
# Job Docker Release Github Arm64 # Job Docker Release Github
# # # #
job-docker-release-github-arm64: job-docker-release-github:
name: >- name: >-
📦 Release Github Arm64 📦 Release Github
# runs-on: ubuntu-latest # runs-on: ubuntu-latest
runs-on: apollo-x64 runs-on: apollo-x64
timeout-minutes: 10 timeout-minutes: 10
permissions:
contents: write
packages: write
attestations: write
id-token: write
needs: [ job-docker-release-tags-create ] needs: [ job-docker-release-tags-create ]
permissions:
contents: write
packages: write
attestations: write
id-token: write
steps:
# #
# Release Github Start Arm64
# #
- name: '🏳️ Start'
id: task_release_gh_start
run: |
echo "Starting Github Docker arm64"
# #
# Release Github Checkout Arm64
# #
- 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 "DOCKER_IMAGE=`echo ${{github.repository}} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV}
echo "DOCKER_SHA=${GITHUB_SHA}" >> $GITHUB_ENV
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 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 Arm64
# #
- name: '⚙️ Set up QEMU'
id: task_release_gh_qemu
uses: docker/setup-qemu-action@v3
# #
# Release Github Setup BuildX Arm64
# #
- 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 Arm64
# #
- 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 Meta Arm64
# #
- name: '🔨 Github: Meta - Arm64'
id: task_release_gh_meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ env.IMAGE_GHCR_AUTHOR }}/${{ 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.VERSION=${{ env.IMAGE_VERSION }}
org.opencontainers.image.BUILDDATE=${{ env.NOW_DOCKER_LABEL }}
org.opencontainers.image.licenses=MIT
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.vendor=${{ env.IMAGE_GHCR_AUTHOR }}
org.opencontainers.image.ref.name=${{ env.ref_name }}
org.opencontainers.image.development=${{ inputs.DEV_RELEASE == true && 'true' || 'false' }}
# #
# Release Github Build and Push Arm64
# #
- name: '📦 Build & Push (linux/arm64)'
id: task_release_gh_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_gh_meta.outputs.tags }}
labels: ${{ steps.task_release_gh_meta.outputs.labels }}
provenance: false
# #
# Release Github Checkpoint Arm64
# #
- name: '⚠️ Checkpoint'
id: task_release_gh_checkpoint
run: |
echo "registry ............. 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 "inputs.DRY_RUN ....... ${{ inputs.DRY_RUN }}"
echo "env.AUTHOR ........... ${{ env.IMAGE_GHCR_AUTHOR }}"
echo "tags ................. ${{ steps.task_release_gh_meta.outputs.tags }}"
echo "labels ............... ${{ steps.task_release_gh_meta.outputs.labels }}"
echo "docker image ......... ${{ env.DOCKER_IMAGE }}"
echo "docker sha ........... ${{ env.DOCKER_SHA }}"
echo "docker image id ...... ${{ steps.task_release_gh_push.outputs.imageid }}"
echo "docker digest ........ ${{ steps.task_release_gh_push.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'
id: task_release_notifications_discord_send
uses: tsickert/discord-webhook@v6.0.0
if: success()
with:
username: 'Io'
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES }}
embed-title: "⚙️ ${{ 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 (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 }}
- Release Type: `${{ inputs.DEV_RELEASE == true && '⚠️⚠️ Development / Pre-release ⚠️⚠️' || 'Stable' }}`
- Pull: `docker pull ghcr.io/${{ env.DOCKER_IMAGE }}:${{ inputs.DEV_RELEASE == true && 'development' || env.IMAGE_VERSION }}-arm64`
- Pull: `docker pull ghcr.io/${{ env.DOCKER_IMAGE }}@${{ steps.task_release_gh_push.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' || '' }}`
- 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_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 Github Amd64
# #
job-docker-release-github-amd64:
name: >-
📦 Release Github 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-github-arm64 ]
steps: steps:
# # # #
@@ -502,12 +267,16 @@ jobs:
- name: '🕛 Get Timestamp' - name: '🕛 Get Timestamp'
id: task_release_set_timestamp id: task_release_set_timestamp
run: | run: |
echo "DOCKER_IMAGE=`echo ${{github.repository}} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} echo "IMAGE_VERSION_1DIGIT=`echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-1`" >> ${GITHUB_ENV} # 1
echo "DOCKER_SHA=${GITHUB_SHA}" >> $GITHUB_ENV echo "IMAGE_VERSION_2DIGIT=`echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-2`" >> ${GITHUB_ENV} # 1.0
echo "NOW=$(date +'%m-%d-%Y %H:%M:%S')" >> $GITHUB_ENV echo "REGISTRY_REPO_ORG_AUTHOR_LC=`echo ${{ env.IMAGE_GHCR_AUTHOR }}/${{ env.IMAGE_NAME }} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} # thebinaryninja/tvapp2
echo "NOW_SHORT=$(date +'%m-%d-%Y')" >> $GITHUB_ENV echo "REGISTRY_REPO_AUTHOR_LC=`echo ${{ env.IMAGE_GHCR_AUTHOR }} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} # thebinaryninja
echo "NOW_LONG=$(date +'%m-%d-%Y %H:%M')" >> $GITHUB_ENV echo "DOCKER_SHA=${GITHUB_SHA}" >> $GITHUB_ENV # 71fad013cfce9116ec62779e4a7e627fe4c33627
echo "NOW_DOCKER_LABEL=$(date +'%Y%m%d')" >> $GITHUB_ENV 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 # Release Github Install Dependencies
@@ -525,7 +294,9 @@ jobs:
- name: '🔐 Apply dos2unix' - name: '🔐 Apply dos2unix'
id: task_release_gh_dos2unix id: task_release_gh_dos2unix
run: | 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 -- 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 # Release Github Fix Permissions
@@ -578,81 +349,271 @@ jobs:
password: ${{ secrets.ORG_BINARYNINJA_TOKEN_CL }} password: ${{ secrets.ORG_BINARYNINJA_TOKEN_CL }}
# # # #
# Release Github Meta Amd64 # Release Github Read Readme
#
# @usage org.opencontainers.image.description=${{ steps.task_release_gh_readme_cache.outputs.content }}
# # # #
- name: '🔨 Github: Meta - Amd64' - 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 id: task_release_gh_meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
with: with:
images: | images: |
ghcr.io/${{ env.IMAGE_GHCR_AUTHOR }}/${{ env.IMAGE_NAME }} ghcr.io/${{ env.REGISTRY_REPO_AUTHOR_LC }}/${{ env.IMAGE_NAME }}
tags: | tags: |
# latest yes # tag latest = yes ( no dev )
type=raw,value=latest,enable=${{ !inputs.DEV_RELEASE }} type=raw,value=latest,enable=${{ !inputs.DEV_RELEASE }}
# tag add amd64 # tag add pr tag ( PR or push only )
# type=raw,enable=true,priority=1000,value=amd64 type=ref,enable=${{ github.event_name == 'pull_request' || github.event_name == 'push' }},priority=600,prefix=,suffix=,event=tag
# dispatch add x1.x.x-amd64 # tag add 1.0.0 ( dispatch only + no dev )
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=300,prefix=,suffix=-amd64,value=${{ env.IMAGE_VERSION }} type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=450,prefix=,suffix=,value=${{ env.IMAGE_VERSION }}
# dispatch add amd64-development # tag add 1.0 ( dispatch only + no dev )
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == true }},priority=300,prefix=,suffix=-amd64,value=development type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=425,prefix=,suffix=,value=${{ env.IMAGE_VERSION_2DIGIT }}
# tag add tag-amd64 # tag add 1 ( dispatch only + no dev )
type=ref,enable=${{ github.event_name == 'pull_request' || github.event_name == 'push' }},priority=600,prefix=,suffix=-amd64,event=tag type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=400,prefix=,suffix=,value=${{ env.IMAGE_VERSION_1DIGIT }}
# add development tag to default architecture (amd64) # 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 type=raw,enable=${{ inputs.DEV_RELEASE }},priority=400,prefix=,suffix=,value=development
flavor: | flavor: |
latest=${{ !inputs.DEV_RELEASE }} latest=false
labels: | labels: |
org.opencontainers.image.VERSION=${{ env.IMAGE_VERSION }} org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
org.opencontainers.image.BUILDDATE=${{ env.NOW_DOCKER_LABEL }} org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
org.opencontainers.image.licenses=MIT org.opencontainers.image.licenses=MIT
org.opencontainers.image.revision=${{ github.sha }} org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.vendor=${{ env.IMAGE_GHCR_AUTHOR }} org.opencontainers.image.vendor=${{ env.REGISTRY_REPO_AUTHOR_LC }}
org.opencontainers.image.ref.name=${{ env.ref_name }} org.opencontainers.image.ref.name=${{ github.ref_name }}
org.opencontainers.image.development=${{ inputs.DEV_RELEASE == true && 'true' || 'false' }} 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 # Release Github Build and Push Amd64
# # # #
- name: '📦 Build & Push (linux/amd64)' - name: '📦 Build & Push (linux/amd64)'
id: task_release_gh_push id: task_release_gh_push_amd64
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' ) if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
with: with:
allow: |
network.host
network: host
context: . context: .
file: Dockerfile file: Dockerfile
platforms: linux/amd64 platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.task_release_gh_meta.outputs.tags }}
labels: ${{ steps.task_release_gh_meta.outputs.labels }} 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 provenance: false
sbom: false
build-args: |-
ARCH=amd64
VERSION=${{ env.IMAGE_VERSION }}
BUILDDATE=${{ env.NOW_DOCKER_LABEL }}
# # # #
# Release Github Checkpoint Amd64 # 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' - name: '⚠️ Checkpoint'
id: task_release_gh_checkpoint id: task_release_gh_checkpoint
run: | run: |
echo "registry ............. Github" echo ""
echo "github.actor.......... ${{ github.actor }}" echo "[ GITHUB ] ---------------------------------------------------------------------------------------------"
echo "github.ref ........... ${{ github.ref }}" echo "github.actor.............................. ${{ github.actor }}"
echo "github.ref_name ...... ${{ github.ref_name }}" echo "github.ref ............................... ${{ github.ref }}"
echo "github.event_name .... ${{ github.event_name }}" echo "github.ref_name .......................... ${{ github.ref_name }}"
echo "inputs.DRY_RUN ....... ${{ inputs.DRY_RUN }}" echo "github.event_name ........................ ${{ github.event_name }}"
echo "env.AUTHOR ........... ${{ env.IMAGE_GHCR_AUTHOR }}" echo "github.repository_owner .................. ${{ github.repository_owner }}"
echo "tags ................. ${{ steps.task_release_gh_meta.outputs.tags }}" echo "github.repository ........................ ${{ github.repository }}"
echo "labels ............... ${{ steps.task_release_gh_meta.outputs.labels }}" echo ""
echo "docker image ......... ${{ env.DOCKER_IMAGE }}" echo "[ INPUTS ] ---------------------------------------------------------------------------------------------"
echo "docker sha ........... ${{ env.DOCKER_SHA }}" echo "inputs.IMAGE_NAME ........................ ${{ inputs.IMAGE_NAME }}"
echo "docker image id ...... ${{ steps.task_release_gh_push.outputs.imageid }}" echo "inputs.IMAGE_VERSION ..................... ${{ inputs.IMAGE_VERSION }}"
echo "docker digest ........ ${{ steps.task_release_gh_push.outputs.digest }}" 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 # Release Github Get Weekly Commits
@@ -670,7 +631,7 @@ jobs:
# # # #
- name: '🔔 Send Discord Webhook Message' - name: '🔔 Send Discord Webhook Message'
uses: tsickert/discord-webhook@v6.0.0 uses: tsickert/discord-webhook@v7.0.0
if: success() if: success()
with: with:
username: 'Io' username: 'Io'
@@ -680,19 +641,20 @@ jobs:
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg' embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg'
embed-description: | embed-description: |
## 📦 Docker Deploy (Github) ${{ job.status == 'success' && '✅' || '❌' }} `${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}` ### 📦 Deploy (Github) ${{ job.status == 'success' && '✅' || '❌' }} `${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}`
${{ inputs.DEV_RELEASE == true && '### ⚠️⚠️ Development / Pre-release ⚠️⚠️' || '' }} ${{ 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: 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 }} - https://github.com/${{ github.repository }}/pkgs/container/${{ env.IMAGE_NAME }}
- Version: `${{ env.IMAGE_VERSION }}`
- Release Type: `${{ inputs.DEV_RELEASE == true && '⚠️⚠️ Development / Pre-release ⚠️⚠️' || 'Stable' }}` - Release Type: `${{ inputs.DEV_RELEASE == true && '⚠️⚠️ Development / Pre-release ⚠️⚠️' || 'Stable' }}`
- Pull: `docker pull ghcr.io/${{ env.DOCKER_IMAGE }}:${{ inputs.DEV_RELEASE == true && 'development' || env.IMAGE_VERSION }}-amd64` - Pull: `docker pull ghcr.io/${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}:${{ inputs.DEV_RELEASE == true && 'development' || env.IMAGE_VERSION }}`
- Pull: `docker pull ghcr.io/${{ env.DOCKER_IMAGE }}@${{ steps.task_release_gh_push.outputs.digest }}` - 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 }}` - Dry Run: `${{ inputs.DRY_RUN }}`
- Source: `Github` https://github.com/${{ github.repository }} - Source: `Github` https://github.com/${{ github.repository }}
- Docker Image: `${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}` - Docker Image: `${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}`
- Version: `${{ env.IMAGE_VERSION }}`
- Branch: `${{ github.ref_name }}` - Branch: `${{ github.ref_name }}`
- Workflow: `${{ github.workflow }} (#${{github.run_number}})` - Workflow: `${{ github.workflow }} (#${{github.run_number}})`
- Runner: `${{ runner.name }}` - Runner: `${{ runner.name }}`
@@ -718,3 +680,55 @@ jobs:
embed-author-name: "${{ github.repository_owner }}" embed-author-name: "${{ github.repository_owner }}"
embed-author-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" embed-author-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
embed-author-icon-url: "https://avatars.githubusercontent.com/u/200161462" 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

View File

@@ -1,16 +1,38 @@
# # # #
# @type github workflow # @type github workflow
# @desc builds mkdocs from the main branch /docs/ folder and puts the compiled version
# in the `gh-pages` branch. Is hosted using Github Pages.
#
# @update pip install --upgrade mkdocs
# pip install --upgrade --force-reinstall mkdocs-material
#
# @author Aetherinox # @author Aetherinox
# @url https://github.com/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.
# #
# @secrets secrets.SELF_TOKEN_CL Github Access Token (Classic) # @update use the following commands to update mkdocs and the mkdocs-material theme:
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKfLOWS Discord Webbhook URL; right-click on channel, click "Integrations" # 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" name: "📒 Docs Build"
@@ -36,9 +58,11 @@ on:
# # # #
env: env:
ASSIGN_USER: Aetherinox ASSIGN_USER: Aetherinox
BOT_NAME_1: EuropaServ BOT_NAME_1: EuropaServ
BOT_NAME_DEPENDABOT: dependabot[bot] BOT_NAME_2: BinaryServ
BOT_NAME_DEPENDABOT: dependabot[bot]
BOT_NAME_RENOVATE: renovate[bot]
# # # #
# jobs # jobs
@@ -144,7 +168,7 @@ jobs:
- name: >- - name: >-
🔔 Send Discord Webhook Message (Success) 🔔 Send Discord Webhook Message (Success)
id: task_docs_notify_discord_success id: task_docs_notify_discord_success
uses: tsickert/discord-webhook@v6.0.0 uses: tsickert/discord-webhook@v7.0.0
if: success() if: success()
with: with:
username: 'Io' username: 'Io'
@@ -178,7 +202,7 @@ jobs:
- name: >- - name: >-
🔔 Send Discord Webhook Message (Failure) 🔔 Send Discord Webhook Message (Failure)
id: task_docs_notify_discord_failure id: task_docs_notify_discord_failure
uses: tsickert/discord-webhook@v6.0.0 uses: tsickert/discord-webhook@v7.0.0
if: failure() if: failure()
with: with:
username: 'Io' username: 'Io'

View File

@@ -1,15 +1,40 @@
# # # #
# @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
# #
# requires the following labels to be created in your repo: # @notes 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"
@@ -30,28 +55,31 @@ 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"
LABEL_DOCS: "Type ◦ Docs" LABEL_DOCS: "Type ◦ Docs"
LABEL_FEATURE: "Type ◦ Feature" LABEL_FEATURE: "Type ◦ Feature"
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 ◦ Git Action" LABEL_INTERNAL: "Type ◦ Internal"
LABEL_URGENT: "⚠ Urgent" LABEL_URGENT: "⚠ Urgent"
BOT_NAME_1: EuropaServ ASSIGN_USER: Aetherinox
BOT_NAME_DEPENDABOT: dependabot[bot] BOT_NAME_1: EuropaServ
BOT_NAME_2: BinaryServ
BOT_NAME_DEPENDABOT: dependabot[bot]
BOT_NAME_RENOVATE: renovate[bot]
LABELS_JSON: | LABELS_JSON: |
[ [
@@ -131,8 +159,7 @@ jobs:
job-labels-create: job-labels-create:
name: >- name: >-
🎫 Labels Verify Existing 🎫 Labels Verify Existing
# runs-on: ubuntu-latest runs-on: ubuntu-latest
runs-on: apollo-x64
timeout-minutes: 4 timeout-minutes: 4
steps: steps:
@@ -204,8 +231,7 @@ jobs:
🏷️ Labels Assign 🏷️ Labels Assign
needs: needs:
- job-labels-create - job-labels-create
# runs-on: ubuntu-latest runs-on: ubuntu-latest
runs-on: apollo-x64
timeout-minutes: 4 timeout-minutes: 4
permissions: permissions:
contents: 'read' contents: 'read'
@@ -291,7 +317,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))|(?: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))|(?: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 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 ) );
@@ -306,7 +332,7 @@ jobs:
const bug_bFoundPRTitle = Boolean( bug_findPRTitle.test( iss_title ) ); const bug_bFoundPRTitle = Boolean( bug_findPRTitle.test( iss_title ) );
console.log( "Title Lowercase ............... " + iss_title_lc ) console.log( "Title Lowercase ............... " + iss_title_lc )
console.log( "Startswith " + bug_tag.toLowerCase( ) + "................ " + iss_title_lc.startsWith( bug_tag.toLowerCase( ), 3 ) ) console.log( "Startswith " + bug_tag.toLowerCase( ) + "................ " + iss_title_lc.startsWith( bug_tag.toLowerCase( ) ) )
console.log( "Title Includes Keyword ........ " + bTriggerWordInTitle ) console.log( "Title Includes Keyword ........ " + bTriggerWordInTitle )
console.log( "Title Includes Regex .......... " + bFoundMatchTitle ) console.log( "Title Includes Regex .......... " + bFoundMatchTitle )
console.log( "Body Includes Regex ........... " + bFoundMatchBody ) console.log( "Body Includes Regex ........... " + bFoundMatchBody )
@@ -317,45 +343,45 @@ jobs:
- Check if title contains word in words - Check if title contains word in words
*/ */
if ( iss_title_lc.startsWith( bug_tag.toLowerCase( ), 3 ) || bTriggerWordInTitle || bFoundMatchTitle || bFoundMatchBody ) if ( iss_title_lc.startsWith( bug_tag.toLowerCase( ) ) || bTriggerWordInTitle || bFoundMatchTitle || bFoundMatchBody )
{ {
console.log( "⚠️ " + bug_tag + " ---------------------------------------" ) console.log( "⚠️ " + bug_tag + " ---------------------------------------" )
console.log( "Already starts with " + bug_tag + " ......... " + iss_title_lc.startsWith( bug_tag.toLowerCase( ), 3 ) ) console.log( "Already starts with " + bug_tag + " ......... " + iss_title_lc.startsWith( bug_tag.toLowerCase( ) ) )
console.log( "Already starts with " + feat_tag + " ..... " + iss_title_lc.startsWith( feat_tag.toLowerCase( ), 3 ) ) console.log( "Already starts with " + feat_tag + " ..... " + iss_title_lc.startsWith( feat_tag.toLowerCase( ) ) )
console.log( "Already starts with " + urgn_tag + " ...... " + iss_title_lc.startsWith( urgn_tag.toLowerCase( ), 3 ) ) console.log( "Already starts with " + urgn_tag + " ...... " + iss_title_lc.startsWith( urgn_tag.toLowerCase( ) ) )
console.log( "Already starts with " + road_tag + " ..... " + iss_title_lc.startsWith( road_tag.toLowerCase( ), 3 ) ) console.log( "Already starts with " + road_tag + " ..... " + iss_title_lc.startsWith( road_tag.toLowerCase( ) ) )
add_labels.push( `${ bug_lbl }` ); add_labels.push( `${ bug_lbl }` );
console.log( `Adding Tag ....................... ${ bug_lbl }` ) console.log( `Adding Tag ....................... ${ bug_lbl }` )
console.log( "\n" ) console.log( "\n" )
if ( iss_author === `${{ env.BOT_NAME_DEPENDABOT }}` ) if ( iss_author === `${{ env.BOT_NAME_DEPENDABOT }}` )
core.info( `Skipping: Detected ${ iss_author }` ) core.info( `Skipping: Detected ${ iss_author }` )
// Rename title to contain Bug: // Rename title to contain Bug:
// Make sure issue / pr title doesnt already contain a beginning title tag // Make sure issue / pr title doesnt already contain a beginning title tag
if ( iss_author !== `${{ env.BOT_NAME_DEPENDABOT }}` && !bug_bFoundPRTitle && !iss_title_lc.startsWith( bug_tag.toLowerCase( ), 3 ) && !iss_title_lc.startsWith( feat_tag.toLowerCase( ), 3 ) && !iss_title_lc.startsWith( urgn_tag.toLowerCase( ), 3 ) && !iss_title_lc.startsWith( road_tag.toLowerCase( ), 3 ) ) if ( iss_author !== `${{ env.BOT_NAME_DEPENDABOT }}` && !bug_bFoundPRTitle && !iss_title_lc.startsWith( bug_tag.toLowerCase( ) ) && !iss_title_lc.startsWith( feat_tag.toLowerCase( ) ) && !iss_title_lc.startsWith( urgn_tag.toLowerCase( ) ) && !iss_title_lc.startsWith( road_tag.toLowerCase( ) ) )
{ {
console.log( "Renaming Title" ) console.log( "Renaming Title" )
console.log( `Old Title: .................. ${ iss_title }` ) console.log( `Old Title: .................. ${ iss_title }` )
const title = context.payload.issue.title const title = context.payload.issue.title
let title_new = title.replace( /^\s?bug\s*(.*?)\b/gi, '' ); let title_new = title.replace( /^\s?bug\s*(.*?)\b/gi, '' );
title_new = title.replace( /^\s?fail\s*(.*?)\b/gi, '' ); title_new = title.replace( /^\s?fail\s*(.*?)\b/gi, '' );
title_new = title.replace( /^\s?issue\s*(.*?)\b/gi, '' ); title_new = title.replace( /^\s?issue\s*(.*?)\b/gi, '' );
iss_title = `${ bug_tag } ${ title_new }`; iss_title = `${ bug_tag } ${ title_new }`;
} }
console.log( `New Title: ...................... ${ iss_title }` ) console.log( `New Title: ...................... ${ iss_title }` )
await github.rest.issues.update( await github.rest.issues.update(
{ {
owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number,
title: `${ iss_title }`, labels: add_labels title: `${ iss_title }`, labels: add_labels
} ); } );
} }
core.setOutput( 'issue_title', iss_title ) core.setOutput( 'issue_title', iss_title )
@@ -435,7 +461,7 @@ jobs:
const feat_bFoundPRTitle = Boolean( feat_findPRTitle.test( iss_title ) ); const feat_bFoundPRTitle = Boolean( feat_findPRTitle.test( iss_title ) );
console.log( "Title Lowercase ............... " + iss_title_lc ) console.log( "Title Lowercase ............... " + iss_title_lc )
console.log( "Startswith " + feat_tag.toLowerCase( ) + "............ " + iss_title_lc.startsWith( feat_tag.toLowerCase( ), 3 ) ) console.log( "Startswith " + feat_tag.toLowerCase( ) + "............ " + iss_title_lc.startsWith( feat_tag.toLowerCase( ) ) )
console.log( "Title Includes Keyword ........ " + bTriggerWordInTitle ) console.log( "Title Includes Keyword ........ " + bTriggerWordInTitle )
console.log( "Title Includes Regex .......... " + bFoundMatchTitle ) console.log( "Title Includes Regex .......... " + bFoundMatchTitle )
console.log( "Body Includes Regex ........... " + bFoundMatchBody ) console.log( "Body Includes Regex ........... " + bFoundMatchBody )
@@ -447,14 +473,14 @@ jobs:
*/ */
// change TAG per category // change TAG per category
if ( iss_title_lc.startsWith( feat_tag.toLowerCase( ), 3 ) || bTriggerWordInTitle || bFoundMatchTitle || bFoundMatchBody ) if ( iss_title_lc.startsWith( feat_tag.toLowerCase( ) ) || bTriggerWordInTitle || bFoundMatchTitle || bFoundMatchBody )
{ {
console.log( "⚠️ " + feat_tag + " ---------------------------------------" ) console.log( "⚠️ " + feat_tag + " ---------------------------------------" )
console.log( "Already starts with " + bug_tag + " ......... " + iss_title_lc.startsWith( bug_tag.toLowerCase( ), 3 ) ) console.log( "Already starts with " + bug_tag + " ......... " + iss_title_lc.startsWith( bug_tag.toLowerCase( ) ) )
console.log( "Already starts with " + feat_tag + " ..... " + iss_title_lc.startsWith( feat_tag.toLowerCase( ), 3 ) ) console.log( "Already starts with " + feat_tag + " ..... " + iss_title_lc.startsWith( feat_tag.toLowerCase( ) ) )
console.log( "Already starts with " + urgn_tag + " ...... " + iss_title_lc.startsWith( urgn_tag.toLowerCase( ), 3 ) ) console.log( "Already starts with " + urgn_tag + " ...... " + iss_title_lc.startsWith( urgn_tag.toLowerCase( ) ) )
console.log( "Already starts with " + road_tag + " ..... " + iss_title_lc.startsWith( road_tag.toLowerCase( ), 3 ) ) console.log( "Already starts with " + road_tag + " ..... " + iss_title_lc.startsWith( road_tag.toLowerCase( ) ) )
// change LBL per category // change LBL per category
add_labels.push( `${ feat_lbl }` ); add_labels.push( `${ feat_lbl }` );
@@ -468,7 +494,7 @@ jobs:
// Rename title to contain Feature: // Rename title to contain Feature:
// Make sure issue / pr title doesnt already contain a beginning title tag // Make sure issue / pr title doesnt already contain a beginning title tag
if ( iss_author !== `${{ env.BOT_NAME_DEPENDABOT }}` && !feat_bFoundPRTitle && !iss_title_lc.startsWith( bug_tag.toLowerCase( ), 3 ) && !iss_title_lc.startsWith( feat_tag.toLowerCase( ), 3 ) && !iss_title_lc.startsWith( urgn_tag.toLowerCase( ), 3 ) && !iss_title_lc.startsWith( road_tag.toLowerCase( ), 3 ) ) if ( iss_author !== `${{ env.BOT_NAME_DEPENDABOT }}` && !feat_bFoundPRTitle && !iss_title_lc.startsWith( bug_tag.toLowerCase( ) ) && !iss_title_lc.startsWith( feat_tag.toLowerCase( ) ) && !iss_title_lc.startsWith( urgn_tag.toLowerCase( ) ) && !iss_title_lc.startsWith( road_tag.toLowerCase( ) ) )
{ {
console.log( "Renaming Title" ) console.log( "Renaming Title" )
console.log( `Old Title: .................. ${ iss_title }` ) console.log( `Old Title: .................. ${ iss_title }` )
@@ -566,7 +592,7 @@ jobs:
const urgn_bFoundPRTitle = Boolean( urgn_findPRTitle.test( iss_title ) ); const urgn_bFoundPRTitle = Boolean( urgn_findPRTitle.test( iss_title ) );
console.log( "Title Lowercase ............... " + iss_title_lc ) console.log( "Title Lowercase ............... " + iss_title_lc )
console.log( "Startswith " + urgn_tag.toLowerCase( ) + "............. " + iss_title_lc.startsWith( urgn_tag.toLowerCase( ), 3 ) ) console.log( "Startswith " + urgn_tag.toLowerCase( ) + "............. " + iss_title_lc.startsWith( urgn_tag.toLowerCase( ) ) )
console.log( "Title Includes Keyword ........ " + bTriggerWordInTitle ) console.log( "Title Includes Keyword ........ " + bTriggerWordInTitle )
console.log( "Title Includes Regex .......... " + bFoundMatchTitle ) console.log( "Title Includes Regex .......... " + bFoundMatchTitle )
console.log( "Body Includes Regex ........... " + bFoundMatchBody ) console.log( "Body Includes Regex ........... " + bFoundMatchBody )
@@ -578,14 +604,14 @@ jobs:
*/ */
// change TAG per category // change TAG per category
if ( iss_title_lc.startsWith( urgn_tag.toLowerCase( ), 3 ) || bTriggerWordInTitle || bFoundMatchTitle || bFoundMatchBody ) if ( iss_title_lc.startsWith( urgn_tag.toLowerCase( ) ) || bTriggerWordInTitle || bFoundMatchTitle || bFoundMatchBody )
{ {
console.log( "⚠️ " + urgn_tag + " ---------------------------------------" ) console.log( "⚠️ " + urgn_tag + " ---------------------------------------" )
console.log( "Already starts with " + bug_tag + " ......... " + iss_title_lc.startsWith( bug_tag.toLowerCase( ), 3 ) ) console.log( "Already starts with " + bug_tag + " ......... " + iss_title_lc.startsWith( bug_tag.toLowerCase( ) ) )
console.log( "Already starts with " + feat_tag + " ..... " + iss_title_lc.startsWith( feat_tag.toLowerCase( ), 3 ) ) console.log( "Already starts with " + feat_tag + " ..... " + iss_title_lc.startsWith( feat_tag.toLowerCase( ) ) )
console.log( "Already starts with " + urgn_tag + " ...... " + iss_title_lc.startsWith( urgn_tag.toLowerCase( ), 3 ) ) console.log( "Already starts with " + urgn_tag + " ...... " + iss_title_lc.startsWith( urgn_tag.toLowerCase( ) ) )
console.log( "Already starts with " + road_tag + " ..... " + iss_title_lc.startsWith( road_tag.toLowerCase( ), 3 ) ) console.log( "Already starts with " + road_tag + " ..... " + iss_title_lc.startsWith( road_tag.toLowerCase( ) ) )
// change LBL per category // change LBL per category
add_labels.push( `${ urgn_lbl }` ); add_labels.push( `${ urgn_lbl }` );
@@ -599,7 +625,7 @@ jobs:
// Rename title to contain Urgent: // Rename title to contain Urgent:
// Make sure issue / pr title doesnt already contain a beginning title tag // Make sure issue / pr title doesnt already contain a beginning title tag
if ( iss_author !== `${{ env.BOT_NAME_DEPENDABOT }}` && !urgn_bFoundPRTitle && !iss_title_lc.startsWith( bug_tag.toLowerCase( ), 3 ) && !iss_title_lc.startsWith( feat_tag.toLowerCase( ), 3 ) && !iss_title_lc.startsWith( urgn_tag.toLowerCase( ), 3 ) && !iss_title_lc.startsWith( road_tag.toLowerCase( ), 3 ) ) if ( iss_author !== `${{ env.BOT_NAME_DEPENDABOT }}` && !urgn_bFoundPRTitle && !iss_title_lc.startsWith( bug_tag.toLowerCase( ) ) && !iss_title_lc.startsWith( feat_tag.toLowerCase( ) ) && !iss_title_lc.startsWith( urgn_tag.toLowerCase( ) ) && !iss_title_lc.startsWith( road_tag.toLowerCase( ) ) )
{ {
console.log( "Renaming Title" ) console.log( "Renaming Title" )
console.log( `Old Title: .................. ${ iss_title }` ) console.log( `Old Title: .................. ${ iss_title }` )
@@ -699,7 +725,7 @@ jobs:
const road_bFoundPRTitle = Boolean( road_findPRTitle.test( iss_title ) ); const road_bFoundPRTitle = Boolean( road_findPRTitle.test( iss_title ) );
console.log( "Title Lowercase ............... " + iss_title_lc ) console.log( "Title Lowercase ............... " + iss_title_lc )
console.log( "Startswith " + road_tag.toLowerCase( ) + "............ " + iss_title_lc.startsWith( road_tag.toLowerCase( ), 3 ) ) console.log( "Startswith " + road_tag.toLowerCase( ) + "............ " + iss_title_lc.startsWith( road_tag.toLowerCase( ) ) )
console.log( "Title Includes Keyword ........ " + bTriggerWordInTitle ) console.log( "Title Includes Keyword ........ " + bTriggerWordInTitle )
console.log( "Title Includes Regex .......... " + bFoundMatchTitle ) console.log( "Title Includes Regex .......... " + bFoundMatchTitle )
console.log( "Body Includes Regex ........... " + bFoundMatchBody ) console.log( "Body Includes Regex ........... " + bFoundMatchBody )
@@ -711,14 +737,14 @@ jobs:
*/ */
// change TAG per category // change TAG per category
if ( iss_title_lc.startsWith( road_tag.toLowerCase( ), 3 ) || bTriggerWordInTitle || bFoundMatchTitle || bFoundMatchBody ) if ( iss_title_lc.startsWith( road_tag.toLowerCase( ) ) || bTriggerWordInTitle || bFoundMatchTitle || bFoundMatchBody )
{ {
console.log( "⚠️ " + road_tag + " ---------------------------------------" ) console.log( "⚠️ " + road_tag + " ---------------------------------------" )
console.log( "Already starts with " + bug_tag + " ...... " + iss_title_lc.startsWith( bug_tag.toLowerCase( ), 3 ) ) console.log( "Already starts with " + bug_tag + " ...... " + iss_title_lc.startsWith( bug_tag.toLowerCase( ) ) )
console.log( "Already starts with " + feat_tag + " .. " + iss_title_lc.startsWith( feat_tag.toLowerCase( ), 3 ) ) console.log( "Already starts with " + feat_tag + " .. " + iss_title_lc.startsWith( feat_tag.toLowerCase( ) ) )
console.log( "Already starts with " + urgn_tag + " ... " + iss_title_lc.startsWith( urgn_tag.toLowerCase( ), 3 ) ) console.log( "Already starts with " + urgn_tag + " ... " + iss_title_lc.startsWith( urgn_tag.toLowerCase( ) ) )
console.log( "Already starts with " + road_tag + " .. " + iss_title_lc.startsWith( road_tag.toLowerCase( ), 3 ) ) console.log( "Already starts with " + road_tag + " .. " + iss_title_lc.startsWith( road_tag.toLowerCase( ) ) )
// change LBL per category // change LBL per category
add_labels.push( `${ road_lbl }` ); add_labels.push( `${ road_lbl }` );
@@ -732,7 +758,7 @@ jobs:
// Rename title to contain Roadmap: // Rename title to contain Roadmap:
// Make sure issue / pr title doesnt already contain a beginning title tag // Make sure issue / pr title doesnt already contain a beginning title tag
if ( iss_author !== `${{ env.BOT_NAME_DEPENDABOT }}` && !road_bFoundPRTitle && !iss_title_lc.startsWith( bug_tag.toLowerCase( ), 3 ) && !iss_title_lc.startsWith( feat_tag.toLowerCase( ), 3 ) && !iss_title_lc.startsWith( urgn_tag.toLowerCase( ), 3 ) && !iss_title_lc.startsWith( road_tag.toLowerCase( ), 3 ) ) if ( iss_author !== `${{ env.BOT_NAME_DEPENDABOT }}` && !road_bFoundPRTitle && !iss_title_lc.startsWith( bug_tag.toLowerCase( ) ) && !iss_title_lc.startsWith( feat_tag.toLowerCase( ) ) && !iss_title_lc.startsWith( urgn_tag.toLowerCase( ) ) && !iss_title_lc.startsWith( road_tag.toLowerCase( ) ) )
{ {
console.log( "Renaming Title" ) console.log( "Renaming Title" )
console.log( `Old Title: .................. ${ iss_title }` ) console.log( `Old Title: .................. ${ iss_title }` )
@@ -767,8 +793,7 @@ jobs:
🏷️ Labels Phrase Search 🏷️ Labels Phrase Search
needs: needs:
- job-labels-create - job-labels-create
# runs-on: ubuntu-latest runs-on: ubuntu-latest
runs-on: apollo-x64
timeout-minutes: 4 timeout-minutes: 4
permissions: permissions:
contents: 'read' contents: 'read'
@@ -854,8 +879,7 @@ jobs:
job-assign-assignees: job-assign-assignees:
name: >- name: >-
✍️ Issue Assignees ✍️ Issue Assignees
# runs-on: ubuntu-latest runs-on: ubuntu-latest
runs-on: apollo-x64
timeout-minutes: 4 timeout-minutes: 4
needs: [ job-assign-labels ] needs: [ job-assign-labels ]
# disable # disable

View File

@@ -1,12 +1,39 @@
# # # #
# @type github workflow # @type github workflow
# @desc pull request autoscan # @author Aetherinox
# @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 # 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"
@@ -38,8 +65,11 @@ 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: 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: |
[ [
@@ -110,13 +140,14 @@ env:
jobs: jobs:
# # # #
# Job [ Autoscan ] # Job Autoscan
# # # #
pr-autoscan: job-pr-autoscan:
name: 🎫 Issues Autoscan
# runs-on: ubuntu-latest # runs-on: ubuntu-latest
runs-on: apollo-x64 runs-on: apollo-x64
timeout-minutes: 10 timeout-minutes: 7
permissions: permissions:
contents: read contents: read
actions: read actions: read
@@ -195,15 +226,20 @@ jobs:
} }
else else
{ {
// Otherwise return issue number from commit const data = (
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 ].number; ).data[0];
if (data) {
return data.number;
} else {
return '32';
}
} }
result-encoding: string result-encoding: string
@@ -228,6 +264,7 @@ 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"
@@ -252,7 +289,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@v45 uses: tj-actions/changed-files@v46
with: with:
separator: "," separator: ","
@@ -298,16 +335,131 @@ jobs:
with: with:
github-token: ${{ secrets.ADMINSERV_TOKEN_CL }} github-token: ${{ secrets.ADMINSERV_TOKEN_CL }}
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 = `${ context.payload.pull_request.head.ref }` const branch_ref = `${ ct.payload.pull_request.head.ref }`
let message = [ "\n<br />\n" ] let message = [ "\n<br />\n" ]
message.push ( "## Automatic Self-Check - #" + context.issue.number + "\n" ); message.push ( "## Automatic Self-Check - #" + ct.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:" );
@@ -315,7 +467,7 @@ jobs:
let bHasError = false; let bHasError = false;
let bHasWarning = false; let bHasWarning = false;
let date = new Date( `${ context.payload.pull_request.created_at }` ); let date = new Date( `${ ct.payload.pull_request.created_at }` );
date.toISOString( ) date.toISOString( )
const actor = '${{ github.actor }}'; const actor = '${{ github.actor }}';
@@ -341,20 +493,20 @@ jobs:
let date_created = dateTimeformat( date ) + " UTC"; let date_created = dateTimeformat( date ) + " UTC";
/* /* #
context.payload.pull_request.base.repo.owner.login # ct.payload.pull_request.base.repo.owner.login
*/ # */
let md_table = let md_table =
` `
| Category | Value | | Category | Value |
| --- | --- | | --- | --- |
| Title | [ ` + context.payload.pull_request.title + ` ](https://github.com/` + context.repo.owner + `/` + context.repo.repo + `/pull/` + context.payload.pull_request.number + `) | | Title | [ ` + ct.payload.pull_request.title + ` ](https://github.com/` + ct.repo.owner + `/` + ct.repo.repo + `/pull/` + ct.payload.pull_request.number + `) |
| Created | [ ` + date_created + ` ](https://worldtimebuddy.com) | | Created | [ ` + date_created + ` ](https://worldtimebuddy.com) |
| ID | ` + context.payload.pull_request.html_url + ` | | ID | ` + ct.payload.pull_request.html_url + ` |
| Author | [ ` + context.payload.pull_request.user.login + ` ](https://github.com/` + context.repo.owner + `/) | | Author | [ ` + ct.payload.pull_request.user.login + ` ](https://github.com/` + ct.repo.owner + `/) |
| Repo | [ ` + context.repo.repo + ` ](https://github.com/` + context.repo.owner + `/` + context.repo.repo + `) | | Repo | [ ` + ct.repo.repo + ` ](https://github.com/` + ct.repo.owner + `/` + ct.repo.repo + `) |
| 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 + `) | | 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 + `) |
| 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 }} |
@@ -389,12 +541,14 @@ 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 =
@@ -715,7 +869,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: " + context.issue.number + ": " + context.payload.pull_request.title + "." ); core.setFailed( "Pull Request Failed Autocheck: " + ct.issue.number + ": " + ct.payload.pull_request.title + "." );
} }
/* /*
@@ -729,21 +883,21 @@ jobs:
change pr title change pr title
*/ */
const pr_title = `${ context.payload.pull_request.title }`; const pr_title = `${ ct.payload.pull_request.title }`;
const pr_title_append = `PR ${ context.issue.number }:`; const pr_title_append = `PR ${ ct.issue.number }:`;
if ( !pr_title.startsWith( pr_title_append ) ) if ( !pr_title.startsWith( pr_title_append ) && actor != "${{ env.BOT_NAME_RENOVATE }}" )
{ {
await github.rest.pulls.update( await github.rest.pulls.update(
{ {
owner: context.repo.owner, owner: ct.repo.owner,
repo: context.repo.repo, repo: ct.repo.repo,
pull_number: context.issue.number, pull_number: ct.issue.number,
title: `${ pr_title_append } ${ context.payload.pull_request.title }` title: `${ pr_title_append } ${ ct.payload.pull_request.title }`
} ); } );
} }
if ( !context.payload.pull_request.labels.filter( label => label.name === "${{ env.LABEL_CHECK_CHANGES_REQ }}" ).length > 0 ) if ( !ct.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 }}" );
} }
@@ -754,24 +908,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 ) if ( actor == "${{ env.BOT_NAME_DEPENDABOT }}" && bDependency || actor == "${{ env.BOT_NAME_RENOVATE }}" && bDependency )
labels.push( "${{ env.LABEL_TYPE_DEPENDENCY }}" ); labels.push( "${{ env.LABEL_TYPE_DEPENDENCY }}" );
else if ( actor == "${{ env.BOT_NAME_DEPENDABOT }}" && bGitaction ) else if ( actor == "${{ env.BOT_NAME_DEPENDABOT }}" && bGitaction || actor == "${{ env.BOT_NAME_RENOVATE }}" && bGitaction )
labels.push( "${{ env.LABEL_TYPE_GITACTION }}" ); labels.push( "${{ env.LABEL_TYPE_GITACTION }}" );
if ( context.payload.pull_request.labels.filter( label => label.name === "${{ env.LABEL_CHECK_CHANGES_REQ }}" ).length > 0 ) if ( ct.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 (context.payload.pull_request.labels.filter(label => label.name === "${{ env.LABEL_CHECK_REBASE_REQ }}" ).length > 0 ) if (ct.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 ( context.payload.pull_request.labels.filter(label => label.name === "${{ env.LABEL_CHECK_SECURITY_ERR }}" ).length > 0 ) if ( ct.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 (context.payload.pull_request.labels.filter( label => label.name === "${{ env.LABEL_CHECK_STATUS_CHGMADE }}" ).length > 0 ) if (ct.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 ( context.payload.pull_request.labels.filter( label => label.name === "${{ env.LABEL_CHECK_SCAN_SKIPPED }}" ).length > 0 ) if ( ct.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 }}" );
@@ -782,9 +936,9 @@ jobs:
await github.rest.issues.setLabels( await github.rest.issues.setLabels(
{ {
issue_number: context.issue.number, issue_number: ct.issue.number,
owner: context.repo.owner, owner: ct.repo.owner,
repo: context.repo.repo, repo: ct.repo.repo,
labels, labels,
} ); } );
@@ -794,9 +948,9 @@ jobs:
await github.rest.issues.createComment( await github.rest.issues.createComment(
{ {
issue_number: context.issue.number, issue_number: ct.issue.number,
owner: context.repo.owner, owner: ct.repo.owner,
repo: context.repo.repo, repo: ct.repo.repo,
body: message.join('\n'), body: message.join('\n'),
} ); } );
@@ -819,7 +973,7 @@ jobs:
- name: >- - name: >-
🔔 Send Discord Webhook Message (Success) 🔔 Send Discord Webhook Message (Success)
id: task_autocheck_notify_discord_success id: task_autocheck_notify_discord_success
uses: tsickert/discord-webhook@v6.0.0 uses: tsickert/discord-webhook@v7.0.0
if: success() if: success()
with: with:
username: 'Io' username: 'Io'
@@ -870,7 +1024,7 @@ jobs:
- name: >- - name: >-
🔔 Send Discord Webhook Message (Failure) 🔔 Send Discord Webhook Message (Failure)
id: task_autocheck_notify_discord_failure id: task_autocheck_notify_discord_failure
uses: tsickert/discord-webhook@v6.0.0 uses: tsickert/discord-webhook@v7.0.0
if: failure() if: failure()
with: with:
username: 'Io' username: 'Io'

View File

@@ -1,27 +1,51 @@
# # # #
# @type github workflow # @type github workflow
# @desc creates repository labels if they are not yet installed
# issues marked as stale after 30 days, given tag Status 𐄂 Stale
# inactive issues closed after 180 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 closed 7 days after being marked stale, given tag Status 𐄂 Autoclosed
# @author Aetherinox # @author Aetherinox
# @url https://github.com/Aetherinox # @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
# inactive issues closed after 180 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 closed 7 days after being marked stale, given tag Status 𐄂 Autoclosed
# #
# This Github action must be activated manually. This workflow script will do the # @notes This Github action must be activated manually. This workflow script will do the following:
# 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`
# - `Feature` # - `Feature`
# - `Urgent` # - `Urgent`
# - `Roadmap` # - `Roadmap`
# #
# - Workflow script will then scan each pr or issue and mark them as `Stale` # - Workflow script will then scan each pr or issue and mark them as `Stale`
# 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"
@@ -41,28 +65,32 @@ 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"
LABEL_DOCS: "Type ◦ Docs" LABEL_DOCS: "Type ◦ Docs"
LABEL_FEATURE: "Type ◦ Feature" LABEL_FEATURE: "Type ◦ Feature"
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 ◦ Internal"
LABEL_URGENT: "⚠ Urgent" LABEL_URGENT: "⚠ Urgent"
ASSIGN_USER: Aetherinox
BOT_NAME_1: EuropaServ
BOT_NAME_2: BinaryServ
BOT_NAME_DEPENDABOT: dependabot[bot]
BOT_NAME_RENOVATE: renovate[bot]
BOT_NAME_1: EuropaServ
BOT_NAME_DEPENDABOT: dependabot[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" },
@@ -141,8 +169,7 @@ jobs:
job-labels-create: job-labels-create:
name: >- name: >-
🎫 Labels Verify Existing 🎫 Labels Verify Existing
# runs-on: ubuntu-latest runs-on: ubuntu-latest
runs-on: apollo-x64
timeout-minutes: 4 timeout-minutes: 4
steps: steps:
@@ -218,8 +245,7 @@ jobs:
job-issues-nolabel: job-issues-nolabel:
name: >- name: >-
🎫 Labels Assign Missing 🎫 Labels Assign Missing
# runs-on: ubuntu-latest runs-on: ubuntu-latest
runs-on: apollo-x64
timeout-minutes: 4 timeout-minutes: 4
needs: job-labels-create needs: job-labels-create
steps: steps:
@@ -587,8 +613,7 @@ jobs:
job-issues-stale: job-issues-stale:
name: >- name: >-
💤 Check Stale 💤 Check Stale
# runs-on: ubuntu-latest runs-on: ubuntu-latest
runs-on: apollo-x64
timeout-minutes: 4 timeout-minutes: 4
needs: needs:
- job-labels-create - job-labels-create
@@ -631,8 +656,7 @@ jobs:
job-issues-lock: job-issues-lock:
name: >- name: >-
🔒 Check Inactive 🔒 Check Inactive
# runs-on: ubuntu-latest runs-on: ubuntu-latest
runs-on: apollo-x64
timeout-minutes: 4 timeout-minutes: 4
needs: needs:
- job-labels-create - job-labels-create

View File

@@ -4,10 +4,33 @@
# @author Aetherinox # @author Aetherinox
# @url https://github.com/Aetherinox # @url https://github.com/Aetherinox
# #
# This Github action must be activated manually. This workflow script will do the # @notes This Github action must be activated manually. This workflow script will do the following:
# 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"
@@ -25,8 +48,12 @@ on:
# # # #
env: env:
BOT_NAME_1: EuropaServ ASSIGN_USER: Aetherinox
BOT_NAME_DEPENDABOT: dependabot[bot] BOT_NAME_1: EuropaServ
BOT_NAME_2: BinaryServ
BOT_NAME_DEPENDABOT: dependabot[bot]
BOT_NAME_RENOVATE: renovate[bot]
LABELS_JSON: | LABELS_JSON: |
[ [
{ "name": "bug", "color": "8F1784", "description": "Default github label" }, { "name": "bug", "color": "8F1784", "description": "Default github label" },
@@ -230,7 +257,7 @@ jobs:
- name: >- - name: >-
🔔 Send Discord Webhook Message (Success) 🔔 Send Discord Webhook Message (Success)
id: task_label_notify_discord_success id: task_label_notify_discord_success
uses: tsickert/discord-webhook@v6.0.0 uses: tsickert/discord-webhook@v7.0.0
if: success() if: success()
with: with:
username: 'Io' username: 'Io'
@@ -266,7 +293,7 @@ jobs:
- name: >- - name: >-
🔔 Send Discord Webhook Message (Failure) 🔔 Send Discord Webhook Message (Failure)
id: task_label_notify_discord_failure id: task_label_notify_discord_failure
uses: tsickert/discord-webhook@v6.0.0 uses: tsickert/discord-webhook@v7.0.0
if: failure() if: failure()
with: with:
username: 'Io' username: 'Io'

View File

@@ -1,22 +1,46 @@
# # # #
# @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
# #
# This Github action must be activated manually. This workflow script will do the # @notes This Github action must be activated manually. This workflow script will do the following:
# 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`
# - `Feature` # - `Feature`
# - `Urgent` # - `Urgent`
# - `Roadmap` # - `Roadmap`
# #
# - Workflow script will then scan each pr or issue and mark them as `Stale` # - Workflow script will then scan each pr or issue and mark them as `Stale`
# 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"
@@ -34,8 +58,12 @@ on:
# # # #
env: env:
BOT_NAME_1: EuropaServ ASSIGN_USER: Aetherinox
BOT_NAME_DEPENDABOT: dependabot[bot] BOT_NAME_1: EuropaServ
BOT_NAME_2: BinaryServ
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" },
@@ -217,7 +245,7 @@ jobs:
- name: >- - name: >-
🔔 Send Discord Webhook Message (Success) 🔔 Send Discord Webhook Message (Success)
id: task_label_notify_discord_success id: task_label_notify_discord_success
uses: tsickert/discord-webhook@v6.0.0 uses: tsickert/discord-webhook@v7.0.0
if: success() if: success()
with: with:
username: 'Io' username: 'Io'
@@ -253,7 +281,7 @@ jobs:
- name: >- - name: >-
🔔 Send Discord Webhook Message (Failure) 🔔 Send Discord Webhook Message (Failure)
id: task_label_notify_discord_failure id: task_label_notify_discord_failure
uses: tsickert/discord-webhook@v6.0.0 uses: tsickert/discord-webhook@v7.0.0
if: failure() if: failure()
with: with:
username: 'Io' username: 'Io'

View File

@@ -1,12 +1,37 @@
# # # #
# @type github workflow # @type github workflow
# @desc publishes a new release on Github
# @author Aetherinox # @author Aetherinox
# @url https://github.com/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" name: '📦 Release Github'
run-name: "📦 Release Github" run-name: '📦 Release Github'
# # # #
# Triggers # Triggers
@@ -22,10 +47,10 @@ on:
# # # #
PROJECT_NAME: PROJECT_NAME:
description: "📦 Name of App" description: '📦 Name of App'
required: true required: true
default: 'tvapp2' default: 'tvapp2'
type: string type: string
# # # #
# ENABLE: the changelog generated in releases tab will only display single commits. # ENABLE: the changelog generated in releases tab will only display single commits.
@@ -33,10 +58,10 @@ on:
# # # #
CHANGELOG_MODE_COMMIT: CHANGELOG_MODE_COMMIT:
description: "📑 Use Commits Instead of PRs" description: '📑 Use Commits Instead of PRs'
required: true required: true
default: true default: true
type: boolean type: boolean
# # # #
# ENABLE: Will show all types of commits, including uncategorized # ENABLE: Will show all types of commits, including uncategorized
@@ -46,10 +71,10 @@ on:
# # # #
SHOW_UNCATEGORIZED: SHOW_UNCATEGORIZED:
description: "🗂️ Show Uncategorized Commits" description: '🗂️ Show Uncategorized Commits'
required: true required: true
default: false default: false
type: boolean type: boolean
# # # #
# ENABLE: released version will be marked as pre-release # ENABLE: released version will be marked as pre-release
@@ -57,10 +82,10 @@ on:
# # # #
PRERELEASE: PRERELEASE:
description: "🧪 Build RC (Pre-release)" description: '🧪 Build RC (Pre-release)'
required: true required: true
default: false default: false
type: boolean type: boolean
# # # #
# Release Candidate version number # Release Candidate version number
@@ -69,23 +94,26 @@ on:
# # # #
VERSION_RC: VERSION_RC:
description: "🧪 RC (Pre-release) Ver (tvapp2-rc.v1)" description: '🧪 RC (Pre-release) Ver (tvapp2-rc.v1)'
required: false required: false
type: string type: string
default: "1" default: '1'
# # # #
# environment variables # environment variables
# # # #
env: env:
PROJECT_NAME: ${{ github.event.inputs.PROJECT_NAME || 'tvapp2' }} PROJECT_NAME: ${{ github.event.inputs.PROJECT_NAME || 'tvapp2' }}
CHANGELOG_MODE_COMMIT: true CHANGELOG_MODE_COMMIT: true
SHOW_UNCATEGORIZED: false SHOW_UNCATEGORIZED: false
PRERELEASE: false PRERELEASE: false
VERSION_RC: '1' VERSION_RC: '1'
BOT_NAME_1: EuropaServ ASSIGN_USER: Aetherinox
BOT_NAME_DEPENDABOT: dependabot[bot] BOT_NAME_1: EuropaServ
BOT_NAME_2: BinaryServ
BOT_NAME_DEPENDABOT: dependabot[bot]
BOT_NAME_RENOVATE: renovate[bot]
# # # #
# Jobs # Jobs
@@ -112,7 +140,7 @@ jobs:
# Initialize Start # Initialize Start
# # # #
- name: "✅ Start" - name: '✅ Start'
id: task_initialize_start id: task_initialize_start
run: | run: |
echo "Starting build" echo "Starting build"
@@ -134,24 +162,28 @@ jobs:
# Initialize Checkout # Initialize Checkout
# # # #
- name: "☑️ Checkout" - name: '☑️ Checkout'
id: task_initialize_checkout id: task_initialize_checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
# # # #
# Initialize Get version from package.json VERSION value # Initialize Set Package.json Version
# # # #
- name: "👁️‍🗨️ Package Version Set" - name: '👁️‍🗨️ Package Version Set'
id: task_initialize_package_getversion id: task_initialize_package_getversion
working-directory: ./tvapp2 working-directory: ./tvapp2
run: | run: |
VER=$(cat package.json | jq -r '.version') VER=$(cat package.json | jq -r '.version')
echo "PACKAGE_VERSION=$VER" >> $GITHUB_OUTPUT echo "PACKAGE_VERSION=$VER" >> $GITHUB_OUTPUT
- name: "👁️‍🗨️ Package Version Get" # #
# Initialize Get Package.json Version
# #
- name: '👁️‍🗨️ Package Version Get'
id: task_initialize_package_version_get id: task_initialize_package_version_get
run: | run: |
echo "VERSION: ${{ steps.task_initialize_package_getversion.outputs.PACKAGE_VERSION }}" echo "VERSION: ${{ steps.task_initialize_package_getversion.outputs.PACKAGE_VERSION }}"
@@ -179,11 +211,11 @@ jobs:
# Release Checkout # Release Checkout
# # # #
- name: "☑️ Checkout" - name: '☑️ Checkout'
id: task_release_checkout id: task_release_checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
# # # #
# Release Set Env Variables # Release Set Env Variables
@@ -202,7 +234,7 @@ jobs:
# Release Print Version Debug # Release Print Version Debug
# # # #
- name: "🪪 Test Next Job Version" - name: '🪪 Test Next Job Version'
id: task_release_debug_print_ver id: task_release_debug_print_ver
run: | run: |
echo "VERSION: ${{ env.PACKAGE_VERSION }}" echo "VERSION: ${{ env.PACKAGE_VERSION }}"
@@ -211,7 +243,7 @@ jobs:
# Release Install package via NPM # Release Install package via NPM
# # # #
- name: "🪪 NPM Install" - name: '🪪 NPM Install'
id: task_release_npm_install id: task_release_npm_install
working-directory: ./tvapp2 working-directory: ./tvapp2
run: | run: |
@@ -223,39 +255,39 @@ jobs:
# Release Execute npm generate so that a uuid and guid can be created # Release Execute npm generate so that a uuid and guid can be created
# # # #
- name: "🪪 Generate IDs" - name: '🪪 Generate IDs'
id: task_release_npm_env_generate id: task_release_npm_env_generate
working-directory: ./tvapp2 working-directory: ./tvapp2
run: | run: |
npm run root:generate npm run root:generate
# # # #
# .ENV Get # Release .ENV Get
# Get guid and uuid from env variable generated by npm # Get guid and uuid from env variable generated by npm
# # # #
- name: "🪪 .ENV Get" - name: '🪪 .ENV Get'
id: task_release_dotenv_get id: task_release_dotenv_get
uses: falti/dotenv-action@v1 uses: falti/dotenv-action@v1
with: with:
path: "./tvapp2/.env" path: "./tvapp2/.env"
# # # #
# .ENV Print (Debug) # Release .ENV Print (Debug)
# Show guid and uuid from env variable generated by npm # Show guid and uuid from env variable generated by npm
# # # #
- name: "🪪 .ENV Read" - name: '🪪 .ENV Read'
id: task_dotenv_debug_print id: task_dotenv_debug_print
run: | run: |
echo "GUID: ${{ steps.task_release_dotenv_get.outputs.GUID }}" echo "GUID: ${{ steps.task_release_dotenv_get.outputs.GUID }}"
echo "UUID: ${{ steps.task_release_dotenv_get.outputs.UUID }}" echo "UUID: ${{ steps.task_release_dotenv_get.outputs.UUID }}"
# # # #
# Build Project & Create Zip # Release Build Stable
# # # #
- name: "🔨 Build Stable ( ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip )" - name: '🔨 Build Stable ( ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip )'
id: task_release_build_st id: task_release_build_st
if: ${{ startsWith( inputs.PRERELEASE, false ) }} if: ${{ startsWith( inputs.PRERELEASE, false ) }}
run: | run: |
@@ -267,7 +299,11 @@ jobs:
env: env:
NODE_AUTH_TOKEN: ${{ secrets.ADMINSERV_TOKEN_CL }} NODE_AUTH_TOKEN: ${{ secrets.ADMINSERV_TOKEN_CL }}
- name: "🔨 Build RC ( ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}.zip )" # #
# Release Build Release Candidate
# #
- name: '🔨 Build RC ( ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}.zip )'
id: task_release_build_rc id: task_release_build_rc
if: ${{ startsWith( inputs.PRERELEASE, true ) }} if: ${{ startsWith( inputs.PRERELEASE, true ) }}
run: | run: |
@@ -280,14 +316,14 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.ADMINSERV_TOKEN_CL }} NODE_AUTH_TOKEN: ${{ secrets.ADMINSERV_TOKEN_CL }}
# # # #
# [ Tag ]: Pre Create # Release Tag Pre Create
# #
# in order to use the changelog github action, you must pre-create the tag otherwise # 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 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. # the list of commits will not be for the correct release.
# # # #
- name: "🔖 Tag Pre Create ${{ env.PACKAGE_VERSION }}" - name: '🔖 Tag Pre Create ${{ env.PACKAGE_VERSION }}'
id: task_release_tag_create id: task_release_tag_create
uses: rickstaa/action-create-tag@v1 uses: rickstaa/action-create-tag@v1
with: with:
@@ -298,22 +334,22 @@ jobs:
gpg_passphrase: ${{ secrets.ADMINSERV_GPG_PASSPHRASE }} gpg_passphrase: ${{ secrets.ADMINSERV_GPG_PASSPHRASE }}
# # # #
# [ Tag ]: Confirm # Release Tag Confirm
# #
# check if tag already exists # check if tag already exists
# # # #
- name: "🔖 Tag Confirm ${{ env.PACKAGE_VERSION }}" - name: '🔖 Tag Confirm ${{ env.PACKAGE_VERSION }}'
id: task_release_tag_get id: task_release_tag_get
run: | run: |
echo "Tag already present: ${{ env.TAG_EXISTS }}" echo "Tag already present: ${{ env.TAG_EXISTS }}"
echo "Tag already present: ${{ steps.task_release_tag_create.outputs.tag_exists }}" echo "Tag already present: ${{ steps.task_release_tag_create.outputs.tag_exists }}"
# # # #
# Checksum Generate # Release Checksum Stable
# # # #
- name: "🆔 Checksum Stable" - name: '🆔 Checksum Stable'
id: task_release_checksum_st_set id: task_release_checksum_st_set
if: ${{ startsWith( inputs.PRERELEASE, false ) }} if: ${{ startsWith( inputs.PRERELEASE, false ) }}
run: | run: |
@@ -327,7 +363,11 @@ jobs:
sha256_compose="$(shasum --algorithm 256 ${filename_compose_zip} | awk '{ print $1 }')" sha256_compose="$(shasum --algorithm 256 ${filename_compose_zip} | awk '{ print $1 }')"
echo "FILE_COMPOSE_ZIP=${filename_compose_zip}" >> $GITHUB_ENV echo "FILE_COMPOSE_ZIP=${filename_compose_zip}" >> $GITHUB_ENV
- name: "🆔 Checksum RC" # #
# Release Checksum Release Candidate
# #
- name: '🆔 Checksum RC'
id: task_release_checksum_rc_set id: task_release_checksum_rc_set
if: ${{ startsWith( inputs.PRERELEASE, true ) }} if: ${{ startsWith( inputs.PRERELEASE, true ) }}
run: | run: |
@@ -342,19 +382,19 @@ jobs:
echo "FILE_COMPOSE_ZIP=${filename_compose_zip}" >> $GITHUB_ENV echo "FILE_COMPOSE_ZIP=${filename_compose_zip}" >> $GITHUB_ENV
# # # #
# Checksum Print # Release Checksum Print
# # # #
- name: "🆔 Checksum Print" - name: '🆔 Checksum Print'
id: task_release_checksum_st_get id: task_release_checksum_st_get
run: | run: |
echo ${{ env.SHA256SUM }} echo "${{ env.SHA256SUM }}"
# # # #
# Contributor Images # Release Contributor Images
# # # #
- name: "🥸 Contributors Generate" - name: '🥸 Contributors Generate'
id: task_release_contribs_generate id: task_release_contribs_generate
uses: jaywcjlove/github-action-contributors@main uses: jaywcjlove/github-action-contributors@main
with: with:
@@ -363,10 +403,10 @@ jobs:
avatarSize: 42 avatarSize: 42
# # # #
# Checksum Add to ZIP file # Release Checksum Add (Stable)
# # # #
- name: "📦 Zip Add Checksum Stable" - name: '📦 Zip Add Checksum Stable'
id: task_release_zip_st id: task_release_zip_st
if: ${{ startsWith( inputs.PRERELEASE, false ) }} if: ${{ startsWith( inputs.PRERELEASE, false ) }}
run: | run: |
@@ -374,7 +414,11 @@ jobs:
zip -jr ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip SHA256SUMS.txt zip -jr ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip SHA256SUMS.txt
ls ls
- name: "📦 Zip Add Checksum RC" # #
# Release Checksum Add (Release Candidate)
# #
- name: '📦 Zip Add Checksum RC'
id: task_release_zip_rc id: task_release_zip_rc
if: ${{ startsWith( inputs.PRERELEASE, true ) }} if: ${{ startsWith( inputs.PRERELEASE, true ) }}
run: | run: |
@@ -382,25 +426,28 @@ jobs:
zip -jr ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}.zip SHA256SUMS.txt zip -jr ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}.zip SHA256SUMS.txt
ls ls
# #
# Changelog Generate
#
# generates a changelog from the github api. requires a PREVIOUS_TAG in order to figure
# out the changes made between the two versions.
#
# outputs:
# ${{ steps.changelog.outputs.changelog }}
# #
- name: "📝 Changelog Pre Setup (Categorized Commits)" - name: '📝 Changelog Pre Setup (Categorized Commits)'
id: task_release_changelog_categorized_sha_set id: task_release_changelog_categorized_sha_set
run: | run: |
echo "TAG_LAST=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV echo "TAG_LAST=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
echo "COMMIT_LAST=$(git rev-parse HEAD)" >> $GITHUB_ENV echo "COMMIT_LAST=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: "📝 Changelog Build (Categorized)" # #
# 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 id: task_release_changelog_categorized
if: ${{ startsWith( inputs.SHOW_UNCATEGORIZED, false ) }} if: |
startsWith( inputs.SHOW_UNCATEGORIZED, false ) ||
startsWith( env.SHOW_UNCATEGORIZED, false )
uses: mikepenz/release-changelog-builder-action@v5 uses: mikepenz/release-changelog-builder-action@v5
with: with:
token: ${{ secrets.ADMINSERV_TOKEN }} token: ${{ secrets.ADMINSERV_TOKEN }}
@@ -408,7 +455,7 @@ jobs:
#toTag: "${{ github.ref }}" #toTag: "${{ github.ref }}"
configuration: ".github/changelog-configuration.json" configuration: ".github/changelog-configuration.json"
ignorePreReleases: false ignorePreReleases: false
commitMode: ${{ inputs.CHANGELOG_MODE_COMMIT }} commitMode: ${{ inputs.CHANGELOG_MODE_COMMIT || env.CHANGELOG_MODE_COMMIT }}
fetchReleaseInformation: true fetchReleaseInformation: true
fetchViaCommits: true fetchViaCommits: true
configurationJson: | configurationJson: |
@@ -419,14 +466,24 @@ jobs:
GITHUB_TOKEN: ${{ secrets.ADMINSERV_TOKEN }} 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 # shows only categorized commits using the commit standards
# type(scope): description # type(scope): description
# type: description # type: description
# # # #
- name: "📝 Changelog Build (Uncategorized)" - name: '📝 Changelog Build (Uncategorized)'
id: task_release_changelog_uncategorized id: task_release_changelog_uncategorized
if: ${{ startsWith( inputs.SHOW_UNCATEGORIZED, true ) }} if: |
startsWith( inputs.SHOW_UNCATEGORIZED, true ) ||
startsWith( env.SHOW_UNCATEGORIZED, true )
uses: mikepenz/release-changelog-builder-action@v5 uses: mikepenz/release-changelog-builder-action@v5
with: with:
token: ${{ secrets.ADMINSERV_TOKEN }} token: ${{ secrets.ADMINSERV_TOKEN }}
@@ -434,7 +491,7 @@ jobs:
#toTag: "${{ github.ref }}" #toTag: "${{ github.ref }}"
configuration: ".github/changelog-configuration.json" configuration: ".github/changelog-configuration.json"
ignorePreReleases: false ignorePreReleases: false
commitMode: ${{ inputs.CHANGELOG_MODE_COMMIT }} commitMode: ${{ inputs.CHANGELOG_MODE_COMMIT || env.CHANGELOG_MODE_COMMIT }}
fetchReleaseInformation: true fetchReleaseInformation: true
fetchViaCommits: true fetchViaCommits: true
configurationJson: | configurationJson: |
@@ -445,32 +502,66 @@ jobs:
GITHUB_TOKEN: ${{ secrets.ADMINSERV_TOKEN }} GITHUB_TOKEN: ${{ secrets.ADMINSERV_TOKEN }}
# # # #
# Changelog Fetch # 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 Print (Categorized)" - name: '🙊 Changelog Step to Env Categorized'
if: ${{ startsWith( inputs.SHOW_UNCATEGORIZED, false ) }} 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: | run: |
echo "${{ steps.task_release_changelog_categorized.outputs.changelog }}" echo "$CHANGELOG_CATEGORIZED"
- name: "📝 Changelog Print (Uncategorized)" - name: '🙊 Changelog Step to Env Uncategorized'
if: ${{ startsWith( inputs.SHOW_UNCATEGORIZED, true ) }} 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: | run: |
echo "${{ steps.task_release_changelog_uncategorized.outputs.changelog }}" echo "$CHANGELOG_UNCATEGORIZED"
# # # #
# [ Release ]: Post Release # Release List Tree
# #
- name: '⚙️ Debug Clean Dist Folder'
id: task_release_debug_tree
run: |
tree
# #
# Release Post Release (Stable)
# #
# outputs: # outputs:
# [RELEASE ID]: # [RELEASE ID]:
# ${{ steps.task_release_bundle_rc.outputs.id # ${{ steps.task_release_bundle_rc.outputs.id
# ${{ steps.task_release_bundle_st.outputs.id # ${{ steps.task_release_bundle_st.outputs.id
# # # #
- name: "🏳️ Post Stable" - name: '🏳️ Post Stable'
if: ${{ startsWith( inputs.PRERELEASE, false ) }}
uses: softprops/action-gh-release@v2
id: task_release_bundle_st id: task_release_bundle_st
if: |
startsWith( inputs.PRERELEASE, false ) ||
startsWith( env.PRERELEASE, false )
uses: softprops/action-gh-release@v2
env: env:
GITHUB_TOKEN: ${{ secrets.ADMINSERV_TOKEN_CL }} GITHUB_TOKEN: ${{ secrets.ADMINSERV_TOKEN_CL }}
with: with:
@@ -489,10 +580,21 @@ jobs:
${{ steps.task_release_changelog_categorized.outputs.changelog }} ${{ steps.task_release_changelog_categorized.outputs.changelog }}
${{ steps.task_release_changelog_uncategorized.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" - name: "🏳️ Post Release Candidate"
if: ${{ startsWith( inputs.PRERELEASE, true ) }}
uses: softprops/action-gh-release@v2
id: task_release_bundle_rc id: task_release_bundle_rc
if: |
startsWith( inputs.PRERELEASE, true ) ||
startsWith( env.PRERELEASE, true )
uses: softprops/action-gh-release@v2
env: env:
GITHUB_TOKEN: ${{ secrets.ADMINSERV_TOKEN }} GITHUB_TOKEN: ${{ secrets.ADMINSERV_TOKEN }}
with: with:
@@ -515,17 +617,27 @@ jobs:
${{ steps.task_release_changelog_uncategorized.outputs.changelog }} ${{ steps.task_release_changelog_uncategorized.outputs.changelog }}
# # # #
# Print Status # 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" - name: "🎛️ Status Print"
id: task_release_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: | run: |
echo "Printing Variables" echo "Printing Variables"
echo echo
echo "---- CHANGELOG ---------------------------------------------------------------" echo "---- CHANGELOG ---------------------------------------------------------------"
echo "${{ steps.task_release_changelog_categorized.outputs.changelog }}" echo "$CHANGELOG_CATEGORIZED"
echo "${{ steps.task_changelog_uncategorized.outputs.changelog }}" echo "$CHANGELOG_UNCATEGORIZED"
echo "---- CHANGELOG ---------------------------------------------------------------" echo "---- CHANGELOG ---------------------------------------------------------------"
echo "" echo ""
echo "" echo ""
@@ -539,7 +651,7 @@ jobs:
echo "---- CHANGELOG ---------------------------------------------------------------" echo "---- CHANGELOG ---------------------------------------------------------------"
# # # #
# Upload artifacts > release files # Release Upload Artifacts Release Files
# # # #
- name: >- - name: >-
@@ -568,7 +680,7 @@ jobs:
steps: steps:
# # # #
# Job Complete Download Artifacts # Complete Download Artifacts
# # # #
- name: "📁 Download Saved Artifacts" - name: "📁 Download Saved Artifacts"
@@ -576,7 +688,7 @@ jobs:
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
# # # #
# Job Complete Get publish timestamp # Complete Get publish timestamp
# # # #
- name: >- - name: >-
@@ -589,7 +701,7 @@ jobs:
echo "NOW_DOCKER_LABEL=$(date +'%Y%m%d')" >> $GITHUB_ENV echo "NOW_DOCKER_LABEL=$(date +'%Y%m%d')" >> $GITHUB_ENV
# # # #
# Job > Complete > Set ENVs # Complete Set ENVs
# # # #
- name: "🕛 Get Env Vars" - name: "🕛 Get Env Vars"
@@ -602,7 +714,7 @@ jobs:
echo "SHA_STABLE=${release_stable_sha256}" >> $GITHUB_ENV echo "SHA_STABLE=${release_stable_sha256}" >> $GITHUB_ENV
# # # #
# Job Complete Summary of publish # Complete Summary of publish
# # # #
- name: "🆗 Completed: ${{ env.NOW }}" - name: "🆗 Completed: ${{ env.NOW }}"

View File

@@ -19,12 +19,22 @@
# 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 . # 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 ghcr.io/aetherinox/alpine-base:3.20-amd64 # #
# FROM
# any args defined before FROM cannot be called after FROM and the ARE is classified outside the build process.
# 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 --platform=linux/${ARCH} ghcr.io/aetherinox/alpine-base:3.21
# # # #
# Set Args # Set Args
# # # #
ARG ARCH=amd64
ARG BUILDDATE ARG BUILDDATE
ARG VERSION ARG VERSION
@@ -32,32 +42,39 @@ ARG VERSION
# Set Labels # Set Labels
# # # #
LABEL maintainer="aetherinox, iFlip721" LABEL org.opencontainers.image.authors="Aetherinox, iFlip721, Optx"
LABEL org.opencontainers.image.authors="aetherinox, iFlip721"
LABEL org.opencontainers.image.vendor="BinaryNinja" LABEL org.opencontainers.image.vendor="BinaryNinja"
LABEL org.opencontainers.image.title="TVApp2" LABEL org.opencontainers.image.title="TVApp2"
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.description="Automatic m3u and xml guide updater for TheTvApp, TVPass, and MoveOnJoy utilized within your IPTV client."
LABEL org.opencontainers.image.source="https://github.com/TheBinaryNinja/tvapp2" LABEL org.opencontainers.image.source="https://github.com/thebinaryninja/tvapp2"
LABEL org.opencontainers.image.repo.1="https://github.com/TheBinaryNinja/tvapp2" LABEL org.opencontainers.image.repo.1="https://github.com/thebinaryninja/tvapp2"
LABEL org.opencontainers.image.repo.2="https://git.binaryninja.net/BinaryNinja/tvapp2" LABEL org.opencontainers.image.repo.2="https://git.binaryninja.net/binaryninja/tvapp2"
LABEL org.opencontainers.image.repo.3="https://github.com/aetherinox/docker-base-alpine" LABEL org.opencontainers.image.repo.3="https://github.com/aetherinox/docker-base-alpine"
LABEL org.opencontainers.image.documentation="https://github.com/TheBinaryNinja/tvapp2/wiki" 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.url="https://github.com/thebinaryninja/tvapp2/pkgs/container/tvapp2"
LABEL org.opencontainers.image.licenses="MIT" LABEL org.opencontainers.image.licenses="MIT"
LABEL BUILDVERSION="TVApp2 v${VERSION} Build ${BUILDDATE}" LABEL org.opencontainers.image.architecture="${ARCH}"
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 Env Var
# # # #
ENV TZ="Etc/UTC" ENV NODE_VERSION=22.8.0
ENV URL_REPO="https://git.binaryninja.net/BinaryNinja/"
ENV WEB_IP="0.0.0.0"
ENV WEB_PORT=4124
ENV NODE_VERSION=18.20.5
ENV YARN_VERSION=1.22.22 ENV YARN_VERSION=1.22.22
ENV DIR_BUILD=/usr/src/app ENV DIR_BUILD=/usr/src/app
ENV DIR_RUN=/usr/bin/app ENV DIR_RUN=/usr/bin/app
ENV URL_REPO="https://git.binaryninja.net/binaryninja/"
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"
# # # #
# Install # Install

View File

@@ -1,115 +0,0 @@
# 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.aarch64
# @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 .
# #
FROM ghcr.io/aetherinox/alpine-base:3.20-arm64
# #
# Set Args
# #
ARG BUILDDATE
ARG VERSION
# #
# Set Labels
# #
LABEL maintainer="aetherinox, iFlip721"
LABEL org.opencontainers.image.authors="aetherinox, iFlip721"
LABEL org.opencontainers.image.vendor="BinaryNinja"
LABEL org.opencontainers.image.title="TVApp2"
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.source="https://github.com/TheBinaryNinja/tvapp2"
LABEL org.opencontainers.image.repo.1="https://github.com/TheBinaryNinja/tvapp2"
LABEL org.opencontainers.image.repo.2="https://git.binaryninja.net/BinaryNinja/tvapp2"
LABEL org.opencontainers.image.repo.3="https://github.com/aetherinox/docker-base-alpine"
LABEL org.opencontainers.image.documentation="https://github.com/TheBinaryNinja/tvapp2/wiki"
LABEL org.opencontainers.image.url="https://github.com/TheBinaryNinja/tvapp2/pkgs/container/tvapp2"
LABEL org.opencontainers.image.licenses="MIT"
LABEL BUILDVERSION="TVApp2 v${VERSION} Build ${BUILDDATE}"
# #
# Set Env Var
# #
ENV TZ="Etc/UTC"
ENV URL_REPO="https://git.binaryninja.net/BinaryNinja/"
ENV WEB_IP="0.0.0.0"
ENV WEB_PORT=4124
ENV NODE_VERSION=18.20.5
ENV YARN_VERSION=1.22.22
ENV DIR_BUILD=/usr/src/app
ENV DIR_RUN=/usr/bin/app
# #
# Install
# #
RUN \
apk add --no-cache \
wget \
bash \
nano \
npm \
openssl
# #
# Copy docker-entrypoint
# #
COPY docker-entrypoint.sh /usr/local/bin/
# #
# copy s6-overlays root to image root
# #
COPY root/ /
# #
# set work directory
# #
WORKDIR ${DIR_BUILD}
# #
# copy tvapp2 project to workdir
# #
COPY tvapp2/ ./
# #
# 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
# and then keep the container running. Hacky, but whatever.
# #
ENTRYPOINT ["/init"]

102
README.md
View File

@@ -7,6 +7,11 @@
<div align="center"> <div align="center">
<img src="docs/img/screenshots/01.png" height="320">
<br />
<br />
<!-- prettier-ignore-start --> <!-- prettier-ignore-start -->
[![Version][github-version-img]][github-version-uri] [![Version][github-version-img]][github-version-uri]
[![Downloads][github-downloads-img]][github-downloads-uri] [![Downloads][github-downloads-img]][github-downloads-uri]
@@ -19,7 +24,7 @@
<div align="center"> <div align="center">
[![View](https://img.shields.io/discord/1340814107124830229?style=for-the-badge&color=de1f68)](https://discord.gg/gTze6hRe)[![View](https://img.shields.io/badge/Join%20Discord-2d5e97?style=for-the-badge&logo=discord&logoColor=FFFFFF)](https://discord.gg/gTze6hRe) [![View](https://img.shields.io/discord/1340814107124830229?style=for-the-badge&color=de1f68)](https://discord.gg/gTze6hRe)[![View](https://img.shields.io/badge/Join%20Discord-2d5e97?style=for-the-badge&logo=discord&logoColor=FFFFFF)](https://discord.gg/HGv4eGr2kg)
</div> </div>
@@ -133,17 +138,11 @@ For the [environment variables](#environment-variables), you may specify these i
#### Registry URLs #### Registry URLs
| Pull URL | Platform | Registry | Version | | Pull URL | Registry | Architecture | Version |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| `ghcr.io/thebinaryninja/tvapp2:latest` | Github | amd64 | [![Github - Version][github-docker-version-img]][github-docker-version-uri] | | `ghcr.io/thebinaryninja/tvapp2:latest` | Github | amd64 / arm64 | [![Github - Version][github-docker-version-img]][github-docker-version-uri] |
| `ghcr.io/thebinaryninja/tvapp2:amd64` | Github | amd64 | | | `thebinaryninja/tvapp2:latest` | Dockerhub | amd64 / arm64 | [![Github - Version][dockerhub-docker-version-img]][dockerhub-docker-version-uri] |
| `ghcr.io/thebinaryninja/tvapp2:arm64` | Github | arm64 | | | `git.binaryninja.net/binaryninja/tvapp2:latest` | Gitea | amd64 / arm64 | [![Gitea - Version][gitea-docker-version-img]][gitea-docker-version-uri] |
| `thebinaryninja/tvapp2:latest` | Dockerhub | amd64 | [![Github - Version][dockerhub-docker-version-img]][dockerhub-docker-version-uri] |
| `thebinaryninja/tvapp2:1.0.0-amd64` | Dockerhub | amd64 |
| `thebinaryninja/tvapp2:1.0.0-arm64` | Dockerhub | arm64 |
| `git.binaryninja.net/binaryninja/tvapp2:latest` | Gitea |amd64 | [![Gitea - Version][gitea-docker-version-img]][gitea-docker-version-uri] |
| `git.binaryninja.net/binaryninja/tvapp2:1.0.0-amd64` | Gitea | amd64 |
| `git.binaryninja.net/binaryninja/tvapp2:1.0.0-arm64` | Gitea | arm64 |
<br /> <br />
<br /> <br />
@@ -156,8 +155,13 @@ For the [environment variables](#environment-variables), you may specify these i
| `WEB_IP` | `0.0.0.0` | IP to use for webserver | | `WEB_IP` | `0.0.0.0` | IP to use for webserver |
| `WEB_PORT` | `4124` | Port to use for webserver | | `WEB_PORT` | `4124` | Port to use for webserver |
| `URL_REPO` | `https://git.binaryninja.net/BinaryNinja/` | Determines where the data files will be downloaded from. Do not change this or you will be unable to get M3U and EPG data. | | `URL_REPO` | `https://git.binaryninja.net/BinaryNinja/` | Determines where the data files will be downloaded from. Do not change this or you will be unable to get M3U and EPG data. |
| `FILE_PLAYLIST` | `playlist.m3u8` | Filename for M3U playlist file |
| `FILE_EPG` | `xmltv.xml` | Filename for XML guide data file |
| `FILE_TAR` | `xmltv.xml.gz` | Filename for XML compressed as gzip .gz |
| `STREAM_QUALITY` | `hd` | Stream quality<br />Can be either `hd` or `sd` |
| `DIR_BUILD` | `/usr/src/app` | Path inside container where TVApp2 will be built. <br /><br /> <sup>⚠️ This should not be used unless you know what you're doing</sup> | | `DIR_BUILD` | `/usr/src/app` | Path inside container where TVApp2 will be built. <br /><br /> <sup>⚠️ This should not be used unless you know what you're doing</sup> |
| `DIR_RUN` | `/usr/bin/app` | Path inside container where TVApp2 will be placed after it is built <br /><br /> <sup>⚠️ This should not be used unless you know what you're doing</sup> | | `DIR_RUN` | `/usr/bin/app` | Path inside container where TVApp2 will be placed after it is built <br /><br /> <sup>⚠️ This should not be used unless you know what you're doing</sup> |
| `LOG_LEVEL` | `4` | Level of logging to display in console<br/>`6` Trace <sup><sub>& below</sub></sup><br />`5` Debug <sup><sub>& below</sub></sup><br />`4` Info <sup><sub>& below</sub></sup><br />`3` Notice <sup><sub>& below</sub></sup><br />`2` Warn <sup><sub>& below</sub></sup><br />`1` Error <sup><sub>only</sub></sup> |
<br /> <br />
<br /> <br />
@@ -219,7 +223,14 @@ services:
- ./app:/usr/bin/app - ./app:/usr/bin/app
environment: environment:
- TZ=Etc/UTC - TZ=Etc/UTC
- WEB_IP=0.0.0.0
- WEB_PORT=4124
- DIR_RUN=/usr/bin/app - DIR_RUN=/usr/bin/app
- DIR_RUN=/usr/bin/app
- STREAM_QUALITY=hd
- FILE_PLAYLIST=playlist.m3u8
- FILE_EPG=xmltv.xml
- LOG_LEVEL=4
``` ```
<br /> <br />
@@ -342,16 +353,12 @@ GRAPH_ALPINE --> obj_step20 --> obj_step21 --> obj_step22 --> obj_step23 --> obj
<br /> <br />
When building your TVApp2 images with the commands provided below, ensure you create two sets of tags: This repository offers two types of docker image; `stable` and `development`. You may create both or just one. We also offer two different architectures which are `amd64` and `arm64`. These architectures are tied to the same release.
| Architecture | Dockerfile | Tags | | Build | Tags |
| ------------ | -------------------- | ----------------------------------------------------------------------- | | ------------------------- | ----------------------------------------------------------------------------- |
| `amd64` | `Dockerfile` | `tvapp2:latest` <br /> `tvapp2:1.0.0` <br /> `tvapp2:1.0.0-amd64` | | `Stable` | `tvapp2:latest` <br /> `tvapp2:1.0.0` <br /> `tvapp2:1.0` <br /> `tvapp2:1` |
| `arm64` | `Dockerfile.aarch64` | `tvapp2:1.0.0-arm64` | | `Development` | `tvapp2:development` |
<br />
The `amd64` arch gets a few extra tags because it should be the default image people clone.
<br /> <br />
@@ -451,7 +458,7 @@ This method will show you how to build the TVApp2 docker image using `docker bui
```shell ignore ```shell ignore
# Build tvapp2 amd64 # Build tvapp2 amd64
docker build --network=host --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250728 -t tvapp2:latest -t tvapp2:1.0.0 -t tvapp2:1.0.0-amd64 -f Dockerfile . docker build --network=host --build-arg ARCH=amd64 --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250728 -t tvapp2:latest -t tvapp2:1.0.0 -t tvapp2:1.0.0-amd64 -f Dockerfile .
``` ```
<br /> <br />
@@ -460,7 +467,7 @@ docker build --network=host --build-arg VERSION=1.0.0 --build-arg BUILDDATE=2025
```shell ignore ```shell ignore
# Build tvapp2 arm64 # Build tvapp2 arm64
docker build --network=host --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250728 -t tvapp2:1.0.0-arm64 -f Dockerfile.aarch64 . docker build --network=host --build-arg ARCH=arm64 --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250728 -t tvapp2:1.0.0-arm64 -f Dockerfile.aarch64 .
``` ```
<br /> <br />
@@ -523,7 +530,7 @@ The command below will build your TVApp2 docker image, and save a local copy of
```shell ignore ```shell ignore
# Build tvapp2 amd64 # Build tvapp2 amd64
docker buildx build --no-cache --pull --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250728 -t tvapp2:latest -t tvapp2:1.0.0 --platform=linux/amd64 --output type=docker --output type=docker . docker buildx build --no-cache --pull --build-arg ARCH=amd64 --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250728 -t tvapp2:latest -t tvapp2:1.0.0 --platform=linux/amd64 --output type=docker --output type=docker .
``` ```
<br /> <br />
@@ -532,7 +539,7 @@ docker buildx build --no-cache --pull --build-arg VERSION=1.0.0 --build-arg BUIL
```shell ignore ```shell ignore
# Build tvapp2 arm64 # Build tvapp2 arm64
docker buildx build --no-cache --pull --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250728 -t tvapp2:latest -t tvapp2:1.0.0 --platform=linux/arm64 --output type=docker --output type=docker . docker buildx build --no-cache --pull --build-arg ARCH=arm64 --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250728 -t tvapp2:latest -t tvapp2:1.0.0 --platform=linux/arm64 --output type=docker --output type=docker .
``` ```
<br /> <br />
@@ -607,7 +614,7 @@ You are ready to build the TVApp2 docker image, run the command for your platfor
###### amd64 ###### amd64
```shell ignore ```shell ignore
docker buildx build --no-cache --pull --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250728 -t tvapp2:latest -t tvapp2:1.0.0 --platform=linux/amd64 --provenance=true --sbom=true --builder=container --push . docker buildx build --no-cache --pull --build-arg ARCH=amd64 --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250728 -t tvapp2:latest -t tvapp2:1.0.0 --platform=linux/amd64 --provenance=true --sbom=true --builder=container --push .
``` ```
<br /> <br />
@@ -615,7 +622,7 @@ docker buildx build --no-cache --pull --build-arg VERSION=1.0.0 --build-arg BUIL
###### arm64 / aarch64 ###### arm64 / aarch64
```shell ignore ```shell ignore
docker buildx build --no-cache --pull --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250728 -t tvapp2:latest -t tvapp2:1.0.0 --platform=linux/arm64 --provenance=true --sbom=true --builder=container --push . docker buildx build --no-cache --pull --build-arg ARCH=arm64 --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250728 -t tvapp2:latest -t tvapp2:1.0.0 --platform=linux/arm64 --provenance=true --sbom=true --builder=container --push .
``` ```
<br /> <br />
@@ -643,7 +650,7 @@ npm run docker:build:amd64 --VERSION=1.0.1 --BUILDDATE=20250220
##### Platform Commands ##### Platform Commands
The following is a list of the available commands you can pick from depending on how you would like to build TvAPP2: The following is a list of the available commands you can pick from depending on how you would like to build TvApp2:
| Command | Description | | Command | Description |
| --- | --- | | --- | --- |
@@ -661,8 +668,8 @@ The run command above has several variables you must specify:
| Variable | Description | | Variable | Description |
| --- | --- | | --- | --- |
| `--VERSION=1.X.X` | The version to assign to the docker image | | `--VERSION=1.X.X` | The version to assign to the docker image |
| `--BUILDDATE=20250220` | The date to assign to the docker image. <br /> Date format: `YEAR / MONTH / DAY` | | `--BUILDDATE=20250220` | The date to assign to the docker image. <br /> Date format: `YYYYMMDD` |
| `--ARCH=amd64` | Architecture for image<br /> Options: `amd64`, `arm64` |
<br /> <br />
@@ -701,7 +708,7 @@ mkdir -p /home/docker/tvapp2
<br /> <br />
Then create a new `docker-compose.yml` file and add the following: Then create a new `docker-compose.yml`:
```shell ignore ```shell ignore
sudo nano /home/docker/tvapp2/docker-compose.yml sudo nano /home/docker/tvapp2/docker-compose.yml
@@ -718,6 +725,7 @@ services:
image: ghcr.io/thebinaryninja/tvapp2:latest # Image: Github image: ghcr.io/thebinaryninja/tvapp2:latest # Image: Github
# image: thebinaryninja/tvapp2:latest # Image: Dockerhub # image: thebinaryninja/tvapp2:latest # Image: Dockerhub
# image: git.binaryninja.net/binaryninja/tvapp2:latest # Image: Gitea # image: git.binaryninja.net/binaryninja/tvapp2:latest # Image: Gitea
hostname: tvapp2
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- /etc/timezone:/etc/timezone:ro - /etc/timezone:/etc/timezone:ro
@@ -760,8 +768,13 @@ This docker container contains the following env variables:
| `WEB_IP` | `0.0.0.0` | IP to use for webserver | | `WEB_IP` | `0.0.0.0` | IP to use for webserver |
| `WEB_PORT` | `4124` | Port to use for webserver | | `WEB_PORT` | `4124` | Port to use for webserver |
| `URL_REPO` | `https://git.binaryninja.net/BinaryNinja/` | Determines where the data files will be downloaded from. Do not change this or you will be unable to get M3U and EPG data. | | `URL_REPO` | `https://git.binaryninja.net/BinaryNinja/` | Determines where the data files will be downloaded from. Do not change this or you will be unable to get M3U and EPG data. |
| `FILE_PLAYLIST` | `playlist.m3u8` | Filename for M3U playlist file |
| `FILE_EPG` | `xmltv.xml` | Filename for XML guide data file |
| `FILE_TAR` | `xmltv.xml.gz` | Filename for XML compressed as gzip .gz |
| `STREAM_QUALITY` | `hd` | Stream quality<br />Can be either `hd` or `sd` |
| `DIR_BUILD` | `/usr/src/app` | Path inside container where TVApp2 will be built. <br /><br /> <sup>⚠️ This should not be used unless you know what you're doing</sup> | | `DIR_BUILD` | `/usr/src/app` | Path inside container where TVApp2 will be built. <br /><br /> <sup>⚠️ This should not be used unless you know what you're doing</sup> |
| `DIR_RUN` | `/usr/bin/app` | Path inside container where TVApp2 will be placed after it is built <br /><br /> <sup>⚠️ This should not be used unless you know what you're doing</sup> | | `DIR_RUN` | `/usr/bin/app` | Path inside container where TVApp2 will be placed after it is built <br /><br /> <sup>⚠️ This should not be used unless you know what you're doing</sup> |
| `LOG_LEVEL` | `4` | Level of logging to display in console<br/>`6` Trace <sup><sub>& below</sub></sup><br />`5` Debug <sup><sub>& below</sub></sup><br />`4` Info <sup><sub>& below</sub></sup><br />`3` Notice <sup><sub>& below</sub></sup><br />`2` Warn <sup><sub>& below</sub></sup><br />`1` Error <sup><sub>only</sub></sup> |
<br /> <br />
<br /> <br />
@@ -817,6 +830,7 @@ services:
image: ghcr.io/thebinaryninja/tvapp2:latest # Image: Github image: ghcr.io/thebinaryninja/tvapp2:latest # Image: Github
# image: thebinaryninja/tvapp2:latest # Image: Dockerhub # image: thebinaryninja/tvapp2:latest # Image: Dockerhub
# image: git.binaryninja.net/binaryninja/tvapp2:latest # Image: Gitea # image: git.binaryninja.net/binaryninja/tvapp2:latest # Image: Gitea
hostname: tvapp2
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- /etc/timezone:/etc/timezone:ro - /etc/timezone:/etc/timezone:ro
@@ -946,6 +960,7 @@ services:
traefik: traefik:
container_name: traefik container_name: traefik
image: traefik:latest image: traefik:latest
hostname: tvapp2
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro - /var/run/docker.sock:/var/run/docker.sock:ro
@@ -1022,9 +1037,26 @@ CF_API_KEY=Your-Cloudflare-API-Key
<br /> <br />
Save the `.env` file and exit. For these environment variables to be detected by Traefik, you must give your Traefik container a restart. Until you restart Traefik, it will not be able to generate your new SSL certificates. Save the `.env` file and exit. For these environment variables to be detected by Traefik, you must give your Traefik container a restart. Until you restart Traefik, it will not be able to generate your new SSL certificates. Before doing the restart, we need to create one more folder and file; this is where Traefik will store your SSL certificate generated by Cloudflare.
You can wait and restart in a moment after you finish editing the `static.yml` file, as there are more items to add below. <br />
Run the commands below, which will do the following:
- Create a new folder called `cloudflare`
- Create a new file named `acme.json`
- Set the permission for the `acme.json` file to `chmod 600`.
- If you do not do this step, Traefik will fail to start. You must change the permissions in order to protect the file.
```shell
mkdir -p /home/docker/traefik/cloudflare
touch /home/docker/traefik/cloudflare/acme.json
chmod 0600 /home/docker/traefik/cloudflare/acme.json
```
<br />
The `acme.json` file will not be populated with an SSL certificate until the next time you restart Traefik. You can wait and restart in a moment after you finish editing the `static.yml` file, as there are more items to add below.
<br /> <br />
@@ -1118,7 +1150,7 @@ entryPoints:
<br /> <br />
Save the files and then give Traefik and your TVApp2 container a restart. After the restart is complete; you should be able to access TVApp2 in your browser by going to Remember to change `domain.lan` to your actual domain name. Then save the files and then give Traefik and your TVApp2 container a restart. After the restart is complete; you should be able to access TVApp2 in your browser by going to
```console ```console
https://tvapp2.domain.lan https://tvapp2.domain.lan
@@ -1619,11 +1651,11 @@ The following people have helped get this project going:
[github-docker-version-uri]: https://github.com/TheBinaryNinja/tvapp2/pkgs/container/tvapp2 [github-docker-version-uri]: https://github.com/TheBinaryNinja/tvapp2/pkgs/container/tvapp2
<!-- BADGE > Dockerhub > Docker Image --> <!-- BADGE > Dockerhub > Docker Image -->
[dockerhub-docker-version-img]: https://badges-ghcr.onrender.com/thebinaryninja/tvapp2/latest_tag?color=%233d9e18&ignore=development-amd64%2Cdevelopment%2Cdevelopment-arm64%2Clatest&label=version&trim= [dockerhub-docker-version-img]: https://img.shields.io/docker/v/thebinaryninja/tvapp2?sort=semver&arch=arm64
[dockerhub-docker-version-uri]: https://hub.docker.com/repository/docker/thebinaryninja/tvapp2/general [dockerhub-docker-version-uri]: https://hub.docker.com/repository/docker/thebinaryninja/tvapp2/general
<!-- BADGE > Gitea > Docker Image > SELFHOSTED BADGES --> <!-- BADGE > Gitea > Docker Image > SELFHOSTED BADGES -->
[gitea-docker-version-img]: https://badges-ghcr.onrender.com/thebinaryninja/tvapp2/latest_tag?color=%233d9e18&ignore=development-amd64%2Cdevelopment%2Cdevelopment-arm64%2Clatest&label=version&trim= [gitea-docker-version-img]: https://badges-ghcr.onrender.com/thebinaryninja/tvapp2/latest_tag?color=%233d9e18&ignore=latest&label=version&trim=
[gitea-docker-version-uri]: https://git.binaryninja.net/BinaryNinja/tvapp2 [gitea-docker-version-uri]: https://git.binaryninja.net/BinaryNinja/tvapp2
<!-- BADGE > Gitea 2 > Docker Image --> <!-- BADGE > Gitea 2 > Docker Image -->

View File

@@ -44,3 +44,7 @@ services:
memlock: memlock:
soft: -1 soft: -1
hard: -1 hard: -1
healthcheck:
test: [ "CMD", "curl", "--fail", "http://127.0.0.1:4124" ]
interval: 30s
retries: 5

BIN
docs/img/screenshots/01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

83
renovate.json Normal file
View File

@@ -0,0 +1,83 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended",
":preserveSemverRanges"
],
"timezone": "Etc/UTC",
"includeForks": true,
"forkProcessing": "enabled",
"baseBranches": ["main"],
"prCreation": "immediate",
"rebaseWhen": "conflicted",
"rebaseLabel": "AC Needs Rebase",
"gitAuthor": "EuropaServ <161414668+EuropaServ@users.noreply.github.com>",
"updatePinnedDependencies": false,
"dependencyDashboard": true,
"dependencyDashboardTitle": "📁 Dependency Dashboard",
"dependencyDashboardLabels": ["📰 Progress Report"],
"vulnerabilityAlerts": {
"enabled": true,
"labels": ["Type ◦ Vulnerability"]
},
"labels": [
"Type ◦ Dependency"
],
"major": {
"automerge": false
},
"lockFileMaintenance": {
"enabled": true,
"automerge": true
},
"packageRules": [
{
"matchManagers": [
"nodenv",
"npm",
"nvm"
],
"addLabels": [
"Type ◦ Dependency"
],
"rangeStrategy": "auto"
},
{
"matchManagers": [
"nodenv",
"npm",
"nvm"
],
"matchUpdateTypes": [
"minor",
"patch"
],
"addLabels": [
"Type ◦ Dependency"
],
"automerge": false
},
{
"matchManagers": [
"github-actions"
],
"addLabels": [
"Type ◦ Git Action"
],
"rangeStrategy": "auto"
},
{
"matchManagers": [
"github-actions"
],
"addLabels": [
"Type ◦ Git Action"
],
"matchUpdateTypes": [
"minor",
"patch"
],
"automerge": false
}
]
}

View File

@@ -7,4 +7,6 @@
cp -r ${DIR_BUILD}/* ${DIR_RUN} cp -r ${DIR_BUILD}/* ${DIR_RUN}
rm -rf ${DIR_BUILD}/* rm -rf ${DIR_BUILD}/*
cd ${DIR_RUN} cd ${DIR_RUN}
npm install --omit=dev
npm start npm start

282
tvapp2/eslint.config.mjs Normal file
View File

@@ -0,0 +1,282 @@
/*
Eslint 9 Flat Config
old eslint < 8 .rc files are no longer supported! do not place .eslintrc files in subfolders.
eslint developers are currently working on an experimental feature to allow for sub-folder
override rules
@ref https://github.com/eslint/eslint/discussions/18574#discussioncomment-9729092
https://eslint.org/docs/latest/use/configure/configuration-files#experimental-configuration-file-resolution
eslint config migration docs
@ref https://eslint.org/docs/latest/use/configure/migration-guide
*/
import path from 'path';
import globals from 'globals';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';
/*
Plugins
*/
import pluginImport from 'eslint-plugin-import';
import pluginNode from 'eslint-plugin-n'
import pluginChaiFriendly from 'eslint-plugin-chai-friendly';
import pluginStylisticJs from '@stylistic/eslint-plugin-js'
/*
Globals
*/
const customGlobals =
{
guid: 'readable',
uuid: 'readable',
Buffer: "readonly",
BufferEncoding: "readonly"
};
/*
Compatibility
*/
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url); // get resolved path to file
const __dirname = path.dirname(__filename); // get name of directory
const compat = new FlatCompat({
baseDirectory: __dirname, // optional; default: process.cwd()
resolvePluginsRelativeTo: __dirname, // optional
recommendedConfig: js.configs.recommended, // optional unless using 'eslint:recommended'
allConfig: js.configs.all, // optional unless using 'eslint:all'
});
/*
Eslint > Flat Config
*/
export default
[
...compat.extends('eslint:recommended'),
{
ignores: [
'coverage/**',
'node_modules/**',
'**/node_modules/**',
'**/dist/**/*',
'**/__tmp__/**/*',
'eslint.config.cjs'
],
files: ['index.js'],
plugins: {
'n': pluginNode,
'import': pluginImport,
'@stylistic/js': pluginStylisticJs,
'chai-friendly': pluginChaiFriendly
},
linterOptions: {
reportUnusedDisableDirectives: false
},
languageOptions: {
globals: {
...customGlobals,
...globals.browser,
process: true, // Node.js global
_: true,
$: true
},
sourceType: 'module',
ecmaVersion: 'latest',
parserOptions: {
requireConfigFile: false
}
},
rules: {
// eslint/js rules
'one-var': 'off',
'no-throw-literal': 'off',
'camelcase': [
'error',
{
'properties': 'always'
}
],
'no-unused-vars': 'off',
'no-console': 'off',
'no-alert': 'error',
'no-debugger': 'error',
'prefer-arrow-callback': 'error',
'no-useless-escape': 'off',
'no-var': 'error',
'prefer-const': 'error',
'no-unused-expressions': 0,
'chai-friendly/no-unused-expressions': 'off',
'strict': ['error', 'never'],
'prefer-promise-reject-errors': 'off',
'no-object-constructor': 'error',
'object-shorthand': 'off',
'no-array-constructor': 'error',
'array-callback-return': 'error',
'no-eval': 'error',
'no-new-func': 'error',
'prefer-rest-params': 'error',
'prefer-spread': 'error',
'no-useless-constructor': 'error',
'no-dupe-class-members': 'error',
'no-duplicate-imports': 'error',
'eqeqeq': 'error',
'no-unneeded-ternary': 'error',
'curly': 'off',
'no-empty': 'off',
'no-restricted-syntax': [
'error',
{
'selector': 'ExportDefaultDeclaration',
'message': 'Prefer named exports'
}
],
'import/no-webpack-loader-syntax': 'off',
'import/no-relative-parent-imports': 'error',
'import/first': 'error',
'import/no-default-export': 'error',
'node/no-callback-literal': 0,
/*
@plugin eslint-plugin-n
*/
'n/no-callback-literal': 0,
'n/no-deprecated-api': 'error',
'n/no-exports-assign': 'error',
'n/no-extraneous-import': 'error',
'n/no-extraneous-require': [
'error',
{
'allowModules': ['electron', 'electron-notarize'],
'resolvePaths': [],
'tryExtensions': []
}
],
'n/no-missing-import': 'off',
'n/no-missing-require': 'off',
'n/no-mixed-requires': 'error',
'n/no-new-require': 'error',
'n/no-path-concat': 'error',
'n/no-process-env': 'off',
'n/no-process-exit': 'off',
'n/no-restricted-import': 'error',
'n/no-restricted-require': 'error',
'n/no-sync': 'off',
'n/no-unpublished-bin': 'error',
'n/no-unpublished-import': 'error',
'n/no-unpublished-require': 'error',
'n/no-unsupported-features/es-builtins': 'error',
'n/no-unsupported-features/es-syntax': 'error',
'n/no-unsupported-features/node-builtins': 'off',
'n/prefer-global/buffer': 'error',
'n/prefer-global/console': 'error',
'n/prefer-global/process': 'error',
'n/prefer-global/text-decoder': 'error',
'n/prefer-global/text-encoder': 'error',
'n/prefer-global/url': 'error',
'n/prefer-global/url-search-params': 'error',
'n/prefer-node-protocol': 'off',
'n/prefer-promises/dns': 'off',
'n/prefer-promises/fs': 'off',
'n/process-exit-as-throw': 'error',
'@stylistic/js/object-property-newline': 'off',
'@stylistic/js/no-multi-spaces': [ 0, { ignoreEOLComments: true } ],
'@stylistic/js/arrow-spacing': [ 'error', { before: true, after: true } ],
'@stylistic/js/semi-spacing': ['error', {
before: false,
after: false,
}],
"@stylistic/js/space-before-function-paren": ["error", {
anonymous: "always",
asyncArrow: "never",
named: "never"
}],
'@stylistic/js/padded-blocks': ['error', {
blocks: 'never',
switches: 'never',
classes: 'never',
}],
'@stylistic/js/arrow-parens': [ 'error', 'always' ],
'@stylistic/js/block-spacing': [ 'error', 'always' ],
'@stylistic/js/comma-dangle': [ 'error', 'never' ],
'@stylistic/js/comma-spacing': [ 'error', { before: false, after: true }],
'@stylistic/js/computed-property-spacing': ['error', 'never'],
'@stylistic/js/no-mixed-operators': ['off'],
'@stylistic/js/eol-last': ['error', 'always'],
'@stylistic/js/jsx-quotes': ['error', 'prefer-single'],
'@stylistic/js/linebreak-style': ['error', 'unix'],
'@stylistic/js/no-mixed-spaces-and-tabs': ['error'],
'@stylistic/js/no-tabs': ['error'],
'@stylistic/js/no-trailing-spaces': ['error', { skipBlankLines: true, ignoreComments: true }],
'@stylistic/js/no-whitespace-before-property': ['error'],
'@stylistic/js/object-curly-spacing': ['error', 'always'],
'@stylistic/js/quote-props': ['error', 'as-needed'],
'@stylistic/js/quotes': ['error', 'single', { allowTemplateLiterals: true }],
'@stylistic/js/semi': ['error', 'always'],
'@stylistic/js/space-infix-ops': ['error'],
'@stylistic/js/template-curly-spacing': ['error', 'always'],
'@stylistic/js/template-tag-spacing': ['error', 'always'],
'@stylistic/js/space-in-parens': [ 'error', 'always',
{
exceptions: ["{}", "[]"]
}],
'@stylistic/js/spaced-comment': [ 'error', 'always',
{
markers: ['/']
}],
'@stylistic/js/array-bracket-newline': [ 'warn',
{
multiline: true,
minItems: 5,
}],
'@stylistic/js/brace-style': [ 'error', 'allman',
{
allowSingleLine: true,
}],
'@stylistic/js/array-bracket-spacing': [ 'error', 'always',
{
arraysInArrays: false,
objectsInArrays: false,
singleValue: false,
}],
'@stylistic/js/wrap-iife': [2, 'inside', { functionPrototypeMethods: true }],
'@stylistic/js/keyword-spacing': [ 'error',
{
before: true,
after: true,
overrides:
{
return: { before: true, after: true },
throw: { before: true, after: true },
case: { before: true, after: true },
as: { before: true, after: true },
if: { before: true, after: true },
for: { before: true, after: true },
while: { before: true, after: true },
static: { before: true, after: true }
}
}],
},
},
{
files: ['root.js'],
languageOptions: {
sourceType: 'module',
ecmaVersion: 'latest',
},
rules: {
'no-console': 'off',
'no-undef': 'off',
'no-var': 'off'
}
}
];

File diff suppressed because it is too large Load Diff

View File

@@ -4,11 +4,577 @@
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"node_modules/@babel/runtime": {
"version": "7.26.9",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.9.tgz",
"integrity": "sha512-aA63XwOkcl4xxQa3HjPMqOP6LiK0ZDv3mUPYEFXkpHbaFjtGggE1A61FjFzJnB+p7/oy2gA8E+rcBNl/zC1tMg==",
"dev": true,
"license": "MIT",
"dependencies": {
"regenerator-runtime": "^0.14.0"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@types/uuid": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-10.0.0.tgz",
"integrity": "sha512-7gqG38EyHgyP1S+7+xomFtL+ZNHcKv6DwNaCZmJmo1vgMugyF3TCnXVg4t1uk89mLNwnLtnY3TpOpCOyp1/xHQ==",
"dev": true,
"license": "MIT"
},
"node_modules/all-contributors-cli": {
"version": "6.26.1",
"resolved": "https://registry.npmjs.org/all-contributors-cli/-/all-contributors-cli-6.26.1.tgz",
"integrity": "sha512-Ymgo3FJACRBEd1eE653FD1J/+uD0kqpUNYfr9zNC1Qby0LgbhDBzB3EF6uvkAbYpycStkk41J+0oo37Lc02yEw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.7.6",
"async": "^3.1.0",
"chalk": "^4.0.0",
"didyoumean": "^1.2.1",
"inquirer": "^7.3.3",
"json-fixer": "^1.6.8",
"lodash": "^4.11.2",
"node-fetch": "^2.6.0",
"pify": "^5.0.0",
"yargs": "^15.0.1"
},
"bin": {
"all-contributors": "dist/cli.js"
},
"engines": {
"node": ">=4"
},
"optionalDependencies": {
"prettier": "^2"
}
},
"node_modules/ansi-escapes": {
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
"integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"type-fest": "^0.21.3"
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"license": "MIT",
"dependencies": {
"color-convert": "^2.0.1"
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
"node_modules/async": {
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz",
"integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==",
"dev": true,
"license": "MIT"
},
"node_modules/camelcase": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"license": "MIT",
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/chardet": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz",
"integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==",
"dev": true,
"license": "MIT"
},
"node_modules/cli-cursor": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
"integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",
"dev": true,
"license": "MIT",
"dependencies": {
"restore-cursor": "^3.1.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/cli-width": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz",
"integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==",
"dev": true,
"license": "ISC",
"engines": {
"node": ">= 10"
}
},
"node_modules/cliui": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
"integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
"dev": true,
"license": "ISC",
"dependencies": {
"string-width": "^4.2.0",
"strip-ansi": "^6.0.0",
"wrap-ansi": "^6.2.0"
}
},
"node_modules/color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"color-name": "~1.1.4"
},
"engines": {
"node": ">=7.0.0"
}
},
"node_modules/color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"license": "MIT"
},
"node_modules/commander": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz",
"integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 6"
}
},
"node_modules/cross-spawn": {
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
"dev": true,
"license": "MIT",
"dependencies": {
"path-key": "^3.1.0",
"shebang-command": "^2.0.0",
"which": "^2.0.1"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/decamelize": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
"integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/didyoumean": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
"integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==",
"dev": true,
"license": "Apache-2.0"
},
"node_modules/emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true,
"license": "MIT"
},
"node_modules/env-cmd": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/env-cmd/-/env-cmd-10.1.0.tgz",
"integrity": "sha512-mMdWTT9XKN7yNth/6N6g2GuKuJTsKMDHlQFUDacb/heQRRWOTIZ42t1rMHnQu4jYxU1ajdTeJM+9eEETlqToMA==",
"dev": true,
"license": "MIT",
"dependencies": {
"commander": "^4.0.0",
"cross-spawn": "^7.0.0"
},
"bin": {
"env-cmd": "bin/env-cmd.js"
},
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/external-editor": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz",
"integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==",
"dev": true,
"license": "MIT",
"dependencies": {
"chardet": "^0.7.0",
"iconv-lite": "^0.4.24",
"tmp": "^0.0.33"
},
"engines": {
"node": ">=4"
}
},
"node_modules/figures": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
"integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==",
"dev": true,
"license": "MIT",
"dependencies": {
"escape-string-regexp": "^1.0.5"
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/find-up": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
"dev": true,
"license": "MIT",
"dependencies": {
"locate-path": "^5.0.0",
"path-exists": "^4.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/get-caller-file": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
"dev": true,
"license": "ISC",
"engines": {
"node": "6.* || 8.* || >= 10.*"
}
},
"node_modules/has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
"dev": true,
"license": "MIT",
"dependencies": {
"safer-buffer": ">= 2.1.2 < 3"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/inquirer": {
"version": "7.3.3",
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz",
"integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==",
"dev": true,
"license": "MIT",
"dependencies": {
"ansi-escapes": "^4.2.1",
"chalk": "^4.1.0",
"cli-cursor": "^3.1.0",
"cli-width": "^3.0.0",
"external-editor": "^3.0.3",
"figures": "^3.0.0",
"lodash": "^4.17.19",
"mute-stream": "0.0.8",
"run-async": "^2.4.0",
"rxjs": "^6.6.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0",
"through": "^2.3.6"
},
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
"dev": true,
"license": "ISC"
},
"node_modules/json-fixer": {
"version": "1.6.15",
"resolved": "https://registry.npmjs.org/json-fixer/-/json-fixer-1.6.15.tgz",
"integrity": "sha512-TuDuZ5KrgyjoCIppdPXBMqiGfota55+odM+j2cQ5rt/XKyKmqGB3Whz1F8SN8+60yYGy/Nu5lbRZ+rx8kBIvBw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.18.9",
"chalk": "^4.1.2",
"pegjs": "^0.10.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/locate-path": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
"integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
"dev": true,
"license": "MIT",
"dependencies": {
"p-locate": "^4.1.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true,
"license": "MIT"
},
"node_modules/lodash.clonedeep": { "node_modules/lodash.clonedeep": {
"version": "4.5.0", "version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
"integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==" "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ=="
}, },
"node_modules/mimic-fn": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
"integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/mute-stream": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
"dev": true,
"license": "ISC"
},
"node_modules/node-fetch": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
"integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
"dev": true,
"license": "MIT",
"dependencies": {
"whatwg-url": "^5.0.0"
},
"engines": {
"node": "4.x || >=6.0.0"
},
"peerDependencies": {
"encoding": "^0.1.0"
},
"peerDependenciesMeta": {
"encoding": {
"optional": true
}
}
},
"node_modules/onetime": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
"integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
"dev": true,
"license": "MIT",
"dependencies": {
"mimic-fn": "^2.1.0"
},
"engines": {
"node": ">=6"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/os-tmpdir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
"integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/p-limit": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
"dev": true,
"license": "MIT",
"dependencies": {
"p-try": "^2.0.0"
},
"engines": {
"node": ">=6"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/p-locate": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
"integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
"dev": true,
"license": "MIT",
"dependencies": {
"p-limit": "^2.2.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/p-try": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/path-exists": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/path-key": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/pegjs": {
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/pegjs/-/pegjs-0.10.0.tgz",
"integrity": "sha512-qI5+oFNEGi3L5HAxDwN2LA4Gg7irF70Zs25edhjld9QemOgp0CbvMtbFcMvFtEo1OityPrcCzkQFB8JP/hxgow==",
"dev": true,
"license": "MIT",
"bin": {
"pegjs": "bin/pegjs"
},
"engines": {
"node": ">=0.10"
}
},
"node_modules/pify": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-5.0.0.tgz",
"integrity": "sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/playwright": { "node_modules/playwright": {
"version": "1.50.1", "version": "1.50.1",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.50.1.tgz", "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.50.1.tgz",
@@ -39,6 +605,216 @@
"node": ">=18" "node": ">=18"
} }
}, },
"node_modules/prettier": {
"version": "2.8.8",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
"dev": true,
"license": "MIT",
"optional": true,
"bin": {
"prettier": "bin-prettier.js"
},
"engines": {
"node": ">=10.13.0"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
}
},
"node_modules/regenerator-runtime": {
"version": "0.14.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
"integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==",
"dev": true,
"license": "MIT"
},
"node_modules/require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
"integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/require-main-filename": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
"dev": true,
"license": "ISC"
},
"node_modules/restore-cursor": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",
"integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",
"dev": true,
"license": "MIT",
"dependencies": {
"onetime": "^5.1.0",
"signal-exit": "^3.0.2"
},
"engines": {
"node": ">=8"
}
},
"node_modules/run-async": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz",
"integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.12.0"
}
},
"node_modules/rxjs": {
"version": "6.6.7",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",
"integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"tslib": "^1.9.0"
},
"engines": {
"npm": ">=2.0.0"
}
},
"node_modules/safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
"dev": true,
"license": "MIT"
},
"node_modules/set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
"integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",
"dev": true,
"license": "ISC"
},
"node_modules/shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
"dev": true,
"license": "MIT",
"dependencies": {
"shebang-regex": "^3.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/shebang-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/signal-exit": {
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
"dev": true,
"license": "ISC"
},
"node_modules/string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"dev": true,
"license": "MIT",
"dependencies": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dev": true,
"license": "MIT",
"dependencies": {
"ansi-regex": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"license": "MIT",
"dependencies": {
"has-flag": "^4.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/through": {
"version": "2.3.8",
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
"integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==",
"dev": true,
"license": "MIT"
},
"node_modules/tmp": {
"version": "0.0.33",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
"integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
"dev": true,
"license": "MIT",
"dependencies": {
"os-tmpdir": "~1.0.2"
},
"engines": {
"node": ">=0.6.0"
}
},
"node_modules/tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
"dev": true,
"license": "MIT"
},
"node_modules/tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
"dev": true,
"license": "0BSD"
},
"node_modules/type-fest": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz",
"integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==",
"dev": true,
"license": "(MIT OR CC0-1.0)",
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/user-agents": { "node_modules/user-agents": {
"version": "1.1.457", "version": "1.1.457",
"resolved": "https://registry.npmjs.org/user-agents/-/user-agents-1.1.457.tgz", "resolved": "https://registry.npmjs.org/user-agents/-/user-agents-1.1.457.tgz",
@@ -47,6 +823,120 @@
"dependencies": { "dependencies": {
"lodash.clonedeep": "^4.5.0" "lodash.clonedeep": "^4.5.0"
} }
},
"node_modules/uuid": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz",
"integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==",
"dev": true,
"funding": [
"https://github.com/sponsors/broofa",
"https://github.com/sponsors/ctavan"
],
"license": "MIT",
"bin": {
"uuid": "dist/esm/bin/uuid"
}
},
"node_modules/webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
"dev": true,
"license": "BSD-2-Clause"
},
"node_modules/whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"dev": true,
"license": "MIT",
"dependencies": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"node_modules/which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
"dev": true,
"license": "ISC",
"dependencies": {
"isexe": "^2.0.0"
},
"bin": {
"node-which": "bin/node-which"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/which-module": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz",
"integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==",
"dev": true,
"license": "ISC"
},
"node_modules/wrap-ansi": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
"integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
"dev": true,
"license": "MIT",
"dependencies": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/y18n": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz",
"integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==",
"dev": true,
"license": "ISC"
},
"node_modules/yargs": {
"version": "15.4.1",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
"integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
"dev": true,
"license": "MIT",
"dependencies": {
"cliui": "^6.0.0",
"decamelize": "^1.2.0",
"find-up": "^4.1.0",
"get-caller-file": "^2.0.1",
"require-directory": "^2.1.1",
"require-main-filename": "^2.0.0",
"set-blocking": "^2.0.0",
"string-width": "^4.2.0",
"which-module": "^2.0.0",
"y18n": "^4.0.0",
"yargs-parser": "^18.1.2"
},
"engines": {
"node": ">=8"
}
},
"node_modules/yargs-parser": {
"version": "18.1.3",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
"integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
"dev": true,
"license": "ISC",
"dependencies": {
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
},
"engines": {
"node": ">=6"
}
} }
} }
} }

3389
tvapp2/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +1,11 @@
{ {
"name": "tvapp2", "name": "tvapp2",
"version": "1.0.0", "version": "1.1.0",
"description": "This package allows you to generate M3U playlists and EPG guides from various online IPTV services.", "description": "This package allows you to generate M3U playlists and EPG guides from various online IPTV services.",
"author": "BinaryNinja", "author": "BinaryNinja",
"license": "MIT", "license": "MIT",
"main": "index.js", "main": "index.js",
"type": "module",
"build": { "build": {
"appId": "com.tvapp2.id" "appId": "com.tvapp2.id"
}, },
@@ -15,6 +16,14 @@
"type": "git", "type": "git",
"url": "https://github.com/TheBinaryNinja/tvapp2.git" "url": "https://github.com/TheBinaryNinja/tvapp2.git"
}, },
"discord": {
"type": "invite",
"code": "HGv4eGr2kg",
"url": "https://discord.gg/HGv4eGr2kg"
},
"docs": {
"url": "https://thebinaryninja.github.io/tvapp2/"
},
"contributors": [ "contributors": [
{ {
"name": "Aetherinox", "name": "Aetherinox",
@@ -39,10 +48,10 @@
], ],
"scripts": { "scripts": {
"start": "node index.js", "start": "node index.js",
"docker:build:amd64": "docker build --network=host --build-arg VERSION=$npm_config_version --build-arg BUILDDATE=$npm_config_builddate -t tvapp2:latest -t tvapp2:$npm_config_version -t tvapp2:$npm_config_version-amd64 -f Dockerfile .", "docker:build:amd64": "docker build --network=host --build-arg ARCH=amd64 --build-arg VERSION=$npm_config_version --build-arg BUILDDATE=$npm_config_builddate -t tvapp2:latest -t tvapp2:$npm_config_version -t tvapp2:$npm_config_version-amd64 -f Dockerfile .",
"docker:build:arm64": "docker build --network=host --build-arg VERSION=$npm_config_version --build-arg BUILDDATE=$npm_config_builddate -t tvapp2:$npm_config_version-arm64 -f Dockerfile.aarch64 .", "docker:build:arm64": "docker build --network=host --build-arg ARCH=arm64 --build-arg VERSION=$npm_config_version --build-arg BUILDDATE=$npm_config_builddate -t tvapp2:$npm_config_version-arm64 -f Dockerfile.aarch64 .",
"docker:buildx:amd64": "docker buildx create --driver docker-container --name container --bootstrap --use && docker buildx build --no-cache --pull --build-arg VERSION=$npm_config_version --build-arg BUILDDATE=$npm_config_builddate -t tvapp2:latest -t tvapp2:$npm_config_version --platform=linux/amd64 --output type=docker --output type=docker .", "docker:buildx:amd64": "docker buildx create --driver docker-container --name container --bootstrap --use && docker buildx build --no-cache --pull --build-arg ARCH=amd64 --build-arg VERSION=$npm_config_version --build-arg BUILDDATE=$npm_config_builddate -t tvapp2:latest -t tvapp2:$npm_config_version --platform=linux/amd64 --output type=docker --output type=docker .",
"docker:buildx:arm64": "docker buildx create --driver docker-container --name container --bootstrap --use && docker buildx build --no-cache --pull --build-arg VERSION=$npm_config_version --build-arg BUILDDATE=$npm_config_builddate -t tvapp2:latest -t tvapp2:$npm_config_version --platform=linux/arm64 --output type=docker --output type=docker .", "docker:buildx:arm64": "docker buildx create --driver docker-container --name container --bootstrap --use && docker buildx build --no-cache --pull --build-arg ARCH=arm64 --build-arg VERSION=$npm_config_version --build-arg BUILDDATE=$npm_config_builddate -t tvapp2:latest -t tvapp2:$npm_config_version --platform=linux/arm64 --output type=docker --output type=docker .",
"env-version": "node -p require('./package.json').version;", "env-version": "node -p require('./package.json').version;",
"contrib:add": "all-contributors add", "contrib:add": "all-contributors add",
"contrib:generate": "all-contributors generate", "contrib:generate": "all-contributors generate",
@@ -65,14 +74,23 @@
"iptv" "iptv"
], ],
"dependencies": { "dependencies": {
"playwright": "^1.50.1", "playwright": "^1.51.0",
"user-agents": "^1.1.457" "user-agents": "^1.1.480",
"chalk": "^5.3.0",
"ejs": "^3.1.10",
"moment": "2.30.1"
}, },
"devDependencies": { "devDependencies": {
"@types/uuid": "^10.0.0", "@types/uuid": "^10.0.0",
"all-contributors-cli": "^6.26.1", "all-contributors-cli": "^6.26.1",
"uuid": "^11.1.0", "uuid": "^11.1.0",
"env-cmd": "^10.1.0" "env-cmd": "^10.1.0",
"eslint": "9.17.0",
"eslint-plugin-chai-friendly": "^1.0.1",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-n": "17.15.0",
"eslint-plugin-promise": "7.2.1",
"@stylistic/eslint-plugin-js": "^3.1.0"
}, },
"engines": { "engines": {
"node": ">=20" "node": ">=20"

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node #!/usr/bin/env node
/* eslint-disable @typescript-eslint/no-var-requires */
/* /*
build by running build by running
@@ -32,8 +31,8 @@
- npm run env-version - npm run env-version
*/ */
const fs = require('fs') import fs from 'fs';
const { v5: uuid } = require('uuid') import { v5 as uuidv5 } from 'uuid';
/* /*
* declarations package.json * declarations package.json
@@ -56,8 +55,8 @@ if (action === 'guid') {
} }
}) })
} else if (action === 'generate') { } else if (action === 'generate') {
const buildGuid = uuid(`${repository.url}`, uuid.URL) const buildGuid = uuidv5(`${repository.url}`, uuidv5.URL)
const buildUuid = uuid(version, buildGuid) const buildUuid = uuidv5(version, buildGuid)
const ids = ` const ids = `
VERSION=${version} VERSION=${version}

461
tvapp2/www/css/tvapp2.min.css vendored Normal file
View File

@@ -0,0 +1,461 @@
body
{
background-color: #f8f9fa;
padding-bottom: 20px;
overflow: auto;
}
@media (prefers-color-scheme: dark)
{
body
{
background-color: #262626;
color: #fff;
}
}
@-webkit-keyframes fade-in
{
from { opacity: 0.6; }
to { opacity: 1; }
}
@-moz-keyframes fade-in
{
from { opacity: 0.6; }
to { opacity: 1; }
}
@keyframes fade-in
{
from { opacity: 0.6; }
to { opacity: 1; }
}
@keyframes scale-in
{
from {
transform: scale(1, 1);
}
to {
transform: scale(1.1, 1.1);
}
}
.container
{
text-align: left;
}
.container nav
{
margin-left: -8px;
}
.container .about
{
padding-left: 8px;
padding-bottom: 4vh;
font-size: clamp(0.5em, 1vw, 0.8em);
line-height: 1.6;
font-weight: 100;
}
.breadcrumb
{
background-color: transparent;
padding: 0rem 1rem;
}
.breadcrumb .breadcrumb-item a
{
color: #4caf50;
}
html
{
position: relative;
min-height: 100%;
}
a
{
color: #FF0E7F !important;
text-decoration: underline dotted #606060;
font-weight: 600;
}
a:hover
{
color: #FFF !important;
text-decoration: underline dotted #FF0048;
font-weight: 600;
}
p
{
margin-top: 0;
margin-bottom: 0;
}
.container {
width: 100%;
padding: 0px;
margin-right: auto;
margin-left: auto;
}
.header .logo
{
animation-name: fade-in, scale-in;
animation-duration: 1s, 0.5s;
animation-timing-function: ease-in, linear;
animation-direction: alternate, alternate;
animation-iteration-count: infinite, 1;
transition: all 0.3s;
opacity: 0.5;
transform: scale(1.1);
}
.footer
{
position: absolute;
bottom: 0;
width: 100%;
margin: 0;
padding-top: 20px;
}
.footer-inner
{
margin: 0;
padding-bottom: 20px;
padding-top: 20px;
background-color: #151515;
}
.footer a,
.footer a:focus,
.footer a:hover
{
color: #FFFFFF;
}
.footer a
{
color: #f7296c;
}
.navbar
{
padding: 15px 0;
}
.header
{
background-color: #a82147;
color: #fff;
height: 55px;
}
.header .navbar-brand
{
padding: 0 8px;
font-size: 16px;
line-height: 24px;
height: 24px;
}
.header a
{
color: #FFF !important;
text-decoration: none;
padding-left: 7px;
}
#breadcrumbs::before
{
margin-top: 4px;
padding-right: 15px;
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512' fill='white' width='19px' height='19px'%3E%3Cdefs%3E%3Cstyle%3E.fa-secondary%7Bopacity:.4%7D%3C/style%3E%3C/defs%3E%3Cpath class='fa-primary' d='M160 384H512c35.3 0 64-28.7 64-64V160c0-35.3-28.7-64-64-64H394.5c-17 0-33.3-6.7-45.3-18.7L322.7 50.7c-12-12-28.3-18.7-45.3-18.7H160c-35.3 0-64 28.7-64 64V320c0 35.3 28.7 64 64 64z'%3E%3C/path%3E%3Cpath class='fa-secondary' d='M24 96c13.3 0 24 10.7 24 24V344c0 48.6 39.4 88 88 88H456c13.3 0 24 10.7 24 24s-10.7 24-24 24H136C60.9 480 0 419.1 0 344V120c0-13.3 10.7-24 24-24z'%3E%3C/path%3E%3C/svg%3E");
}
.breadcrumb-item.active
{
color: #6c757d;
padding-left: 10px;
}
.breadcrumb
{
padding-top: 30px;
}
.header-container
{
padding-top: 30px;
}
#list a,
#list a:focus
{
color: #ff286e !important;
font-weight: 100;
}
#list a:hover
{
color: #FFF !important;
text-decoration: underline dotted #FF0048;
font-weight: 100;
}
#list colgroup
{
display: none;
}
#list .file
{
word-break: keep-all;
white-space: normal;
min-width: 7vw !important;
text-wrap: nowrap;
font-size: clamp(0.5em, 1vw, 0.8em);
font-weight: 800;
vertical-align: middle;
}
#list .file a
{
font-weight: 800;
}
#list .link
{
word-break: break-all;
white-space: normal;
min-width: 9vw !important;
text-wrap: nowrap;
font-size: clamp(0.5em, 1vw, 0.8em);
vertical-align: middle;
}
#list .icon
{
font-size: 2.2vmin;
vertical-align: middle;
}
#list .size
{
min-width: 5vw !important;
font-size: clamp(0.5em, 1vw, 0.8em);
word-break: break-all;
white-space: normal;
text-wrap: nowrap;
vertical-align: middle;
}
#list .date
{
min-width: 5vw !important;
font-size: clamp(0.5em, 1vw, 0.8em);
word-break: break-all;
white-space: normal;
text-wrap: nowrap;
vertical-align: middle;
}
#list .desc
{
font-size: clamp(0.5em, 1vw, 0.8em);
vertical-align: middle;
}
.navbar-social svg
{
font-size: clamp(0.7em, 2vw, 1.1em);
padding-top: 2px;
padding-left: 10px;
}
.navbar-social svg:hover
{
animation-name: fade-in, scale-in;
animation-duration: 1s, 0.5s;
animation-timing-function: ease-in, linear;
animation-direction: alternate, alternate;
animation-iteration-count: infinite, 1;
transition: all 0.3s;
opacity: 1;
transform: scale(1.8);
}
.table thead th a
{
color: #9b9b9b !important;
font-weight: normal;
}
.table td, .table th
{
padding: .75rem;
vertical-align: baseline;
border-top: 0px solid #dee2e6;
font-size: clamp(0.5em, 1vw, 0.8em);
line-height: 1.6;
}
.table thead tr
{
border-bottom: 2px solid #575757;
background-color: #181818;
color: #717171;
}
.table thead th
{
vertical-align: bottom;
border-bottom: 0px solid #575757;
font-size: clamp(0.5em, 1vw, 0.8em);
line-height: 2.5vmin;
}
.table-hover tbody tr:hover
{
background-color: rgba(155, 155, 155, 0.075);
}
.text-accent
{
font-weight: bold;
color: #d0c273;
}
#warning-firewall
{
background-color: #1A1A1A;
padding: 2vh;
margin-bottom: 1vh;
font-size: clamp(0.5em, 1vw, 0.8em);
font-weight: 100;
border: 1px dashed #FF6C00;
width: 100%;
line-height: 25px;
}
#warning-localhost
{
background-color: #1A1A1A;
padding: 2vh;
font-size: clamp(0.5em, 1vw, 0.8em);
font-weight: 100;
border: 1px dashed #FF0048;
width: 100%;
line-height: 25px;
}
span.notice
{
color: #FFF;
background-color: #97950A;
padding-left: 7px;
padding-right: 7px;
padding-top: 2px;
padding-bottom: 2px;
font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
margin-right: 8px;
animation-name: fade-in, scale-in;
animation-duration: 1s, 0.5s;
animation-timing-function: ease-in, linear;
animation-direction: alternate, alternate;
animation-iteration-count: infinite, 1;
transition: all 0.3s;
opacity: 0.5;
transform: scale(1.1);
}
span.warning
{
color: #FFF;
background-color: #aa102d;
padding-left: 7px;
padding-right: 7px;
padding-top: 2px;
padding-bottom: 2px;
font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
margin-right: 8px;
animation-name: fade-in, scale-in;
animation-duration: 1s, 0.5s;
animation-timing-function: ease-in, linear;
animation-direction: alternate, alternate;
animation-iteration-count: infinite, 1;
transition: all 0.3s;
opacity: 0.5;
transform: scale(1.1);
}
code
{
font-size: 96%;
color: #ff4985;
word-break: break-word;
padding-right: 5px;
padding-left: 4px;
}
@media (prefers-color-scheme: dark)
{
#list a,
#list a:focus,
#list a:hover {
color: #fff;
}
}
.col, .col-1, .col-10, .col-11, .col-12, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-auto, .col-lg, .col-lg-1, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-auto, .col-md, .col-md-1, .col-md-10, .col-md-11, .col-md-12, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-auto, .col-sm, .col-sm-1, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-auto, .col-xl, .col-xl-1, .col-xl-10, .col-xl-11, .col-xl-12, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-auto {
position: relative;
width: auto;
min-height: 1px;
padding-right: 15px;
padding-left: 15px;
}
.fixed-top
{
position: fixed;
top: 0;
right: 0;
left: 0;
z-index: 999;
}
.fixed-bottom
{
position: fixed;
right: 0;
bottom: 0;
left: 0;
z-index: 999;
}
.sticky-top
{
@supports (position: sticky)
{
position: sticky;
top: 0;
z-index: 999;
}
}
.sticky-bottom
{
@supports (position: sticky)
{
position: sticky;
bottom: 0;
z-index: 999;
}
}

BIN
tvapp2/www/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

183
tvapp2/www/index.html Normal file
View File

@@ -0,0 +1,183 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title><%= appName %> - v<%= appVersion %></title>
<meta name="robots" content="noindex, nofollow">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<link rel="stylesheet" href="css/tvapp2.min.css">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<div class="header">
<nav class="navbar sticky-top container">
<div class="navbar-brand">
<i class="logo fa-sharp-duotone fa-regular fa-tv" style="--fa-primary-color: rgb(255, 255, 255); --fa-secondary-color: rgb(255, 255, 255);" aria-hidden="true"></i>
<a class="header-name" href="https://github.com/Aetherinox/thetvapp-docker">TVApp2 for Docker</a>
</div>
<div class="navbar-social">
<a href="<%= appUrlDocs %>"><i class="logo fa-duotone fa-solid fa-book-open-cover" style="--fa-primary-color: rgb(255, 255, 255); --fa-secondary-color: rgb(255, 255, 255);" aria-hidden="true"></i></a>
<a href="<%= appUrlGithub %>"><i class="logo fa-logos fa-github" style="--fa-primary-color: rgb(255, 255, 255); --fa-secondary-color: rgb(255, 255, 255);" aria-hidden="true"></i></a>
<a href="<%= appUrlDiscord %>"><i class="logo fa-logos fa-discord" style="--fa-primary-color: rgb(255, 255, 255); --fa-secondary-color: rgb(255, 255, 255);" aria-hidden="true"></i></a>
</div>
</nav>
</div>
<div class="container">
<div class="container header-container">
<div class="row">
<div class="col">
<div class="about">This page displays your most recent copies of the <code><%= fileM3U %></code> playlist and <code><%= fileXML %></code> EPG guide data. Right-click each file, select <span class="text-accent">Copy Link</span> and paste the URLs within an IPTV app such as Jellyfin. The <code><%= fileXML %></code> and <code><%= fileTAR %></code> have identical guide data, however the <code><%= fileTAR %></code> is compressed and will import into your IPTV application much faster.</div>
</div>
</div>
</div>
<div class="container main-container">
<table id="list" class="table table-sm table-hover">
<thead>
<tr class="d-none d-md-table-row">
<td class="icon cell-icon"></td>
<th class="file cell-file">
File Name
</th>
<th class="link cell-link">
Download
</th>
<th class="size cell-size">
Size
</th>
<th class="date cell-size">
Date
</th>
<th class="desc cell-desc">
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td class="icon cell-icon">
<svg class="svg-inline--fa fa-file-lines fa-fw" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="file-lines" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512" data-fa-i2svg="">
<path fill="currentColor" d="M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64zM256 0V128H384L256 0zM112 256H272c8.8 0 16 7.2 16 16s-7.2 16-16 16H112c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64H272c8.8 0 16 7.2 16 16s-7.2 16-16 16H112c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64H272c8.8 0 16 7.2 16 16s-7.2 16-16 16H112c-8.8 0-16-7.2-16-16s7.2-16 16-16z"></path>
</svg>
<!-- <i class="fa fa-fw fa-solid fa-file-lines" aria-hidden="true"></i> -->
</td>
<td class="file cell-file">
<a id="m3u-name" target="_blank"></a>
</td>
<td class="link cell-link"><a id="m3u-link" target="_blank"></a></td>
<td class="size cell-size"><span id="m3u-size"></span></td>
<td class="date cell-date"><span id="m3u-date"></span></td>
<td class="desc cell-desc">Playlist data file which contains a list of all channels, their associated group, and logo URL.</td>
</tr>
<tr>
<td class="icon cell-icon">
<svg class="svg-inline--fa fa-file-xml fa-fw" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="file-xml" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" data-fa-i2svg="">
<path fill="currentColor" d="M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V304H176c-35.3 0-64 28.7-64 64V512H64c-35.3 0-64-28.7-64-64V64zm384 64H256V0L384 128zM192 368c0 7.3 2.2 14.4 6.2 20.4l9.8 14.7 9.8-14.7c4-6.1 6.2-13.2 6.2-20.4c0-8.8 7.2-16 16-16s16 7.2 16 16c0 13.6-4 26.9-11.6 38.2L227.2 432l17.2 25.8C252 469.1 256 482.4 256 496c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-7.3-2.2-14.4-6.2-20.4L208 460.8l-9.8 14.7c-4 6.1-6.2 13.2-6.2 20.4c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-13.6 4-26.9 11.6-38.2L188.8 432l-17.2-25.8C164 394.9 160 381.6 160 368c0-8.8 7.2-16 16-16s16 7.2 16 16zM448 496V368c0-8.8 7.2-16 16-16s16 7.2 16 16V480h16c8.8 0 16 7.2 16 16s-7.2 16-16 16H464c-8.8 0-16-7.2-16-16zM299.7 352.6c6.9-1.9 14.3 1 18 7.2L352 416.9l34.3-57.1c3.7-6.2 11.1-9.1 18-7.2s11.7 8.2 11.7 15.4V496c0 8.8-7.2 16-16 16s-16-7.2-16-16V425.8l-18.3 30.5c-2.9 4.8-8.1 7.8-13.7 7.8s-10.8-2.9-13.7-7.8L320 425.8V496c0 8.8-7.2 16-16 16s-16-7.2-16-16V368c0-7.2 4.8-13.5 11.7-15.4z"></path>
</svg>
<!-- <i class="fa fa-fw fa-solid fa-file-lines" aria-hidden="true"></i> -->
</td>
<td class="file cell-file">
<a id="xml-name" target="_blank"></a>
</td>
<td class="link cell-link"><a id="xml-link" target="_blank"></a></td>
<td class="size cell-size"><span id="xml-size"></span></td>
<td class="date cell-date"><span id="xml-date"></span></td>
<td class="desc cell-desc">XML / EPG guide data which contains a list of all programs which are scheduled to play on a specific channel.</td>
</tr>
<tr>
<td class="icon cell-icon">
<svg class="svg-inline--fa fa-file-zipper fa-fw" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="file-zipper" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512" data-fa-i2svg="">
<path fill="currentColor" d="M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64zM256 0V128H384L256 0zM96 48c0-8.8 7.2-16 16-16h32c8.8 0 16 7.2 16 16s-7.2 16-16 16H112c-8.8 0-16-7.2-16-16zm0 64c0-8.8 7.2-16 16-16h32c8.8 0 16 7.2 16 16s-7.2 16-16 16H112c-8.8 0-16-7.2-16-16zm0 64c0-8.8 7.2-16 16-16h32c8.8 0 16 7.2 16 16s-7.2 16-16 16H112c-8.8 0-16-7.2-16-16zm-6.3 71.8c3.7-14 16.4-23.8 30.9-23.8h14.8c14.5 0 27.2 9.7 30.9 23.8l23.5 88.2c1.4 5.4 2.1 10.9 2.1 16.4c0 35.2-28.8 63.7-64 63.7s-64-28.5-64-63.7c0-5.5 .7-11.1 2.1-16.4l23.5-88.2zM112 336c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H112z"></path>
</svg>
<!-- <i class="fa fa-fw fa-solid fa-file-lines" aria-hidden="true"></i> -->
</td>
<td class="file cell-tar">
<a id="tar-name" target="_blank"></a>
</td>
<td class="link cell-link"><a id="tar-link" target="_blank"></a></td>
<td class="size cell-size"><span id="tar-size"></span></td>
<td class="date cell-date"><span id="tar-date"></span></td>
<td class="desc cell-desc">XML / EPG guide data in compressed gzip format</td>
</tr>
</tbody>
</table>
</div>
</div>
<footer class="footer">
<div class="container" style="padding-bottom:20px;">
<div id="warning-firewall" class="sticky-bottom"></div>
<div id="warning-localhost" class="sticky-bottom"></div>
</div>
<div class="footer-inner">
<div class="container">
<div class="col text-center text-muted text-small text-nowrap">
<small>Developed by BinaryNinja - <a href="https://github.com/thebinaryninja/tvapp2"><%= appName %></a> - v<%= appVersion %></small><br />
<small>This utility is for educational purposes only</small>
</div>
</div>
</div>
</footer>
<script>
const urlBase = window.location.origin;
const urlM3U = urlBase + "/playlist";
const urlXML = urlBase + "/epg";
const urlTAR = urlBase + "/gzip";
document.getElementById("m3u-name").textContent = "<%= fileM3U %>";
document.getElementById("m3u-name").href = urlM3U;
document.getElementById("m3u-link").textContent = urlM3U;
document.getElementById("m3u-link").href = urlM3U;
document.getElementById("m3u-size").textContent = "<%= sizeM3U %>";
document.getElementById("m3u-date").textContent = "<%= dateM3U %>";
document.getElementById("xml-name").textContent = "<%= fileXML %>";
document.getElementById("xml-name").href = urlXML;
document.getElementById("xml-link").textContent = urlXML;
document.getElementById("xml-link").href = urlXML;
document.getElementById("xml-size").textContent = "<%= sizeXML %>";
document.getElementById("xml-date").textContent = "<%= dateXML %>";
document.getElementById("tar-name").textContent = "<%= fileTAR %>";
document.getElementById("tar-name").href = urlTAR;
document.getElementById("tar-link").textContent = urlTAR;
document.getElementById("tar-link").href = urlTAR;
document.getElementById("tar-size").textContent = "<%= sizeTAR %>";
document.getElementById("tar-date").textContent = "<%= dateTAR %>";
</script>
<script>
document.addEventListener("DOMContentLoaded", function()
{
const host = window.location.hostname;
if (host === "localhost" || host === "127.0.0.1")
{
const warning = document.createElement("div");
warning.innerHTML = "<p><span class='warning'>Warning</span> If you are accessing this page via 127.0.0.1 or localhost, proxying will not work on other devices.Please load \
this page using your computer's IP address (e.g., 192.168.x.x) and port in order to access the playlist from other devices on your network.</p> \
<br> \
<p> Learn how to locate your IP address on <a href='https://youtube.com/watch?v=UAhDHXN2c6E' target = '_blank' > Windows</a> or \
<a href='https://youtube.com/watch?v=gaIYP4TZfHI' target = '_blank' > Linux</a>.</p>";
document.getElementById("warning-localhost").appendChild(warning);
} else {
document.getElementById("warning-localhost").style.display = "none";
}
});
document.addEventListener("DOMContentLoaded", function()
{
const port = window.location.port || (window.location.protocol === "https:" ? "443" : "80");
const warningMessage = "<p><span class='notice'>Notice</span> Port <strong> " + port + " </strong> must be open and allowed through your <a href='https://youtu.be/zOZWlTplrcA?si=nGXrHKU4sAQsy18e&t=18 target='_blank'>Windows</a> \
or <a href='https://youtu.be/7c_V_3nWWbA?si=Hkd_II9myn-AkNnS&t=12' target='_blank'>Linux</a> OS firewall settings \
This action enables devices such as Firestick or Android to connect to the server and request the playlist through the proxy.</p>";
document.getElementById("warning-firewall").innerHTML = warningMessage;
});
</script>
<script src="js/tvapp2.min.js"></script>
</body>
</html>

1
tvapp2/www/js/tvapp2.min.js vendored Normal file

File diff suppressed because one or more lines are too long