mirror of
https://github.com/TheBinaryNinja/tvapp2.git
synced 2026-06-11 19:05:41 -04:00
Compare commits
260 Commits
1.2.0
...
2x-feature
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
82fb6c3bcd | ||
|
|
a697acc0f3 | ||
| 7046428246 | |||
|
|
245034a43a | ||
|
|
986e83632b | ||
|
|
30aa901b4d | ||
|
|
321a0e8540 | ||
|
|
cb8f769e34 | ||
|
|
38ff77a04e | ||
|
|
292cd8dd94 | ||
|
|
3878059314 | ||
|
|
7a7e50c7ba | ||
|
|
564dd536fc | ||
|
|
0e29805351 | ||
| dc76267da3 | |||
| 147b11b22d | |||
|
|
b992e4ff01 | ||
|
|
b46a922464 | ||
| d4abc705a0 | |||
| 454d13c608 | |||
|
|
6086dbbad2 | ||
|
|
b9607dddce | ||
|
|
1a7aeb4450 | ||
|
|
d973af6a8d | ||
|
2dae279f93
|
|||
|
09d17717ab
|
|||
|
bf4454f635
|
|||
|
9e531d823f
|
|||
| d17aa23e98 | |||
| 63f7c1d665 | |||
|
c5c2f741f0
|
|||
|
ec24c51eea
|
|||
|
fa2c4073e3
|
|||
|
255d093269
|
|||
|
73a264b1c2
|
|||
|
|
c112230e05 | ||
|
|
02dd911e93 | ||
|
9c3ee3d146
|
|||
|
4c8d5d03d9
|
|||
|
c729594864
|
|||
|
713626810b
|
|||
|
6e5c261065
|
|||
|
2f1027e068
|
|||
|
739f547731
|
|||
|
3f7ecdb84e
|
|||
|
e037764c3f
|
|||
|
c8aa866dfd
|
|||
|
84b1199878
|
|||
|
04150d5320
|
|||
|
11ccf2909f
|
|||
|
631942ca75
|
|||
|
4ee603d7a2
|
|||
|
7cfe22b72e
|
|||
|
e6701cda95
|
|||
|
865a2fd645
|
|||
|
05f362153f
|
|||
|
997eb72378
|
|||
|
69805151c8
|
|||
|
47ec5267ec
|
|||
|
3a87b51f41
|
|||
|
ffc8cfe68e
|
|||
|
7f5fffa5e6
|
|||
|
b16f4a9fb3
|
|||
|
ebf0b84a05
|
|||
|
b724930c6a
|
|||
|
603e444d35
|
|||
|
f274b807f2
|
|||
|
d0c8920b98
|
|||
|
4c0d49508f
|
|||
|
2a09bc1ea3
|
|||
|
259d27a2ce
|
|||
|
|
8aefbb39e0 | ||
|
|
e417b9f5d8 | ||
|
|
9458587d59 | ||
|
|
468c8c10fc | ||
|
|
6d90a88b60 | ||
|
|
7231199f9e | ||
|
|
41c0c9f685 | ||
|
|
79c5c648c9 | ||
|
|
0ba2e23171 | ||
|
|
b0f3869621 | ||
|
|
b709d53e40 | ||
|
|
b198168d75 | ||
|
bd41ab603d
|
|||
|
0059431fbb
|
|||
|
863addce39
|
|||
|
07b7272eb1
|
|||
|
c59de1fcf9
|
|||
|
2d24d8e379
|
|||
|
60fd32e4d5
|
|||
|
f32504e76b
|
|||
|
8eed126fa4
|
|||
| 9242cbccc4 | |||
|
|
a7d209b370 | ||
|
29c1b6286f
|
|||
|
|
1ae4ab46d4 | ||
| cd33470b12 | |||
| 083feeef90 | |||
| 42f6267539 | |||
|
|
5f669092c2 | ||
| 9a36aad9cb | |||
| 898983f724 | |||
|
c35a726e93
|
|||
|
9cda4061d5
|
|||
|
1462dffb3e
|
|||
|
d314242b3b
|
|||
|
e6daa0bb20
|
|||
|
3b357881ae
|
|||
|
20efc2b0e2
|
|||
|
6a9ca9993a
|
|||
|
0c0c3f4671
|
|||
|
5a21488e6b
|
|||
|
e5c7c3df7b
|
|||
|
78015e1364
|
|||
|
ffcb30cdbd
|
|||
|
4ff15c7613
|
|||
|
db78571c25
|
|||
|
590aa9a1ff
|
|||
|
ccab0685d0
|
|||
|
34cc9789eb
|
|||
|
82ac23c63c
|
|||
|
7065aeba69
|
|||
|
bf23c998a0
|
|||
|
35e0f97b0a
|
|||
|
3fe80a12e0
|
|||
|
03f53d9f11
|
|||
|
c58f6dd883
|
|||
|
9a2b76b887
|
|||
|
3d380851ab
|
|||
|
5b2b76b772
|
|||
|
80b22d23b7
|
|||
|
c3d2b9efc1
|
|||
|
25c4569639
|
|||
|
78a512b8f6
|
|||
|
3d5d11523e
|
|||
|
d2ffa5e381
|
|||
|
b4eb11818f
|
|||
|
a6032241e1
|
|||
|
b1e2c48075
|
|||
|
a77087a081
|
|||
|
05319b3860
|
|||
|
fb106a1499
|
|||
|
9eaa896b2d
|
|||
|
ed7abff25a
|
|||
|
4a8f35c0eb
|
|||
|
1debab8452
|
|||
|
53cfd4789e
|
|||
|
d9a89e143a
|
|||
|
55e998bb46
|
|||
|
bd40d20911
|
|||
|
efc5dac8f4
|
|||
|
c33a35003b
|
|||
|
a10c1bcff9
|
|||
|
2025e04b61
|
|||
|
77e2b5e7d6
|
|||
|
9b2b7682e3
|
|||
|
433abb0fec
|
|||
|
012cd0cc44
|
|||
|
f56f934514
|
|||
|
c9aaad376b
|
|||
|
3ebd2478fe
|
|||
|
b3fbaa1d97
|
|||
|
94da974373
|
|||
|
fd76d3ce59
|
|||
|
7c5420d279
|
|||
|
c2ab89457b
|
|||
|
8f87fae452
|
|||
|
d5c9c3550a
|
|||
|
b654cc3469
|
|||
|
fdb99d57d6
|
|||
|
e3e611d47b
|
|||
|
b8ef37188c
|
|||
|
f8d68789fc
|
|||
|
e0c9df41d7
|
|||
|
1363ed4f8a
|
|||
|
3e914b7a99
|
|||
|
d690256369
|
|||
|
18c37feed8
|
|||
|
d21a8721cf
|
|||
|
d0192d9a72
|
|||
|
684963bc2b
|
|||
|
220b995f28
|
|||
|
998d706bf7
|
|||
|
f4a394bd3b
|
|||
|
898bbe4827
|
|||
|
66b69d5629
|
|||
|
818729d6ed
|
|||
|
33a2a90eb1
|
|||
|
2ff6c193c9
|
|||
|
647ce980b4
|
|||
|
f557c5aff6
|
|||
|
2e67915bb6
|
|||
|
cce142d636
|
|||
|
e398e1acc4
|
|||
|
5c6756d98f
|
|||
|
f0ccd04718
|
|||
|
fe0545efc0
|
|||
|
15bfc1c35e
|
|||
|
a0635658bd
|
|||
|
cde7a1ab40
|
|||
|
c8d68bdb2a
|
|||
|
d18e67881c
|
|||
|
cdfccdd022
|
|||
|
44f6a002bf
|
|||
|
b85db52c77
|
|||
|
3ebc986132
|
|||
|
5973508f80
|
|||
|
9a9e4ebedf
|
|||
|
a78e3201cb
|
|||
|
fbdeea47eb
|
|||
|
761a4f187e
|
|||
|
77bb68e3a9
|
|||
|
189d913567
|
|||
|
2e9fdcf9bd
|
|||
|
f57a46cd29
|
|||
|
305abb3e47
|
|||
|
|
ef904032d7 | ||
|
|
55c1058832 | ||
|
879a9a658c
|
|||
|
893679c843
|
|||
|
f935b184d7
|
|||
|
010a440e3e
|
|||
|
51023a0e14
|
|||
|
55d5cae85f
|
|||
|
d564f064d6
|
|||
|
1750b6ff11
|
|||
|
0690e1551b
|
|||
|
d1a7460c05
|
|||
|
70e349d7e3
|
|||
|
568c3fc219
|
|||
|
f55ecae8f3
|
|||
|
e4436ad7b7
|
|||
|
67d7019a93
|
|||
|
4b45c0a2a2
|
|||
|
b3aae7b837
|
|||
|
122286bd7b
|
|||
|
6708bb17a3
|
|||
|
5fa7cd9d85
|
|||
|
25ac27dd64
|
|||
|
a659e03512
|
|||
|
4d081adda2
|
|||
|
279d48d8ee
|
|||
|
c017578631
|
|||
|
f4baade73b
|
|||
|
f68053b461
|
|||
|
ec18ceb6db
|
|||
|
68c4778ed8
|
|||
|
cf28156e70
|
|||
|
149fe89f89
|
|||
|
c124d93285
|
|||
|
06e5d42c9c
|
|||
|
c42b60a58c
|
|||
|
1e8bdcddd8
|
|||
|
90c2295bb8
|
|||
|
cca7b48d3b
|
|||
|
2d9dec2d74
|
|||
|
30741f124e
|
|||
|
f256a9db06
|
|||
|
baf850308f
|
|||
|
|
d9174d2a20 |
8
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
8
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
@@ -14,6 +14,9 @@ body:
|
||||
4. Before creating this bug report, ensure you updated your applications to the latest versions.
|
||||
Check your configurations to ensure there are no typos or errors.
|
||||
Docker users should attempt to re-pull the TVApp2 image to ensure caching is not the cause of an issue.
|
||||
5. To get detailed logs of the issue, set the environment variable:
|
||||
`LOG_LEVEL=5`
|
||||
Restart the docker container and you should get more detailed logs.
|
||||
|
||||
<br />
|
||||
|
||||
@@ -126,9 +129,9 @@ body:
|
||||
- type: textarea
|
||||
id: docker-compose
|
||||
attributes:
|
||||
label: docker-compose.yml
|
||||
label: docker-compose.yml / Run command
|
||||
description: |
|
||||
Copy / paste your `docker-compose.yml` file here
|
||||
Copy / paste your `docker-compose.yml` file or run command here
|
||||
|
||||
- type: textarea
|
||||
id: logs
|
||||
@@ -137,6 +140,7 @@ body:
|
||||
description: |
|
||||
Paste your docker logs here.
|
||||
You can get your docker logs by opening terminal and running `docker logs tvapp2`
|
||||
To get detailed logs, set the environment variable `LOG_LEVEL=5` and restart the container.
|
||||
|
||||
- type: textarea
|
||||
id: screenshots
|
||||
|
||||
1
.github/ISSUE_TEMPLATE/roadmap.yml
vendored
1
.github/ISSUE_TEMPLATE/roadmap.yml
vendored
@@ -41,6 +41,7 @@ body:
|
||||
- Distribution
|
||||
- Documentation
|
||||
- M3U / EPG Functionality
|
||||
- Refactor (Code)
|
||||
- Repository
|
||||
- S6-Overlay
|
||||
default: 0
|
||||
|
||||
302
.github/workflows/cache-clean.yml
vendored
Normal file
302
.github/workflows/cache-clean.yml
vendored
Normal file
@@ -0,0 +1,302 @@
|
||||
# #
|
||||
# @type github workflow
|
||||
# @author Aetherinox
|
||||
# @url https://github.com/Aetherinox
|
||||
# @usage cleans up the cache for a repository.
|
||||
#
|
||||
#
|
||||
# You can view your current cached items by going to Github and going to the page:
|
||||
# https://github.com/USERNAME/REPO/actions/caches
|
||||
#
|
||||
# Caches have branch scope restrictions in place, which means some caches have limited usage options. For more information
|
||||
# on cache scope restrictions, see Restrictions for accessing a cache, earlier in this article. If caches limited to a specific
|
||||
# branch are using a lot of storage quota, it may cause caches from the default branch to be created and deleted at a high frequency.
|
||||
#
|
||||
# For example, a repository could have many new pull requests opened, each with their own caches that are restricted to that branch.
|
||||
# These caches could take up the majority of the cache storage for that repository. Once a repository has reached its maximum cache
|
||||
# storage, the cache eviction policy will create space by deleting the caches in order of last access date, from oldest to most
|
||||
# recent. In order to prevent cache thrashing when this happens, you can set up workflows to delete caches on a faster cadence than
|
||||
# the cache eviction policy will. You can use the GitHub CLI to delete caches for specific branches.
|
||||
#
|
||||
# @reference https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#deleting-cache-entries
|
||||
#
|
||||
#
|
||||
# @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.CODECOV_TOKEN codecov upload token for nodejs projects
|
||||
# secrets.MAXMIND_GELITE_TOKEN maxmind API token
|
||||
# secrets.CF_ACCOUNT_ID cloudflare account id
|
||||
# secrets.CF_ACCOUNT_TOKEN cloudflare account token
|
||||
# secrets.ORG_TOKEN org github personal access token (fine-grained)
|
||||
# secrets.ORG_TOKEN_CL org github personal access token (classic)
|
||||
# secrets.ORG_DOCKERHUB_TOKEN org dockerhub secret
|
||||
# secrets.ORG_GITEA_TOKEN org gitea personal access token (classic) with package:write permission
|
||||
# secrets.BOT_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
|
||||
# secrets.BOT_GPG_KEY_B64 bot gpg private key (binary) converted to base64
|
||||
# secrets.BOT_GPG_PASSPHRASE bot gpg private key passphrase
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_RELEASES discord webhook to report release notifications from github to discord
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_WORKFLOWS discord webhook to report workflow notifications from github to discord
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_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/cache-clean.yml -P ubuntu-latest=catthehacker/ubuntu:full-22.04
|
||||
# act -W .github/workflows/cache-clean.yml -s TOKEN_CL=XXXXXXXXXX --pull=false
|
||||
# #
|
||||
|
||||
# #
|
||||
|
||||
name: '🧹 Cache › Clean'
|
||||
run-name: '🧹 Cache › Clean'
|
||||
|
||||
# #
|
||||
# triggers
|
||||
# #
|
||||
|
||||
on:
|
||||
|
||||
# #
|
||||
# Trigger › Workflow Dispatch
|
||||
# #
|
||||
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
|
||||
# #
|
||||
# Cache › Num Per Page
|
||||
#
|
||||
# this is the number of cached items to fetch per page.
|
||||
# #
|
||||
|
||||
NUM_PER_PAGE:
|
||||
description: '📦 Number Per Page'
|
||||
required: true
|
||||
default: '100'
|
||||
type: string
|
||||
|
||||
# #
|
||||
# environment variables
|
||||
# #
|
||||
|
||||
env:
|
||||
NUM_PER_PAGE: ${{ github.event.inputs.NUM_PER_PAGE || '100' }}
|
||||
BOT_NAME_1: EuropaServ
|
||||
BOT_NAME_2: BinaryServ
|
||||
BOT_NAME_DEPENDABOT: dependabot[bot]
|
||||
BOT_NAME_RENOVATE: renovate[bot]
|
||||
|
||||
# #
|
||||
# jobs
|
||||
# #
|
||||
|
||||
jobs:
|
||||
cleanup:
|
||||
name: >-
|
||||
🧹 Cache › Clean
|
||||
runs-on: ubuntu-latest
|
||||
# runs-on: apollo-x64
|
||||
timeout-minutes: 5
|
||||
permissions: write-all
|
||||
|
||||
steps:
|
||||
|
||||
# #
|
||||
# Cache › Clean › Checkout
|
||||
# #
|
||||
|
||||
- name: '☑️ Checkout'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# #
|
||||
# Cache › Clean › Job Information
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🔄 Load Job
|
||||
uses: qoomon/actions--context@v4
|
||||
id: 'context'
|
||||
|
||||
# #
|
||||
# Cache › Clean › Start
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
✅ Start
|
||||
run: |
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo " Starting Job ${{ steps.context.outputs.job_name }}"
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
|
||||
YEAR="$(date +'%Y')"
|
||||
echo "YEAR=${YEAR}" >> $GITHUB_ENV
|
||||
|
||||
NOW="$(date +'%m-%d-%Y %H:%M:%S')" # 02-25-2025 12:49:48
|
||||
echo "NOW=${NOW}" >> $GITHUB_ENV
|
||||
|
||||
NOW_SHORT="$(date +'%m-%d-%Y')" # 02-25-2025
|
||||
echo "NOW_SHORT=${NOW_SHORT}" >> $GITHUB_ENV
|
||||
|
||||
NOW_LONG="$(date +'%m-%d-%Y %H:%M')" # 02-25-2025 12:49
|
||||
echo "NOW_LONG=${NOW_LONG}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER="$(date +'%Y%m%d')" # 20250225
|
||||
echo "NOW_DOCKER=${NOW_DOCKER}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER_TS="$(date -u +'%FT%T.%3NZ')" # 2025-02-25T12:50:11.569Z
|
||||
echo "NOW_DOCKER_TS=${NOW_DOCKER_TS}" >> $GITHUB_ENV
|
||||
|
||||
SHA1="$(git rev-parse HEAD)" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1=${SHA1}" >> $GITHUB_ENV
|
||||
|
||||
SHA1_GH="$(echo ${GITHUB_SHA})" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1_GH=${SHA1_GH}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_1DIGIT="$(echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-1)" # 3.22 > 3
|
||||
echo "PKG_VER_1DIGIT=${PKG_VER_1DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_2DIGIT="$(echo ${{ env.IMAGE_VERSION }} | cut -f2 -d ":" | cut -c1-3)" # 3.22 > 3.2
|
||||
echo "PKG_VER_2DIGIT=${PKG_VER_2DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
sudo apt -qq update
|
||||
sudo apt -qq install tree
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
echo " Runner .............. ${{ runner.name }}"
|
||||
echo " Workflow ............ ${{ github.workflow }} (#${{ github.workflow_ref }})"
|
||||
echo " Run Number .......... ${{ github.run_number }}"
|
||||
echo " Ref ................. ${{ github.ref }}"
|
||||
echo " Ref Name ............ ${{ github.ref_name }}"
|
||||
echo " Event Name .......... ${{ github.event_name }}"
|
||||
echo " Repo ................ ${{ github.repository }}"
|
||||
echo " Repo Owner .......... ${{ github.repository_owner }}"
|
||||
echo " Run ID .............. https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
echo " Triggered By ........ ${{ github.actor }}"
|
||||
echo " SHA 1 (GITHUB_SHA) .. ${GITHUB_SHA}"
|
||||
echo " SHA 2 (github.sha) .. ${{ github.sha }}"
|
||||
echo " SHA 3 (env.SHA1) .... ${SHA1}"
|
||||
echo " SHA 4 (env.SHA1_GH) . ${SHA1_GH}"
|
||||
echo " Workspace ........... ${{ github.workspace }}"
|
||||
echo " PWD ................. ${PWD}"
|
||||
echo " Job Name ............ ${{ steps.context.outputs.job_name }}"
|
||||
echo " Job ID .............. ${{ steps.context.outputs.job_id }}"
|
||||
echo " Job URL ............. ${{ steps.context.outputs.job_url }}"
|
||||
echo " Run ID .............. ${{ steps.context.outputs.run_id }}"
|
||||
echo " Run Attempt ......... ${{ steps.context.outputs.run_attempt }}"
|
||||
echo " Run Number .......... ${{ steps.context.outputs.run_number }}"
|
||||
echo " Run URL ............. ${{ steps.context.outputs.run_url }}"
|
||||
echo " Run Env ............. ${{ steps.context.outputs.environment }}"
|
||||
echo " Run Env URL ......... ${{ steps.context.outputs.environment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Deployment URL .. ${{ steps.context.outputs.deployment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Runner Name ..... ${{ steps.context.outputs.runner_name }}"
|
||||
echo " Run Runner ID ....... ${{ steps.context.outputs.runner_id }}"
|
||||
echo " Year ................ ${YEAR}"
|
||||
echo " Now ................. ${NOW}"
|
||||
echo " Now (Short) ......... ${NOW_SHORT}"
|
||||
echo " Now (Long) .......... ${NOW_LONG}"
|
||||
echo " Now (Docker) ........ ${NOW_DOCKER}"
|
||||
echo " Now (Docker TS) ..... ${NOW_DOCKER_TS}"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
tree -I node_modules -I .git
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# #
|
||||
# Cache › Clean › Start
|
||||
#
|
||||
# You can view your current cached items by going to Github and going to the page:
|
||||
# https://github.com/USERNAME/REPO/actions/caches
|
||||
#
|
||||
# Caches have branch scope restrictions in place, which means some caches have limited usage options. For more information
|
||||
# on cache scope restrictions, see Restrictions for accessing a cache, earlier in this article. If caches limited to a specific
|
||||
# branch are using a lot of storage quota, it may cause caches from the default branch to be created and deleted at a high frequency.
|
||||
#
|
||||
# For example, a repository could have many new pull requests opened, each with their own caches that are restricted to that branch.
|
||||
# These caches could take up the majority of the cache storage for that repository. Once a repository has reached its maximum cache
|
||||
# storage, the cache eviction policy will create space by deleting the caches in order of last access date, from oldest to most
|
||||
# recent. In order to prevent cache thrashing when this happens, you can set up workflows to delete caches on a faster cadence than
|
||||
# the cache eviction policy will. You can use the GitHub CLI to delete caches for specific branches.
|
||||
#
|
||||
# @reference https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#deleting-cache-entries
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🪣 Cache › Clean
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
try
|
||||
{
|
||||
const cacheConf =
|
||||
{
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
per_page: ${{ env.NUM_PER_PAGE }},
|
||||
};
|
||||
|
||||
console.log( `✅ Starting to clean cache; showing ${{ env.NUM_PER_PAGE }} cached items per page` )
|
||||
const caches = await github.rest.actions.getActionsCacheList( cacheConf )
|
||||
|
||||
while( caches.data.actions_caches.length )
|
||||
{
|
||||
for ( const cache of caches.data.actions_caches )
|
||||
{
|
||||
console.log( `⚠️ Clearing cache id: ${cache.key} (${cache.id})` )
|
||||
const res = await github.rest.actions.deleteActionsCacheById(
|
||||
{
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
cache_id: cache.id,
|
||||
});
|
||||
|
||||
console.log( `✔️ Cache item ${cache.key} (${cache.id}) cleared at ${new Date().toISOString()}` )
|
||||
}
|
||||
|
||||
caches = await github.rest.actions.getActionsCacheList(congif);
|
||||
console.log( `Getting another ${caches.data.actions_caches.length} caches from github ...` );
|
||||
}
|
||||
|
||||
console.log( `✔️ Finished cleaning the cache` );
|
||||
}
|
||||
catch( e )
|
||||
{
|
||||
console.log( `❌ The workflow has terminated with an error:`, e )
|
||||
return;
|
||||
}
|
||||
|
||||
# #
|
||||
# Cache › Clean › Get Weekly Commits
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🕛 Get 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
|
||||
325
.github/workflows/deploy-clean.yml
vendored
325
.github/workflows/deploy-clean.yml
vendored
@@ -12,15 +12,21 @@
|
||||
# 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
|
||||
# secrets.CODECOV_TOKEN codecov upload token for nodejs projects
|
||||
# secrets.MAXMIND_GELITE_TOKEN maxmind API token
|
||||
# secrets.CF_ACCOUNT_ID cloudflare account id
|
||||
# secrets.CF_ACCOUNT_TOKEN cloudflare account token
|
||||
# secrets.ORG_TOKEN org github personal access token (fine-grained)
|
||||
# secrets.ORG_TOKEN_CL org github personal access token (classic)
|
||||
# secrets.ORG_DOCKERHUB_TOKEN org dockerhub secret
|
||||
# secrets.ORG_GITEA_TOKEN org gitea personal access token (classic) with package:write permission
|
||||
# secrets.BOT_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
|
||||
# secrets.BOT_GPG_KEY_B64 bot gpg private key (binary) converted to base64
|
||||
# secrets.BOT_GPG_PASSPHRASE bot gpg private key passphrase
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_RELEASES discord webhook to report release notifications from github to discord
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_WORKFLOWS discord webhook to report workflow notifications from github to discord
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_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
|
||||
@@ -32,14 +38,21 @@
|
||||
# act -W .github/workflows/deploy-clean.yml -s TOKEN_CL=XXXXXXXXXX --pull=false
|
||||
# #
|
||||
|
||||
name: "⚙️ Deploy › Clean"
|
||||
run-name: "⚙️ Deploy › Clean"
|
||||
# #
|
||||
|
||||
name: '🧹 Deployments › Clean'
|
||||
run-name: '🧹 Deployments › Clean'
|
||||
|
||||
# #
|
||||
# triggers
|
||||
# #
|
||||
|
||||
on:
|
||||
|
||||
# #
|
||||
# Trigger > Workflow Dispatch
|
||||
# #
|
||||
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
|
||||
@@ -67,78 +80,69 @@ on:
|
||||
default: '1000'
|
||||
type: string
|
||||
|
||||
# #
|
||||
# Discord Bot › Name
|
||||
#
|
||||
# The discord bot name
|
||||
# #
|
||||
|
||||
DISCORD_BOT_NAME:
|
||||
description: '🤖 Bot Name'
|
||||
required: true
|
||||
default: 'Europa'
|
||||
type: string
|
||||
|
||||
# #
|
||||
# Discord Bot › Avatar
|
||||
#
|
||||
# The discord bot avatar to show; let's use some weird picture
|
||||
# #
|
||||
|
||||
DISCORD_BOT_AVATAR:
|
||||
description: '🤖 Avatar URL'
|
||||
required: true
|
||||
default: 'https://i.imgur.com/UqwMom1.jpeg'
|
||||
type: string
|
||||
|
||||
# #
|
||||
# Discord Bot › Author Icon URL
|
||||
#
|
||||
# A small picture shown to the top-right of each post
|
||||
# #
|
||||
|
||||
DISCORD_BOT_EMBED_AUTHOR_ICON:
|
||||
description: '🤖 Embed Author Icon'
|
||||
required: true
|
||||
default: 'https://avatars.githubusercontent.com/u/200161462'
|
||||
type: string
|
||||
|
||||
# #
|
||||
# Discord Bot › Thumbnail URL
|
||||
#
|
||||
# A small picture shown to the top-right of each post
|
||||
# #
|
||||
|
||||
DISCORD_BOT_EMBED_THUMBNAIL:
|
||||
description: '🤖 Embed Thumbnail URL'
|
||||
required: true
|
||||
default: 'https://avatars.githubusercontent.com/u/200161462'
|
||||
type: string
|
||||
|
||||
# #
|
||||
# environment variables
|
||||
# #
|
||||
|
||||
env:
|
||||
DEPLOYMENT_ENV: ${{ github.event.inputs.DEPLOYMENT_ENV || 'orion' }}
|
||||
DEPLOYMENT_DELAY: ${{ github.event.inputs.DEPLOYMENT_DELAY || '1000' }}
|
||||
BOT_NAME_1: EuropaServ
|
||||
BOT_NAME_2: BinaryServ
|
||||
BOT_NAME_DEPENDABOT: dependabot[bot]
|
||||
BOT_NAME_RENOVATE: renovate[bot]
|
||||
LABELS_JSON: |
|
||||
[
|
||||
{ "name": "AC › Changes Made", "color": "8F1784", "description": "Requested changes have been made and are pending a re-scan" },
|
||||
{ "name": "AC › Changes Required", "color": "8F1784", "description": "Requires changes to be made to the package before being accepted" },
|
||||
{ "name": "AC › Failed", "color": "a61f2d", "description": "Autocheck failed to run through a complete cycle, requires investigation" },
|
||||
{ "name": "AC › Needs Rebase", "color": "8F1784", "description": "Due to the permissions on the requesting repo, this pull request must be rebased by the author" },
|
||||
{ "name": "AC › Passed", "color": "146b4a", "description": "Ready to be reviewed" },
|
||||
{ "name": "AC › Review Required", "color": "8F1784", "description": "PR needs to be reviewed by another person, after the requested changes have been made" },
|
||||
{ "name": "AC › Security Warning", "color": "761620", "description": "Does not conform to developer policies, or includes potentially dangerous code" },
|
||||
{ "name": "AC › Skipped Scan", "color": "8F1784", "description": "Author has skipped code scan" },
|
||||
{ "name": "Status 𐄂 Duplicate", "color": "75536b", "description": "Issue or pull request already exists" },
|
||||
{ "name": "Status 𐄂 Accepted", "color": "2e7539", "description": "This pull request has been accepted" },
|
||||
{ "name": "Status 𐄂 Autoclosed", "color": "3E0915", "description": "Originally stale and was autoclosed for no activity" },
|
||||
{ "name": "Status 𐄂 Denied", "color": "ba4058", "description": "Pull request has been denied" },
|
||||
{ "name": "Status 𐄂 Locked", "color": "550F45", "description": "Automatically locked by EuropaServ for a prolonged period of inactivity" },
|
||||
{ "name": "Status 𐄂 Need Info", "color": "2E3C4C", "description": "Not enough information to resolve" },
|
||||
{ "name": "Status 𐄂 No Action", "color": "030406", "description": "Closed without any action being taken" },
|
||||
{ "name": "Status 𐄂 Pending", "color": "984b12", "description": "Pending pull request" },
|
||||
{ "name": "Status 𐄂 Released", "color": "1b6626", "description": "Issues or PR has been implemented and is now live" },
|
||||
{ "name": "Status 𐄂 Reopened", "color": "8a6f14", "description": "A previously closed PR which has been re-opened" },
|
||||
{ "name": "Status 𐄂 Review", "color": "9e1451", "description": "Currently pending review" },
|
||||
{ "name": "Status 𐄂 Stale", "color": "928282", "description": "Has not had any activity in over 30 days" },
|
||||
{ "name": "Type ◦ Bug", "color": "9a2c2c", "description": "Something isn't working" },
|
||||
{ "name": "Type ◦ Dependency", "color": "243759", "description": "Item is associated to dependency" },
|
||||
{ "name": "Type ◦ Docs", "color": "0e588d", "description": "Improvements or modifications to docs" },
|
||||
{ "name": "Type ◦ Feature", "color": "3c4e93", "description": "Feature request" },
|
||||
{ "name": "Type ◦ Git Action", "color": "030406", "description": "GitHub Action / workflow" },
|
||||
{ "name": "Type ◦ Pull Request", "color": "8F1784", "description": "Normal pull request" },
|
||||
{ "name": "Type ◦ Roadmap", "color": "8F1784", "description": "Feature or bug currently planned for implementation" },
|
||||
{ "name": "Type ◦ Internal", "color": "A51994", "description": "Assigned items are for internal developer use" },
|
||||
{ "name": "Build ◦ Desktop", "color": "c7ca4a", "description": "Specific to desktop" },
|
||||
{ "name": "Build ◦ Linux", "color": "c7ca4a", "description": "Specific to Linux" },
|
||||
{ "name": "Build ◦ MacOS", "color": "c7ca4a", "description": "Specific to MacOS" },
|
||||
{ "name": "Build ◦ Mobile", "color": "c7ca4a", "description": "Specific to mobile" },
|
||||
{ "name": "Build ◦ Web", "color": "c7ca4a", "description": "Specific to web" },
|
||||
{ "name": "Build ◦ Windows", "color": "c7ca4a", "description": "Specific to Windows" },
|
||||
{ "name": "› API", "color": "F99B50", "description": "Plugin API, CLI, browser JS API" },
|
||||
{ "name": "› Auto-type", "color": "9141E0", "description": "Auto-type functionality in desktop apps" },
|
||||
{ "name": "› Browser", "color": "9141E0", "description": "Browser plugins and passing data to <=> from app" },
|
||||
{ "name": "› Customization", "color": "E3F0FC", "description": "Customizations: plugins, themes, configs" },
|
||||
{ "name": "› Design", "color": "FA70DE", "description": "Design related queries" },
|
||||
{ "name": "› Dist", "color": "FA70DE", "description": "Installers and other forms of software distribution" },
|
||||
{ "name": "› Enterprise", "color": "11447a", "description": "Issues about collaboration, administration, and so on" },
|
||||
{ "name": "› Hardware", "color": "5a7503", "description": "YubiKey, other tokens, biometrics" },
|
||||
{ "name": "› Import/Export", "color": "F5FFCC", "description": "Import from and export to different file formats" },
|
||||
{ "name": "› Improvement", "color": "185c98", "description": "Enhance an existing feature" },
|
||||
{ "name": "› Performance", "color": "006b75", "description": "Web and desktop performance issues" },
|
||||
{ "name": "› Plugin Request", "color": "FCE9CA", "description": "Requested changes should be implemented as a plugin" },
|
||||
{ "name": "› Security", "color": "F75D39", "description": "Security issues" },
|
||||
{ "name": "› Self-Hosting", "color": "fad8c7", "description": "Self-hosting installations and configs" },
|
||||
{ "name": "› Storage", "color": "5319e7", "description": "Storage providers: Dropbox, Google, WebDAV, etc." },
|
||||
{ "name": "› Updater", "color": "1BADDE", "description": "Auto-updater issues" },
|
||||
{ "name": "› UX", "color": "1BADDE", "description": "UX and usability" },
|
||||
{ "name": "› Website", "color": "fef2c0", "description": "Website related issues" },
|
||||
{ "name": "⚠ Urgent", "color": "a8740e", "description": "Requires urgent attention" },
|
||||
{ "name": "⚠ Announcement", "color": "DB4712", "description": "Announcements" },
|
||||
{ "name": "📰 Progress Report", "color": "392297", "description": "Development updates" },
|
||||
{ "name": "📦 Release", "color": "277542", "description": "Release announcements" },
|
||||
{ "name": "✔️ Poll", "color": "972255", "description": "Community polls" },
|
||||
{ "name": "❔ Question", "color": "FFFFFF", "description": "All questions" }
|
||||
]
|
||||
DEPLOYMENT_ENV: ${{ github.event.inputs.DEPLOYMENT_ENV || 'orion' }}
|
||||
DEPLOYMENT_DELAY: ${{ github.event.inputs.DEPLOYMENT_DELAY || '1000' }}
|
||||
DISCORD_BOT_NAME: ${{ github.event.inputs.DISCORD_BOT_NAME || 'Europa' }}
|
||||
DISCORD_BOT_AVATAR: ${{ github.event.inputs.DISCORD_BOT_AVATAR || 'https://i.imgur.com/UqwMom1.jpeg' }}
|
||||
DISCORD_BOT_EMBED_AUTHOR_ICON: ${{ github.event.inputs.DISCORD_BOT_EMBED_AUTHOR_ICON || 'https://avatars.githubusercontent.com/u/200161462' }}
|
||||
DISCORD_BOT_EMBED_THUMBNAIL: ${{ github.event.inputs.DISCORD_BOT_EMBED_THUMBNAIL || 'https://avatars.githubusercontent.com/u/200161462' }}
|
||||
BOT_NAME_1: EuropaServ
|
||||
BOT_NAME_2: BinaryServ
|
||||
BOT_NAME_DEPENDABOT: dependabot[bot]
|
||||
BOT_NAME_RENOVATE: renovate[bot]
|
||||
|
||||
# #
|
||||
# jobs
|
||||
@@ -146,43 +150,139 @@ env:
|
||||
|
||||
jobs:
|
||||
cleanup:
|
||||
# runs-on: ubuntu-latest
|
||||
runs-on: apollo-x64
|
||||
timeout-minutes: 20
|
||||
name: >-
|
||||
🧹 Deployments › Clean
|
||||
runs-on: ubuntu-latest
|
||||
# runs-on: apollo-x64
|
||||
timeout-minutes: 5
|
||||
permissions: write-all
|
||||
|
||||
steps:
|
||||
|
||||
# #
|
||||
# Cleanup › Set Env Variables
|
||||
# Deployments › Cleanup › Checkout
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🕛 Get Timestamp
|
||||
id: task_cleanup_set_timestamp
|
||||
run: |
|
||||
echo "NOW=$(date +'%m-%d-%Y %H:%M:%S')" >> $GITHUB_ENV
|
||||
echo "NOW_SHORT=$(date +'%m-%d-%Y')" >> $GITHUB_ENV
|
||||
echo "NOW_LONG=$(date +'%m-%d-%Y %H:%M')" >> $GITHUB_ENV
|
||||
echo "NOW_DOCKER_LABEL=$(date +'%Y%m%d')" >> $GITHUB_ENV
|
||||
|
||||
# #
|
||||
# Release › Github › Checkout › Arm64
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
✅ Checkout
|
||||
id: task_cleanup_gh_checkout
|
||||
- name: '☑️ Checkout'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# #
|
||||
# Cleanup › Start
|
||||
# Deployments › Cleanup › Job Information
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🔄 Load Job
|
||||
uses: qoomon/actions--context@v4
|
||||
id: 'context'
|
||||
|
||||
# #
|
||||
# Deployments › Cleanup › Start
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
✅ Start
|
||||
run: |
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo " Starting Job ${{ steps.context.outputs.job_name }}"
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
|
||||
YEAR="$(date +'%Y')"
|
||||
echo "YEAR=${YEAR}" >> $GITHUB_ENV
|
||||
|
||||
NOW="$(date +'%m-%d-%Y %H:%M:%S')" # 02-25-2025 12:49:48
|
||||
echo "NOW=${NOW}" >> $GITHUB_ENV
|
||||
|
||||
NOW_SHORT="$(date +'%m-%d-%Y')" # 02-25-2025
|
||||
echo "NOW_SHORT=${NOW_SHORT}" >> $GITHUB_ENV
|
||||
|
||||
NOW_LONG="$(date +'%m-%d-%Y %H:%M')" # 02-25-2025 12:49
|
||||
echo "NOW_LONG=${NOW_LONG}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER="$(date +'%Y%m%d')" # 20250225
|
||||
echo "NOW_DOCKER=${NOW_DOCKER}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER_TS="$(date -u +'%FT%T.%3NZ')" # 2025-02-25T12:50:11.569Z
|
||||
echo "NOW_DOCKER_TS=${NOW_DOCKER_TS}" >> $GITHUB_ENV
|
||||
|
||||
SHA1="$(git rev-parse HEAD)" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1=${SHA1}" >> $GITHUB_ENV
|
||||
|
||||
SHA1_GH="$(echo ${GITHUB_SHA})" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1_GH=${SHA1_GH}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_1DIGIT="$(echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-1)" # 3.22 > 3
|
||||
echo "PKG_VER_1DIGIT=${PKG_VER_1DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_2DIGIT="$(echo ${{ env.IMAGE_VERSION }} | cut -f2 -d ":" | cut -c1-3)" # 3.22 > 3.2
|
||||
echo "PKG_VER_2DIGIT=${PKG_VER_2DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
sudo apt -qq update
|
||||
sudo apt -qq install tree
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
echo " Runner .............. ${{ runner.name }}"
|
||||
echo " Workflow ............ ${{ github.workflow }} (#${{ github.workflow_ref }})"
|
||||
echo " Run Number .......... ${{ github.run_number }}"
|
||||
echo " Ref ................. ${{ github.ref }}"
|
||||
echo " Ref Name ............ ${{ github.ref_name }}"
|
||||
echo " Event Name .......... ${{ github.event_name }}"
|
||||
echo " Repo ................ ${{ github.repository }}"
|
||||
echo " Repo Owner .......... ${{ github.repository_owner }}"
|
||||
echo " Run ID .............. https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
echo " Triggered By ........ ${{ github.actor }}"
|
||||
echo " SHA 1 (GITHUB_SHA) .. ${GITHUB_SHA}"
|
||||
echo " SHA 2 (github.sha) .. ${{ github.sha }}"
|
||||
echo " SHA 3 (env.SHA1) .... ${SHA1}"
|
||||
echo " SHA 4 (env.SHA1_GH) . ${SHA1_GH}"
|
||||
echo " Workspace ........... ${{ github.workspace }}"
|
||||
echo " PWD ................. ${PWD}"
|
||||
echo " Job Name ............ ${{ steps.context.outputs.job_name }}"
|
||||
echo " Job ID .............. ${{ steps.context.outputs.job_id }}"
|
||||
echo " Job URL ............. ${{ steps.context.outputs.job_url }}"
|
||||
echo " Run ID .............. ${{ steps.context.outputs.run_id }}"
|
||||
echo " Run Attempt ......... ${{ steps.context.outputs.run_attempt }}"
|
||||
echo " Run Number .......... ${{ steps.context.outputs.run_number }}"
|
||||
echo " Run URL ............. ${{ steps.context.outputs.run_url }}"
|
||||
echo " Run Env ............. ${{ steps.context.outputs.environment }}"
|
||||
echo " Run Env URL ......... ${{ steps.context.outputs.environment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Deployment URL .. ${{ steps.context.outputs.deployment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Runner Name ..... ${{ steps.context.outputs.runner_name }}"
|
||||
echo " Run Runner ID ....... ${{ steps.context.outputs.runner_id }}"
|
||||
echo " Year ................ ${YEAR}"
|
||||
echo " Now ................. ${NOW}"
|
||||
echo " Now (Short) ......... ${NOW_SHORT}"
|
||||
echo " Now (Long) .......... ${NOW_LONG}"
|
||||
echo " Now (Docker) ........ ${NOW_DOCKER}"
|
||||
echo " Now (Docker TS) ..... ${NOW_DOCKER_TS}"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
tree -I node_modules -I .git
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# #
|
||||
# Deployments › Cleanup › Start
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
⚙️ Deployments › Clean
|
||||
id: task_cleanup_start
|
||||
uses: Aetherinox/delete-deploy-env-action@v3
|
||||
with:
|
||||
token: ${{ secrets.SELF_TOKEN_CL }}
|
||||
@@ -191,33 +291,31 @@ jobs:
|
||||
delay: "${{ env.DEPLOYMENT_DELAY }}"
|
||||
|
||||
# #
|
||||
# Cleanup › Get Weekly Commits
|
||||
# Deployments › Cleanup › Get Weekly Commits
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🕛 Get Weekly Commit List
|
||||
id: task_cleanup_set_weekly_commit_list
|
||||
run: |
|
||||
echo 'WEEKLY_COMMITS<<EOF' >> $GITHUB_ENV
|
||||
git log --format="[\`%h\`](${{ github.server_url }}/${{ github.repository }}/commit/%H) %s - %an" --since=7.days >> $GITHUB_ENV
|
||||
echo 'EOF' >> $GITHUB_ENV
|
||||
|
||||
# #
|
||||
# Cleanup › Notify Github › Success
|
||||
# Deployments › Cleanup › Notify Github › Success
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🔔 Send Discord Webhook Message (Success)
|
||||
id: task_cleanup_notify_discord_success
|
||||
uses: tsickert/discord-webhook@v7.0.0
|
||||
if: success()
|
||||
with:
|
||||
username: 'Io'
|
||||
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
|
||||
username: ${{ env.DISCORD_BOT_NAME }}
|
||||
avatar-url: ${{ env.DISCORD_BOT_AVATAR }}
|
||||
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKfLOWS }}
|
||||
embed-title: "⚙️ ${{ github.workflow_ref }}"
|
||||
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg'
|
||||
embed-thumbnail-url: ${{ env.DISCORD_BOT_EMBED_THUMBNAIL }}
|
||||
embed-description: |
|
||||
## 📦 Deployment Cleanup ${{ job.status == 'success' && '✅' || '❌' }}
|
||||
|
||||
@@ -236,24 +334,23 @@ jobs:
|
||||
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"
|
||||
embed-author-icon-url: ${{ env.DISCORD_BOT_EMBED_AUTHOR_ICON }}
|
||||
|
||||
# #
|
||||
# Cleanup › Notify Github › Failure
|
||||
# Deployments › Cleanup › Notify Github › Failure
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🔔 Send Discord Webhook Message (Failure)
|
||||
id: task_cleanup_notify_discord_failure
|
||||
uses: tsickert/discord-webhook@v7.0.0
|
||||
if: failure()
|
||||
with:
|
||||
username: 'Io'
|
||||
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
|
||||
username: ${{ env.DISCORD_BOT_NAME }}
|
||||
avatar-url: ${{ env.DISCORD_BOT_AVATAR }}
|
||||
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKfLOWS }}
|
||||
embed-title: "⚙️ ${{ github.workflow_ref }}"
|
||||
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg'
|
||||
embed-thumbnail-url: ${{ env.DISCORD_BOT_EMBED_THUMBNAIL }}
|
||||
embed-description: |
|
||||
## 📦 Deployment Cleanup ${{ job.status == 'success' && '✅' || '❌' }}
|
||||
|
||||
@@ -272,5 +369,5 @@ jobs:
|
||||
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"
|
||||
embed-author-icon-url: ${{ env.DISCORD_BOT_EMBED_AUTHOR_ICON }}
|
||||
|
||||
|
||||
565
.github/workflows/deploy-docker-dockerhub.yml
vendored
565
.github/workflows/deploy-docker-dockerhub.yml
vendored
@@ -63,15 +63,18 @@ on:
|
||||
type: string
|
||||
|
||||
# #
|
||||
# Image Version
|
||||
# Registry Name
|
||||
#
|
||||
# used to create new release tag, and add version to docker image name
|
||||
# options:
|
||||
# - github
|
||||
# - dockerhub
|
||||
# - gitea
|
||||
# #
|
||||
|
||||
IMAGE_VERSION:
|
||||
description: '🏷️ Image Version'
|
||||
IMAGE_REGISTRY:
|
||||
description: '📘 Registry Name'
|
||||
required: true
|
||||
default: '1.0.0'
|
||||
default: 'dockerhub'
|
||||
type: string
|
||||
|
||||
# #
|
||||
@@ -100,6 +103,18 @@ on:
|
||||
default: 'thebinaryninja'
|
||||
type: string
|
||||
|
||||
# #
|
||||
# Alpine Version
|
||||
#
|
||||
# specifies the alpine base docker image version
|
||||
# #
|
||||
|
||||
IMAGE_ALPINE_VERSION:
|
||||
description: '📀 Alpine Version'
|
||||
required: true
|
||||
default: '3.22'
|
||||
type: string
|
||||
|
||||
# #
|
||||
# true no changes to the repo will be made
|
||||
# false workflow will behave normally, and push any changes detected to the files
|
||||
@@ -135,15 +150,20 @@ on:
|
||||
# #
|
||||
|
||||
env:
|
||||
IMAGE_NAME: ${{ github.event.inputs.IMAGE_NAME || 'tvapp2' }}
|
||||
IMAGE_VERSION: ${{ github.event.inputs.IMAGE_VERSION || '1.0.0' }}
|
||||
IMAGE_DOCKERHUB_AUTHOR: ${{ github.event.inputs.IMAGE_DOCKERHUB_AUTHOR || 'thebinaryninja' }}
|
||||
IMAGE_DOCKERHUB_USERNAME: ${{ github.event.inputs.IMAGE_DOCKERHUB_USERNAME || 'thebinaryninja' }}
|
||||
IMAGE_NAME: ${{ github.event.inputs.IMAGE_NAME || 'tvapp2' }}
|
||||
IMAGE_REGISTRY: ${{ github.event.inputs.IMAGE_REGISTRY || 'dockerhub' }}
|
||||
IMAGE_DOCKERHUB_AUTHOR: ${{ github.event.inputs.IMAGE_DOCKERHUB_AUTHOR || 'thebinaryninja' }}
|
||||
IMAGE_DOCKERHUB_USERNAME: ${{ github.event.inputs.IMAGE_DOCKERHUB_USERNAME || 'thebinaryninja' }}
|
||||
IMAGE_ALPINE_VERSION: ${{ github.event.inputs.IMAGE_ALPINE_VERSION || '3.22' }}
|
||||
DISCORD_BOT_NAME: 'Europa'
|
||||
DISCORD_BOT_AVATAR: 'https://i.imgur.com/UqwMom1.jpeg'
|
||||
DISCORD_BOT_EMBED_AUTHOR_ICON: 'https://avatars.githubusercontent.com/u/200161462'
|
||||
DISCORD_BOT_EMBED_THUMBNAIL: 'https://avatars.githubusercontent.com/u/200161462'
|
||||
|
||||
BOT_NAME_1: EuropaServ
|
||||
BOT_NAME_2: BinaryServ
|
||||
BOT_NAME_DEPENDABOT: dependabot[bot]
|
||||
BOT_NAME_RENOVATE: renovate[bot]
|
||||
BOT_NAME_1: EuropaServ
|
||||
BOT_NAME_2: BinaryServ
|
||||
BOT_NAME_DEPENDABOT: dependabot[bot]
|
||||
BOT_NAME_RENOVATE: renovate[bot]
|
||||
|
||||
# #
|
||||
# Jobs
|
||||
@@ -162,9 +182,11 @@ jobs:
|
||||
job-docker-release-tags-create:
|
||||
name: >-
|
||||
📦 Release › Create Tag
|
||||
# runs-on: ubuntu-latest
|
||||
runs-on: apollo-x64
|
||||
runs-on: ubuntu-latest
|
||||
# runs-on: apollo-x64
|
||||
timeout-minutes: 4
|
||||
outputs:
|
||||
package_version: ${{ steps.task_initialize_package_getversion.outputs.PACKAGE_VERSION }}
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
@@ -172,25 +194,144 @@ jobs:
|
||||
id-token: write
|
||||
steps:
|
||||
|
||||
# #
|
||||
# Release › Tags › Start
|
||||
# #
|
||||
|
||||
- name: '🏳️ Start'
|
||||
id: task_release_tags_start
|
||||
run: |
|
||||
echo "Creating Tag"
|
||||
|
||||
# #
|
||||
# Release › Tags › Checkout
|
||||
# #
|
||||
|
||||
- name: '✅ Checkout'
|
||||
id: task_release_tags_checkout
|
||||
- name: '☑️ Checkout'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# #
|
||||
# Release › Tags › Job Information
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🔄 Load Job
|
||||
uses: qoomon/actions--context@v4
|
||||
id: 'context'
|
||||
|
||||
# #
|
||||
# Release › Tags › Set › Package.json › Version
|
||||
# #
|
||||
|
||||
- name: '👁️🗨️ Package Version › Set'
|
||||
id: task_initialize_package_getversion
|
||||
working-directory: ./tvapp2
|
||||
run: |
|
||||
VER=$(cat package.json | jq -r '.version')
|
||||
echo "PACKAGE_VERSION=${VER}" >> $GITHUB_OUTPUT
|
||||
echo "PACKAGE_VERSION=${VER}" >> $GITHUB_ENV
|
||||
|
||||
# #
|
||||
# Initialize › Get › Package.json › Version
|
||||
# #
|
||||
|
||||
- name: '👁️🗨️ Package Version › Get'
|
||||
run: |
|
||||
echo "VERSION: ${{ steps.task_initialize_package_getversion.outputs.PACKAGE_VERSION }}"
|
||||
|
||||
# #
|
||||
# Release › Tags › Start
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
✅ Start
|
||||
run: |
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo " Starting Job ${{ steps.context.outputs.job_name }}"
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
|
||||
YEAR="$(date +'%Y')"
|
||||
echo "YEAR=${YEAR}" >> $GITHUB_ENV
|
||||
|
||||
NOW="$(date +'%m-%d-%Y %H:%M:%S')" # 02-25-2025 12:49:48
|
||||
echo "NOW=${NOW}" >> $GITHUB_ENV
|
||||
|
||||
NOW_SHORT="$(date +'%m-%d-%Y')" # 02-25-2025
|
||||
echo "NOW_SHORT=${NOW_SHORT}" >> $GITHUB_ENV
|
||||
|
||||
NOW_LONG="$(date +'%m-%d-%Y %H:%M')" # 02-25-2025 12:49
|
||||
echo "NOW_LONG=${NOW_LONG}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER="$(date +'%Y%m%d')" # 20250225
|
||||
echo "NOW_DOCKER=${NOW_DOCKER}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER_TS="$(date -u +'%FT%T.%3NZ')" # 2025-02-25T12:50:11.569Z
|
||||
echo "NOW_DOCKER_TS=${NOW_DOCKER_TS}" >> $GITHUB_ENV
|
||||
|
||||
SHA1="$(git rev-parse HEAD)" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1=${SHA1}" >> $GITHUB_ENV
|
||||
|
||||
SHA1_GH="$(echo ${GITHUB_SHA})" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1_GH=${SHA1_GH}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_1DIGIT="$(echo ${{ env.PACKAGE_VERSION }} | cut -d '.' -f1-1)" # 3.22 > 3
|
||||
echo "PKG_VER_1DIGIT=${PKG_VER_1DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_2DIGIT="$(echo ${{ env.PACKAGE_VERSION }} | cut -f2 -d ":" | cut -c1-3)" # 3.22 > 3.2
|
||||
echo "PKG_VER_2DIGIT=${PKG_VER_2DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
sudo apt -qq update
|
||||
sudo apt -qq install tree
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
echo " Runner .............. ${{ runner.name }}"
|
||||
echo " Workflow ............ ${{ github.workflow }} (#${{ github.workflow_ref }})"
|
||||
echo " Run Number .......... ${{ github.run_number }}"
|
||||
echo " Ref ................. ${{ github.ref }}"
|
||||
echo " Ref Name ............ ${{ github.ref_name }}"
|
||||
echo " Event Name .......... ${{ github.event_name }}"
|
||||
echo " Repo ................ ${{ github.repository }}"
|
||||
echo " Repo Owner .......... ${{ github.repository_owner }}"
|
||||
echo " Run ID .............. https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
echo " Triggered By ........ ${{ github.actor }}"
|
||||
echo " SHA 1 (GITHUB_SHA) .. ${GITHUB_SHA}"
|
||||
echo " SHA 2 (env.SHA1) .. ${{ env.SHA1 }}"
|
||||
echo " SHA 3 (env.SHA1) .... ${SHA1}"
|
||||
echo " SHA 4 (env.SHA1_GH) . ${SHA1_GH}"
|
||||
echo " Workspace ........... ${{ github.workspace }}"
|
||||
echo " PWD ................. ${PWD}"
|
||||
echo " Job Name ............ ${{ steps.context.outputs.job_name }}"
|
||||
echo " Job ID .............. ${{ steps.context.outputs.job_id }}"
|
||||
echo " Job URL ............. ${{ steps.context.outputs.job_url }}"
|
||||
echo " Run ID .............. ${{ steps.context.outputs.run_id }}"
|
||||
echo " Run Attempt ......... ${{ steps.context.outputs.run_attempt }}"
|
||||
echo " Run Number .......... ${{ steps.context.outputs.run_number }}"
|
||||
echo " Run URL ............. ${{ steps.context.outputs.run_url }}"
|
||||
echo " Run Env ............. ${{ steps.context.outputs.environment }}"
|
||||
echo " Run Env URL ......... ${{ steps.context.outputs.environment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Deployment URL .. ${{ steps.context.outputs.deployment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Runner Name ..... ${{ steps.context.outputs.runner_name }}"
|
||||
echo " Run Runner ID ....... ${{ steps.context.outputs.runner_id }}"
|
||||
echo " Year ................ ${YEAR}"
|
||||
echo " Now ................. ${NOW}"
|
||||
echo " Now (Short) ......... ${NOW_SHORT}"
|
||||
echo " Now (Long) .......... ${NOW_LONG}"
|
||||
echo " Now (Docker) ........ ${NOW_DOCKER}"
|
||||
echo " Now (Docker TS) ..... ${NOW_DOCKER_TS}"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
tree -I node_modules -I .git
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# #
|
||||
# Release › Tags › Fix Permissions
|
||||
# #
|
||||
@@ -220,9 +361,9 @@ jobs:
|
||||
id: task_release_tags_create
|
||||
if: ( github.event_name != 'workflow_dispatch' && inputs.DRY_RUN == false )
|
||||
with:
|
||||
tag: "${{ env.IMAGE_VERSION }}"
|
||||
tag: "${{ env.PACKAGE_VERSION }}"
|
||||
tag_exists_error: false
|
||||
message: '${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}'
|
||||
message: '${{ env.IMAGE_NAME }}-${{ env.PACKAGE_VERSION }}'
|
||||
gpg_private_key: ${{ secrets.ADMINSERV_GPG_KEY_ASC }}
|
||||
gpg_passphrase: ${{ secrets.ADMINSERV_GPG_PASSPHRASE }}
|
||||
|
||||
@@ -233,60 +374,152 @@ jobs:
|
||||
job-docker-release-dockerhub:
|
||||
name: >-
|
||||
📦 Release › Dockerhub
|
||||
# runs-on: ubuntu-latest
|
||||
runs-on: apollo-x64
|
||||
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
|
||||
needs: [ job-docker-release-tags-create ]
|
||||
env:
|
||||
PACKAGE_VERSION: ${{ needs.job-docker-release-tags-create.outputs.package_version }}
|
||||
steps:
|
||||
|
||||
# #
|
||||
# Release › Dockerhub › Start › Amd64
|
||||
# Release › Dockerhub › Checkout
|
||||
# #
|
||||
|
||||
- name: '🏳️ Start'
|
||||
id: task_release_dh_start
|
||||
run: |
|
||||
echo "Starting Dockerhub docker release"
|
||||
|
||||
# #
|
||||
# Release › Dockerhub › Checkout › Amd64
|
||||
# #
|
||||
|
||||
- name: '✅ Checkout'
|
||||
id: task_release_gh_checkout
|
||||
- name: '☑️ Checkout'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# #
|
||||
# Release › Dockerhub › Get Timestamp
|
||||
# Release › Dockerhub › Job Information
|
||||
# #
|
||||
|
||||
- name: '🕛 Get Timestamp'
|
||||
- name: >-
|
||||
🔄 Load Job
|
||||
uses: qoomon/actions--context@v4
|
||||
id: 'context'
|
||||
|
||||
# #
|
||||
# Release › Dockerhub › Start
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
✅ Start
|
||||
run: |
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo " Starting Job ${{ steps.context.outputs.job_name }}"
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
|
||||
YEAR="$(date +'%Y')"
|
||||
echo "YEAR=${YEAR}" >> $GITHUB_ENV
|
||||
|
||||
NOW="$(date +'%m-%d-%Y %H:%M:%S')" # 02-25-2025 12:49:48
|
||||
echo "NOW=${NOW}" >> $GITHUB_ENV
|
||||
|
||||
NOW_SHORT="$(date +'%m-%d-%Y')" # 02-25-2025
|
||||
echo "NOW_SHORT=${NOW_SHORT}" >> $GITHUB_ENV
|
||||
|
||||
NOW_LONG="$(date +'%m-%d-%Y %H:%M')" # 02-25-2025 12:49
|
||||
echo "NOW_LONG=${NOW_LONG}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER="$(date +'%Y%m%d')" # 20250225
|
||||
echo "NOW_DOCKER=${NOW_DOCKER}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER_TS="$(date -u +'%FT%T.%3NZ')" # 2025-02-25T12:50:11.569Z
|
||||
echo "NOW_DOCKER_TS=${NOW_DOCKER_TS}" >> $GITHUB_ENV
|
||||
|
||||
SHA1="$(git rev-parse HEAD)" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1=${SHA1}" >> $GITHUB_ENV
|
||||
|
||||
SHA1_GH="$(echo ${GITHUB_SHA})" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1_GH=${SHA1_GH}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_1DIGIT="$(echo ${{ env.PACKAGE_VERSION }} | cut -d '.' -f1-1)" # 3.22 > 3
|
||||
echo "PKG_VER_1DIGIT=${PKG_VER_1DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_2DIGIT="$(echo ${{ env.PACKAGE_VERSION }} | cut -f2 -d ":" | cut -c1-3)" # 3.22 > 3.2
|
||||
echo "PKG_VER_2DIGIT=${PKG_VER_2DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
sudo apt -qq update
|
||||
sudo apt -qq install tree
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
echo " Runner .............. ${{ runner.name }}"
|
||||
echo " Workflow ............ ${{ github.workflow }} (#${{ github.workflow_ref }})"
|
||||
echo " Run Number .......... ${{ github.run_number }}"
|
||||
echo " Ref ................. ${{ github.ref }}"
|
||||
echo " Ref Name ............ ${{ github.ref_name }}"
|
||||
echo " Event Name .......... ${{ github.event_name }}"
|
||||
echo " Repo ................ ${{ github.repository }}"
|
||||
echo " Repo Owner .......... ${{ github.repository_owner }}"
|
||||
echo " Run ID .............. https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
echo " Triggered By ........ ${{ github.actor }}"
|
||||
echo " SHA 1 (GITHUB_SHA) .. ${GITHUB_SHA}"
|
||||
echo " SHA 2 (env.SHA1) .. ${{ env.SHA1 }}"
|
||||
echo " SHA 3 (env.SHA1) .... ${SHA1}"
|
||||
echo " SHA 4 (env.SHA1_GH) . ${SHA1_GH}"
|
||||
echo " Workspace ........... ${{ github.workspace }}"
|
||||
echo " PWD ................. ${PWD}"
|
||||
echo " Job Name ............ ${{ steps.context.outputs.job_name }}"
|
||||
echo " Job ID .............. ${{ steps.context.outputs.job_id }}"
|
||||
echo " Job URL ............. ${{ steps.context.outputs.job_url }}"
|
||||
echo " Run ID .............. ${{ steps.context.outputs.run_id }}"
|
||||
echo " Run Attempt ......... ${{ steps.context.outputs.run_attempt }}"
|
||||
echo " Run Number .......... ${{ steps.context.outputs.run_number }}"
|
||||
echo " Run URL ............. ${{ steps.context.outputs.run_url }}"
|
||||
echo " Run Env ............. ${{ steps.context.outputs.environment }}"
|
||||
echo " Run Env URL ......... ${{ steps.context.outputs.environment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Deployment URL .. ${{ steps.context.outputs.deployment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Runner Name ..... ${{ steps.context.outputs.runner_name }}"
|
||||
echo " Run Runner ID ....... ${{ steps.context.outputs.runner_id }}"
|
||||
echo " Year ................ ${YEAR}"
|
||||
echo " Now ................. ${NOW}"
|
||||
echo " Now (Short) ......... ${NOW_SHORT}"
|
||||
echo " Now (Long) .......... ${NOW_LONG}"
|
||||
echo " Now (Docker) ........ ${NOW_DOCKER}"
|
||||
echo " Now (Docker TS) ..... ${NOW_DOCKER_TS}"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
tree -I node_modules -I .git
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# #
|
||||
# Release › Dockerhub › Set Vars
|
||||
# #
|
||||
|
||||
- name: '🕛 Set Vars'
|
||||
id: task_release_set_timestamp
|
||||
run: |
|
||||
echo "IMAGE_VERSION_1DIGIT=`echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-1`" >> ${GITHUB_ENV} # 1
|
||||
echo "IMAGE_VERSION_2DIGIT=`echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-2`" >> ${GITHUB_ENV} # 1.0
|
||||
echo "REGISTRY_REPO_ORG_AUTHOR_LC=`echo ${{ env.IMAGE_DOCKERHUB_AUTHOR }}/${{ env.IMAGE_NAME }} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} # thebinaryninja/tvapp2
|
||||
echo "REGISTRY_REPO_AUTHOR_LC=`echo ${{ env.IMAGE_DOCKERHUB_AUTHOR }} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} # thebinaryninja
|
||||
echo "DOCKER_SHA=${GITHUB_SHA}" >> $GITHUB_ENV # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "NOW=$(date +'%m-%d-%Y %H:%M:%S')" >> $GITHUB_ENV # 02-25-2025 12:49:48
|
||||
echo "NOW_SHORT=$(date +'%m-%d-%Y')" >> $GITHUB_ENV # 02-25-2025
|
||||
echo "NOW_LONG=$(date +'%m-%d-%Y %H:%M')" >> $GITHUB_ENV # 02-25-2025 12:49
|
||||
echo "NOW_DOCKER_LABEL=$(date +'%Y%m%d')" >> $GITHUB_ENV # 20250225
|
||||
echo "NOW_DOCKER_TS=$(date -u +'%FT%T.%3NZ')" >> $GITHUB_ENV # 2025-02-25T12:50:11.569Z
|
||||
|
||||
# #
|
||||
# Release › Dockerhub › Install Dependencies
|
||||
# #
|
||||
|
||||
- name: '📦 Install Dependencies'
|
||||
id: task_release_dh_dependencies
|
||||
run:
|
||||
sudo apt-get install -qq dos2unix
|
||||
|
||||
@@ -295,7 +528,6 @@ jobs:
|
||||
# #
|
||||
|
||||
- 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 --
|
||||
@@ -306,7 +538,6 @@ jobs:
|
||||
# #
|
||||
|
||||
- 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)
|
||||
@@ -396,13 +627,13 @@ jobs:
|
||||
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 }}
|
||||
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=450,prefix=,suffix=,value=${{ env.PACKAGE_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 }}
|
||||
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=425,prefix=,suffix=,value=${{ env.PKG_VER_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 }}
|
||||
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=400,prefix=,suffix=,value=${{ env.PKG_VER_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
|
||||
@@ -412,25 +643,33 @@ jobs:
|
||||
flavor: |
|
||||
latest=false
|
||||
labels: |
|
||||
org.opencontainers.image.description=TVApp2
|
||||
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
|
||||
org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
|
||||
org.opencontainers.image.version=${{ env.PACKAGE_VERSION }}
|
||||
org.opencontainers.image.licenses=MIT
|
||||
org.opencontainers.image.revision=${{ github.sha }}
|
||||
org.opencontainers.image.revision=${{ env.SHA1 }}
|
||||
org.opencontainers.image.vendor=${{ env.REGISTRY_REPO_AUTHOR_LC }}
|
||||
org.opencontainers.image.ref.name=${{ github.ref_name }}
|
||||
org.opencontainers.image.development=${{ inputs.DEV_RELEASE == true && 'true' || 'false' }}
|
||||
org.opencontainers.image.registry=dockerhub
|
||||
org.tvapp2.image.build-version="Version:- ${{ env.IMAGE_VERSION }} Date:- ${{ env.NOW_DOCKER_LABEL }}"
|
||||
annotations: |
|
||||
org.opencontainers.image.registry=${{ env.IMAGE_REGISTRY }}
|
||||
org.tvapp2.image.build-version="Version: ${{ env.PACKAGE_VERSION }} Date: ${{ env.NOW_DOCKER }}"
|
||||
org.tvapp2.image.build-version-alpine=${{ env.IMAGE_ALPINE_VERSION }}
|
||||
org.tvapp2.image.build-release="${{ inputs.DEV_RELEASE == true && 'development' || 'stable' }}"
|
||||
org.tvapp2.image.build-sha1=${{ env.SHA1 }}
|
||||
annotations: |-
|
||||
org.opencontainers.image.description=TVApp2
|
||||
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
|
||||
org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
|
||||
org.opencontainers.image.version=${{ env.PACKAGE_VERSION }}
|
||||
org.opencontainers.image.licenses=MIT
|
||||
org.opencontainers.image.revision=${{ github.sha }}
|
||||
org.opencontainers.image.revision=${{ env.SHA1 }}
|
||||
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 }}"
|
||||
org.opencontainers.image.registry=${{ env.IMAGE_REGISTRY }}
|
||||
org.tvapp2.image.build-version="Version: ${{ env.PACKAGE_VERSION }} Date: ${{ env.NOW_DOCKER }}"
|
||||
org.tvapp2.image.build-version-alpine=${{ env.IMAGE_ALPINE_VERSION }}
|
||||
org.tvapp2.image.build-release="${{ inputs.DEV_RELEASE == true && 'development' || 'stable' }}"
|
||||
org.tvapp2.image.build-sha1=${{ env.SHA1 }}
|
||||
|
||||
# #
|
||||
# Release › Dockerhub › Build and Push › Amd64
|
||||
@@ -441,19 +680,41 @@ jobs:
|
||||
uses: docker/build-push-action@v6
|
||||
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
|
||||
with:
|
||||
allow: |
|
||||
network.host
|
||||
network: host
|
||||
context: .
|
||||
file: Dockerfile
|
||||
platforms: linux/amd64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
labels: ${{ steps.task_release_dh_meta.outputs.labels }}
|
||||
tags: |
|
||||
${{ steps.task_release_dh_meta.outputs.tags }}
|
||||
provenance: false
|
||||
sbom: false
|
||||
tags: |
|
||||
${{ steps.task_release_dh_meta.outputs.tags }}
|
||||
build-args: |-
|
||||
ARCH=amd64
|
||||
VERSION=${{ env.IMAGE_VERSION }}
|
||||
BUILDDATE=${{ env.NOW_DOCKER_LABEL }}
|
||||
RELEASE=${{ inputs.DEV_RELEASE == true && 'development' || 'stable' }}
|
||||
VERSION=${{ env.PACKAGE_VERSION }}
|
||||
BUILDDATE=${{ env.NOW_DOCKER }}
|
||||
GIT_SHA1=${{ env.SHA1 }}
|
||||
ALPINE_VERSION=${{ env.IMAGE_ALPINE_VERSION }}
|
||||
annotations: |-
|
||||
org.opencontainers.image.description=TVApp2
|
||||
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
|
||||
org.opencontainers.image.version=${{ env.PACKAGE_VERSION }}
|
||||
org.opencontainers.image.licenses=MIT
|
||||
org.opencontainers.image.architecture=amd64
|
||||
org.opencontainers.image.revision=${{ env.SHA1 }}
|
||||
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=${{ env.IMAGE_REGISTRY }}
|
||||
org.tvapp2.image.build-version="Version: ${{ env.PACKAGE_VERSION }} Date: ${{ env.NOW_DOCKER }}"
|
||||
org.tvapp2.image.build-version-alpine=${{ env.IMAGE_ALPINE_VERSION }}
|
||||
org.tvapp2.image.build-architecture=amd64
|
||||
org.tvapp2.image.build-release="${{ inputs.DEV_RELEASE == true && 'development' || 'stable' }}"
|
||||
org.tvapp2.image.build-sha1=${{ env.SHA1 }}
|
||||
|
||||
# #
|
||||
# Release › Dockerhub › Export Digest › Amd64
|
||||
@@ -492,19 +753,41 @@ jobs:
|
||||
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_dh_meta.outputs.labels }}
|
||||
tags: |
|
||||
${{ steps.task_release_dh_meta.outputs.tags }}
|
||||
provenance: false
|
||||
sbom: false
|
||||
tags: |
|
||||
${{ steps.task_release_dh_meta.outputs.tags }}
|
||||
build-args: |-
|
||||
ARCH=arm64
|
||||
VERSION=${{ env.IMAGE_VERSION }}
|
||||
BUILDDATE=${{ env.NOW_DOCKER_LABEL }}
|
||||
RELEASE=${{ inputs.DEV_RELEASE == true && 'development' || 'stable' }}
|
||||
VERSION=${{ env.PACKAGE_VERSION }}
|
||||
BUILDDATE=${{ env.NOW_DOCKER }}
|
||||
GIT_SHA1=${{ env.SHA1 }}
|
||||
ALPINE_VERSION=${{ env.IMAGE_ALPINE_VERSION }}
|
||||
annotations: |-
|
||||
org.opencontainers.image.description=TVApp2
|
||||
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
|
||||
org.opencontainers.image.version=${{ env.PACKAGE_VERSION }}
|
||||
org.opencontainers.image.licenses=MIT
|
||||
org.opencontainers.image.architecture=arm64
|
||||
org.opencontainers.image.revision=${{ env.SHA1 }}
|
||||
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=${{ env.IMAGE_REGISTRY }}
|
||||
org.tvapp2.image.build-version="Version: ${{ env.PACKAGE_VERSION }} Date: ${{ env.NOW_DOCKER }}"
|
||||
org.tvapp2.image.build-version-alpine=${{ env.IMAGE_ALPINE_VERSION }}
|
||||
org.tvapp2.image.build-architecture=arm64
|
||||
org.tvapp2.image.build-release="${{ inputs.DEV_RELEASE == true && 'development' || 'stable' }}"
|
||||
org.tvapp2.image.build-sha1=${{ env.SHA1 }}
|
||||
|
||||
# #
|
||||
# Release › Dockerhub › Export Digest › Arm64
|
||||
@@ -534,6 +817,64 @@ jobs:
|
||||
if-no-files-found: error
|
||||
retention-days: 10
|
||||
|
||||
# #
|
||||
# Release › Dockerhub › Checkpoint › Amd64
|
||||
# #
|
||||
|
||||
- name: '⚠️ Checkpoint'
|
||||
run: |
|
||||
echo ""
|
||||
echo "---- [ GITHUB ] ----------------------------------------------------------------------------------------"
|
||||
echo "github.actor.............................. ${{ github.actor }}"
|
||||
echo "github.ref ............................... ${{ github.ref }}"
|
||||
echo "github.ref_name .......................... ${{ github.ref_name }}"
|
||||
echo "github.event_name ........................ ${{ github.event_name }}"
|
||||
echo "github.repository_owner .................. ${{ github.repository_owner }}"
|
||||
echo "github.repository ........................ ${{ github.repository }}"
|
||||
echo "github.sha ............................... ${{ github.sha }}"
|
||||
echo ""
|
||||
echo "---- [ INPUTS ] ----------------------------------------------------------------------------------------"
|
||||
echo "inputs.IMAGE_NAME ........................ ${{ inputs.IMAGE_NAME }}"
|
||||
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.PACKAGE_VERSION ...................... ${{ env.PACKAGE_VERSION }}"
|
||||
echo "env.PKG_VER_1DIGIT ....................... ${{ env.PKG_VER_1DIGIT }}"
|
||||
echo "env.PKG_VER_2DIGIT ....................... ${{ env.PKG_VER_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 ........................... ${{ env.NOW_DOCKER }}"
|
||||
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 " SHA 1 (GITHUB_SHA) ...................... ${GITHUB_SHA}"
|
||||
echo " SHA 2 (github.sha) ...................... ${{ github.sha }}"
|
||||
echo " SHA 3 (env.SHA1) ........................ ${{ env.SHA1 }}"
|
||||
echo " SHA 4 (env.SHA1_GH) ..................... ${{ env.SHA1_GH }}"
|
||||
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 }}"
|
||||
echo ""
|
||||
|
||||
# #
|
||||
# Release › Dockerhub › Push Manifest
|
||||
# #
|
||||
@@ -550,67 +891,11 @@ jobs:
|
||||
index-annotations: |
|
||||
${{ steps.task_release_dh_meta.outputs.labels }}
|
||||
|
||||
# #
|
||||
# Release › Dockerhub › Checkpoint › Amd64
|
||||
# #
|
||||
|
||||
- name: '⚠️ Checkpoint'
|
||||
id: task_release_dh_checkpoint
|
||||
run: |
|
||||
echo ""
|
||||
echo "[ GITHUB ] ---------------------------------------------------------------------------------------------"
|
||||
echo "github.actor.............................. ${{ github.actor }}"
|
||||
echo "github.ref ............................... ${{ github.ref }}"
|
||||
echo "github.ref_name .......................... ${{ github.ref_name }}"
|
||||
echo "github.event_name ........................ ${{ github.event_name }}"
|
||||
echo "github.repository_owner .................. ${{ github.repository_owner }}"
|
||||
echo "github.repository ........................ ${{ github.repository }}"
|
||||
echo ""
|
||||
echo "[ INPUTS ] ---------------------------------------------------------------------------------------------"
|
||||
echo "inputs.IMAGE_NAME ........................ ${{ inputs.IMAGE_NAME }}"
|
||||
echo "inputs.IMAGE_VERSION ..................... ${{ inputs.IMAGE_VERSION }}"
|
||||
echo "inputs.IMAGE_DOCKERHUB_AUTHOR ............ ${{ inputs.IMAGE_DOCKERHUB_AUTHOR }}"
|
||||
echo "inputs.IMAGE_DOCKERHUB_USERNAME .......... ${{ inputs.IMAGE_DOCKERHUB_USERNAME }}"
|
||||
echo "inputs.DEV_RELEASE ....................... ${{ inputs.DEV_RELEASE }}"
|
||||
echo "inputs.DRY_RUN ........................... ${{ inputs.DRY_RUN }}"
|
||||
echo ""
|
||||
echo "[ ENV ] ------------------------------------------------------------------------------------------------"
|
||||
echo "env.IMAGE_NAME ........................... ${{ env.IMAGE_NAME }}"
|
||||
echo "env.IMAGE_VERSION ........................ ${{ env.IMAGE_VERSION }}"
|
||||
echo "env.IMAGE_VERSION_1DIGIT ................. ${{ env.IMAGE_VERSION_1DIGIT }}"
|
||||
echo "env.IMAGE_VERSION_2DIGIT ................. ${{ env.IMAGE_VERSION_2DIGIT }}"
|
||||
echo "env.IMAGE_DOCKERHUB_AUTHOR ............... ${{ env.IMAGE_DOCKERHUB_AUTHOR }}"
|
||||
echo "env.IMAGE_DOCKERHUB_USERNAME ............. ${{ env.IMAGE_DOCKERHUB_USERNAME }}"
|
||||
echo "env.NOW .................................. ${{ env.NOW }}"
|
||||
echo "env.NOW_SHORT ............................ ${{ env.NOW_SHORT }}"
|
||||
echo "env.NOW_LONG ............................. ${{ env.NOW_LONG }}"
|
||||
echo "env.NOW_DOCKER_LABEL ..................... ${{ env.NOW_DOCKER_LABEL }}"
|
||||
echo "env.NOW_DOCKER_TS ........................ ${{ env.NOW_DOCKER_TS }}"
|
||||
echo "env.REGISTRY_REPO_ORG_AUTHOR_LC .......... ${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}"
|
||||
echo "env.REGISTRY_REPO_AUTHOR_LC .............. ${{ env.REGISTRY_REPO_AUTHOR_LC }}"
|
||||
echo "env.DOCKER_SHA ........................... ${{ env.DOCKER_SHA }}"
|
||||
echo ""
|
||||
echo "[ DOCKER IMAGES ] --------------------------------------------------------------------------------------"
|
||||
echo "registry ................................. Dockerhub"
|
||||
echo "tags ..................................... ${{ steps.task_release_dh_meta.outputs.tags }}"
|
||||
echo "labels ................................... ${{ steps.task_release_dh_meta.outputs.labels }}"
|
||||
echo "digest ................................... ${{ steps.task_release_dh_push_amd64.outputs.digest }}"
|
||||
echo ""
|
||||
echo "(release) tags ........................... ${{ steps.task_release_dh_meta.outputs.tags }}"
|
||||
echo "(release) labels ......................... ${{ steps.task_release_dh_meta.outputs.labels }}"
|
||||
echo ""
|
||||
echo "[ DOCKER DIGESTS ] -------------------------------------------------------------------------------------"
|
||||
echo "docker image id (amd64) .................. ${{ steps.task_release_dh_push_amd64.outputs.imageid }}"
|
||||
echo "docker digest (amd64) .................... ${{ steps.task_release_dh_push_amd64.outputs.digest }}"
|
||||
echo "docker image id (arm64) .................. ${{ steps.task_release_dh_push_arm64.outputs.imageid }}"
|
||||
echo "docker digest (arm64) .................... ${{ steps.task_release_dh_push_arm64.outputs.digest }}"
|
||||
|
||||
# #
|
||||
# Release › Dockerhub › Get Weekly Commits
|
||||
# #
|
||||
|
||||
- name: '🕛 Get Weekly Commit List'
|
||||
id: task_release_set_weekly_commit_list
|
||||
run: |
|
||||
echo 'WEEKLY_COMMITS<<EOF' >> $GITHUB_ENV
|
||||
git log --format="[\`%h\`](${{ github.server_url }}/${{ github.repository }}/commit/%H) %s - %an" --since=7.days >> $GITHUB_ENV
|
||||
@@ -624,27 +909,27 @@ jobs:
|
||||
uses: tsickert/discord-webhook@v7.0.0
|
||||
if: success()
|
||||
with:
|
||||
username: 'Io'
|
||||
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
|
||||
username: ${{ env.DISCORD_BOT_NAME }}
|
||||
avatar-url: ${{ env.DISCORD_BOT_AVATAR }}
|
||||
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-thumbnail-url: ${{ env.DISCORD_BOT_EMBED_THUMBNAIL }}
|
||||
embed-description: |
|
||||
### 📦 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.PACKAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}`
|
||||
${{ inputs.DEV_RELEASE == true && '### ⚠️⚠️ Development / Pre-release ⚠️⚠️' || '' }}
|
||||
|
||||
A new version of the docker container `${{ env.IMAGE_NAME }}` has been released from Github to Dockerhub. The image is available at:
|
||||
- https://hub.docker.com/r/${{ env.IMAGE_DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}
|
||||
|
||||
- Version: `${{ env.IMAGE_VERSION }}`
|
||||
- Version: `${{ env.PACKAGE_VERSION }}`
|
||||
- Release Type: `${{ inputs.DEV_RELEASE == true && '⚠️⚠️ Development / Pre-release ⚠️⚠️' || 'Stable' }}`
|
||||
- Pull: `docker pull ${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}:${{ inputs.DEV_RELEASE == true && 'development' || env.IMAGE_VERSION }}`
|
||||
- Pull: `docker pull ${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}:${{ inputs.DEV_RELEASE == true && 'development' || env.PACKAGE_VERSION }}`
|
||||
- Pull (amd64): `docker pull ${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}@${{ steps.task_release_dh_push_amd64.outputs.digest }}`
|
||||
- Pull (arm64): `docker pull ${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}@${{ steps.task_release_dh_push_arm64.outputs.digest }}`
|
||||
- Dry Run: `${{ inputs.DRY_RUN }}`
|
||||
- Source: `Dockerhub` https://hub.docker.com/r/${{ env.IMAGE_DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}
|
||||
- Docker Image: `${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}`
|
||||
- Docker Image: `${{ env.IMAGE_NAME }}-${{ env.PACKAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}`
|
||||
- Branch: `${{ github.ref_name }}`
|
||||
- Workflow: `${{ github.workflow }} (#${{github.run_number}})`
|
||||
- Runner: `${{ runner.name }}`
|
||||
@@ -669,4 +954,4 @@ jobs:
|
||||
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"
|
||||
embed-author-icon-url: ${{ env.DISCORD_BOT_EMBED_AUTHOR_ICON }}
|
||||
|
||||
691
.github/workflows/deploy-docker-gitea.yml
vendored
691
.github/workflows/deploy-docker-gitea.yml
vendored
@@ -63,15 +63,18 @@ on:
|
||||
type: string
|
||||
|
||||
# #
|
||||
# Image Version
|
||||
# Registry Name
|
||||
#
|
||||
# used to create new release tag, and add version to docker image name
|
||||
# options:
|
||||
# - github
|
||||
# - dockerhub
|
||||
# - gitea
|
||||
# #
|
||||
|
||||
IMAGE_VERSION:
|
||||
description: '🏷️ Image Version'
|
||||
IMAGE_REGISTRY:
|
||||
description: '📘 Registry Name'
|
||||
required: true
|
||||
default: '1.0.0'
|
||||
default: 'gitea'
|
||||
type: string
|
||||
|
||||
# #
|
||||
@@ -106,10 +109,22 @@ on:
|
||||
# #
|
||||
|
||||
IMAGE_GITEA_WEBSITE:
|
||||
description: '🌎 Gitea Website'
|
||||
required: true
|
||||
default: 'git.binaryninja.net'
|
||||
type: string
|
||||
description: '🌎 Gitea Website'
|
||||
required: true
|
||||
default: 'git.binaryninja.net'
|
||||
type: string
|
||||
|
||||
# #
|
||||
# Alpine Version
|
||||
#
|
||||
# specifies the alpine base docker image version
|
||||
# #
|
||||
|
||||
IMAGE_ALPINE_VERSION:
|
||||
description: '📀 Alpine Version'
|
||||
required: true
|
||||
default: '3.22'
|
||||
type: string
|
||||
|
||||
# #
|
||||
# true no changes to the repo will be made
|
||||
@@ -146,16 +161,21 @@ on:
|
||||
# #
|
||||
|
||||
env:
|
||||
IMAGE_NAME: ${{ github.event.inputs.IMAGE_NAME || 'tvapp2' }}
|
||||
IMAGE_VERSION: ${{ github.event.inputs.IMAGE_VERSION || '1.0.0' }}
|
||||
IMAGE_GITEA_AUTHOR: ${{ github.event.inputs.IMAGE_GITEA_AUTHOR || 'BinaryNinja' }}
|
||||
IMAGE_GITEA_USERNAME: ${{ github.event.inputs.IMAGE_GITEA_USERNAME || 'BinaryNinja' }}
|
||||
IMAGE_GITEA_WEBSITE: ${{ github.event.inputs.IMAGE_GITEA_WEBSITE || 'git.binaryninja.net' }}
|
||||
IMAGE_NAME: ${{ github.event.inputs.IMAGE_NAME || 'tvapp2' }}
|
||||
IMAGE_REGISTRY: ${{ github.event.inputs.IMAGE_REGISTRY || 'gitea' }}
|
||||
IMAGE_GITEA_AUTHOR: ${{ github.event.inputs.IMAGE_GITEA_AUTHOR || 'BinaryNinja' }}
|
||||
IMAGE_GITEA_USERNAME: ${{ github.event.inputs.IMAGE_GITEA_USERNAME || 'BinaryNinja' }}
|
||||
IMAGE_GITEA_WEBSITE: ${{ github.event.inputs.IMAGE_GITEA_WEBSITE || 'git.binaryninja.net' }}
|
||||
IMAGE_ALPINE_VERSION: ${{ github.event.inputs.IMAGE_ALPINE_VERSION || '3.22' }}
|
||||
DISCORD_BOT_NAME: 'Europa'
|
||||
DISCORD_BOT_AVATAR: 'https://i.imgur.com/UqwMom1.jpeg'
|
||||
DISCORD_BOT_EMBED_AUTHOR_ICON: 'https://avatars.githubusercontent.com/u/200161462'
|
||||
DISCORD_BOT_EMBED_THUMBNAIL: 'https://avatars.githubusercontent.com/u/200161462'
|
||||
|
||||
BOT_NAME_1: EuropaServ
|
||||
BOT_NAME_2: BinaryServ
|
||||
BOT_NAME_DEPENDABOT: dependabot[bot]
|
||||
BOT_NAME_RENOVATE: renovate[bot]
|
||||
BOT_NAME_1: EuropaServ
|
||||
BOT_NAME_2: BinaryServ
|
||||
BOT_NAME_DEPENDABOT: dependabot[bot]
|
||||
BOT_NAME_RENOVATE: renovate[bot]
|
||||
|
||||
# #
|
||||
# Jobs
|
||||
@@ -174,9 +194,11 @@ jobs:
|
||||
job-docker-release-tags-create:
|
||||
name: >-
|
||||
📦 Release › Create Tag
|
||||
# runs-on: ubuntu-latest
|
||||
runs-on: apollo-x64
|
||||
runs-on: ubuntu-latest
|
||||
# runs-on: apollo-x64
|
||||
timeout-minutes: 4
|
||||
outputs:
|
||||
package_version: ${{ steps.task_initialize_package_getversion.outputs.PACKAGE_VERSION }}
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
@@ -184,25 +206,144 @@ jobs:
|
||||
id-token: write
|
||||
steps:
|
||||
|
||||
# #
|
||||
# Release › Tags › Start
|
||||
# #
|
||||
|
||||
- name: '🏳️ Start'
|
||||
id: task_release_tags_start
|
||||
run: |
|
||||
echo "Creating Tag"
|
||||
|
||||
# #
|
||||
# Release › Tags › Checkout
|
||||
# #
|
||||
|
||||
- name: '✅ Checkout'
|
||||
id: task_release_tags_checkout
|
||||
- name: '☑️ Checkout'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# #
|
||||
# Release › Tags › Job Information
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🔄 Load Job
|
||||
uses: qoomon/actions--context@v4
|
||||
id: 'context'
|
||||
|
||||
# #
|
||||
# Release › Tags › Set › Package.json › Version
|
||||
# #
|
||||
|
||||
- name: '👁️🗨️ Package Version › Set'
|
||||
id: task_initialize_package_getversion
|
||||
working-directory: ./tvapp2
|
||||
run: |
|
||||
VER=$(cat package.json | jq -r '.version')
|
||||
echo "PACKAGE_VERSION=${VER}" >> $GITHUB_OUTPUT
|
||||
echo "PACKAGE_VERSION=${VER}" >> $GITHUB_ENV
|
||||
|
||||
# #
|
||||
# Initialize › Get › Package.json › Version
|
||||
# #
|
||||
|
||||
- name: '👁️🗨️ Package Version › Get'
|
||||
run: |
|
||||
echo "VERSION: ${{ steps.task_initialize_package_getversion.outputs.PACKAGE_VERSION }}"
|
||||
|
||||
# #
|
||||
# Release › Tags › Start
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
✅ Start
|
||||
run: |
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo " Starting Job ${{ steps.context.outputs.job_name }}"
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
|
||||
YEAR="$(date +'%Y')"
|
||||
echo "YEAR=${YEAR}" >> $GITHUB_ENV
|
||||
|
||||
NOW="$(date +'%m-%d-%Y %H:%M:%S')" # 02-25-2025 12:49:48
|
||||
echo "NOW=${NOW}" >> $GITHUB_ENV
|
||||
|
||||
NOW_SHORT="$(date +'%m-%d-%Y')" # 02-25-2025
|
||||
echo "NOW_SHORT=${NOW_SHORT}" >> $GITHUB_ENV
|
||||
|
||||
NOW_LONG="$(date +'%m-%d-%Y %H:%M')" # 02-25-2025 12:49
|
||||
echo "NOW_LONG=${NOW_LONG}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER="$(date +'%Y%m%d')" # 20250225
|
||||
echo "NOW_DOCKER=${NOW_DOCKER}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER_TS="$(date -u +'%FT%T.%3NZ')" # 2025-02-25T12:50:11.569Z
|
||||
echo "NOW_DOCKER_TS=${NOW_DOCKER_TS}" >> $GITHUB_ENV
|
||||
|
||||
SHA1="$(git rev-parse HEAD)" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1=${SHA1}" >> $GITHUB_ENV
|
||||
|
||||
SHA1_GH="$(echo ${GITHUB_SHA})" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1_GH=${SHA1_GH}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_1DIGIT="$(echo ${{ env.PACKAGE_VERSION }} | cut -d '.' -f1-1)" # 3.22 > 3
|
||||
echo "PKG_VER_1DIGIT=${PKG_VER_1DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_2DIGIT="$(echo ${{ env.PACKAGE_VERSION }} | cut -f2 -d ":" | cut -c1-3)" # 3.22 > 3.2
|
||||
echo "PKG_VER_2DIGIT=${PKG_VER_2DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
sudo apt -qq update
|
||||
sudo apt -qq install tree
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
echo " Runner .............. ${{ runner.name }}"
|
||||
echo " Workflow ............ ${{ github.workflow }} (#${{ github.workflow_ref }})"
|
||||
echo " Run Number .......... ${{ github.run_number }}"
|
||||
echo " Ref ................. ${{ github.ref }}"
|
||||
echo " Ref Name ............ ${{ github.ref_name }}"
|
||||
echo " Event Name .......... ${{ github.event_name }}"
|
||||
echo " Repo ................ ${{ github.repository }}"
|
||||
echo " Repo Owner .......... ${{ github.repository_owner }}"
|
||||
echo " Run ID .............. https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
echo " Triggered By ........ ${{ github.actor }}"
|
||||
echo " SHA 1 (GITHUB_SHA) .. ${GITHUB_SHA}"
|
||||
echo " SHA 2 (env.SHA1) .. ${{ env.SHA1 }}"
|
||||
echo " SHA 3 (env.SHA1) .... ${SHA1}"
|
||||
echo " SHA 4 (env.SHA1_GH) . ${SHA1_GH}"
|
||||
echo " Workspace ........... ${{ github.workspace }}"
|
||||
echo " PWD ................. ${PWD}"
|
||||
echo " Job Name ............ ${{ steps.context.outputs.job_name }}"
|
||||
echo " Job ID .............. ${{ steps.context.outputs.job_id }}"
|
||||
echo " Job URL ............. ${{ steps.context.outputs.job_url }}"
|
||||
echo " Run ID .............. ${{ steps.context.outputs.run_id }}"
|
||||
echo " Run Attempt ......... ${{ steps.context.outputs.run_attempt }}"
|
||||
echo " Run Number .......... ${{ steps.context.outputs.run_number }}"
|
||||
echo " Run URL ............. ${{ steps.context.outputs.run_url }}"
|
||||
echo " Run Env ............. ${{ steps.context.outputs.environment }}"
|
||||
echo " Run Env URL ......... ${{ steps.context.outputs.environment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Deployment URL .. ${{ steps.context.outputs.deployment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Runner Name ..... ${{ steps.context.outputs.runner_name }}"
|
||||
echo " Run Runner ID ....... ${{ steps.context.outputs.runner_id }}"
|
||||
echo " Year ................ ${YEAR}"
|
||||
echo " Now ................. ${NOW}"
|
||||
echo " Now (Short) ......... ${NOW_SHORT}"
|
||||
echo " Now (Long) .......... ${NOW_LONG}"
|
||||
echo " Now (Docker) ........ ${NOW_DOCKER}"
|
||||
echo " Now (Docker TS) ..... ${NOW_DOCKER_TS}"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
tree -I node_modules -I .git
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# #
|
||||
# Release › Tags › Fix Permissions
|
||||
# #
|
||||
@@ -232,9 +373,9 @@ jobs:
|
||||
id: task_release_tags_create
|
||||
if: ( github.event_name != 'workflow_dispatch' && inputs.DRY_RUN == false )
|
||||
with:
|
||||
tag: "${{ env.IMAGE_VERSION }}"
|
||||
tag: "${{ env.PACKAGE_VERSION }}"
|
||||
tag_exists_error: false
|
||||
message: '${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}'
|
||||
message: '${{ env.IMAGE_NAME }}-${{ env.PACKAGE_VERSION }}'
|
||||
gpg_private_key: ${{ secrets.ADMINSERV_GPG_KEY_ASC }}
|
||||
gpg_passphrase: ${{ secrets.ADMINSERV_GPG_PASSPHRASE }}
|
||||
|
||||
@@ -245,60 +386,152 @@ jobs:
|
||||
job-docker-release-gitea:
|
||||
name: >-
|
||||
📦 Release › Gitea
|
||||
# runs-on: ubuntu-latest
|
||||
runs-on: apollo-x64
|
||||
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
|
||||
needs: [ job-docker-release-tags-create ]
|
||||
env:
|
||||
PACKAGE_VERSION: ${{ needs.job-docker-release-tags-create.outputs.package_version }}
|
||||
steps:
|
||||
|
||||
# #
|
||||
# Release › Gitea › Start › Amd64
|
||||
# #
|
||||
|
||||
- name: '🏳️ Start'
|
||||
id: task_release_gi_start
|
||||
run: |
|
||||
echo "Starting Gitea docker release"
|
||||
|
||||
# #
|
||||
# Release › Gitea › Checkout
|
||||
# #
|
||||
|
||||
- name: '✅ Checkout'
|
||||
id: task_release_gh_checkout
|
||||
- name: '☑️ Checkout'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# #
|
||||
# Release › Gitea › Get Timestamp
|
||||
# Release › Gitea › Job Information
|
||||
# #
|
||||
|
||||
- name: '🕛 Get Timestamp'
|
||||
- name: >-
|
||||
🔄 Load Job
|
||||
uses: qoomon/actions--context@v4
|
||||
id: 'context'
|
||||
|
||||
# #
|
||||
# Release › Gitea › Start
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
✅ Start
|
||||
run: |
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo " Starting Job ${{ steps.context.outputs.job_name }}"
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
|
||||
YEAR="$(date +'%Y')"
|
||||
echo "YEAR=${YEAR}" >> $GITHUB_ENV
|
||||
|
||||
NOW="$(date +'%m-%d-%Y %H:%M:%S')" # 02-25-2025 12:49:48
|
||||
echo "NOW=${NOW}" >> $GITHUB_ENV
|
||||
|
||||
NOW_SHORT="$(date +'%m-%d-%Y')" # 02-25-2025
|
||||
echo "NOW_SHORT=${NOW_SHORT}" >> $GITHUB_ENV
|
||||
|
||||
NOW_LONG="$(date +'%m-%d-%Y %H:%M')" # 02-25-2025 12:49
|
||||
echo "NOW_LONG=${NOW_LONG}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER="$(date +'%Y%m%d')" # 20250225
|
||||
echo "NOW_DOCKER=${NOW_DOCKER}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER_TS="$(date -u +'%FT%T.%3NZ')" # 2025-02-25T12:50:11.569Z
|
||||
echo "NOW_DOCKER_TS=${NOW_DOCKER_TS}" >> $GITHUB_ENV
|
||||
|
||||
SHA1="$(git rev-parse HEAD)" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1=${SHA1}" >> $GITHUB_ENV
|
||||
|
||||
SHA1_GH="$(echo ${GITHUB_SHA})" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1_GH=${SHA1_GH}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_1DIGIT="$(echo ${{ env.PACKAGE_VERSION }} | cut -d '.' -f1-1)" # 3.22 > 3
|
||||
echo "PKG_VER_1DIGIT=${PKG_VER_1DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_2DIGIT="$(echo ${{ env.PACKAGE_VERSION }} | cut -f2 -d ":" | cut -c1-3)" # 3.22 > 3.2
|
||||
echo "PKG_VER_2DIGIT=${PKG_VER_2DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
sudo apt -qq update
|
||||
sudo apt -qq install tree
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
echo " Runner .............. ${{ runner.name }}"
|
||||
echo " Workflow ............ ${{ github.workflow }} (#${{ github.workflow_ref }})"
|
||||
echo " Run Number .......... ${{ github.run_number }}"
|
||||
echo " Ref ................. ${{ github.ref }}"
|
||||
echo " Ref Name ............ ${{ github.ref_name }}"
|
||||
echo " Event Name .......... ${{ github.event_name }}"
|
||||
echo " Repo ................ ${{ github.repository }}"
|
||||
echo " Repo Owner .......... ${{ github.repository_owner }}"
|
||||
echo " Run ID .............. https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
echo " Triggered By ........ ${{ github.actor }}"
|
||||
echo " SHA 1 (GITHUB_SHA) .. ${GITHUB_SHA}"
|
||||
echo " SHA 2 (env.SHA1) .. ${{ env.SHA1 }}"
|
||||
echo " SHA 3 (env.SHA1) .... ${SHA1}"
|
||||
echo " SHA 4 (env.SHA1_GH) . ${SHA1_GH}"
|
||||
echo " Workspace ........... ${{ github.workspace }}"
|
||||
echo " PWD ................. ${PWD}"
|
||||
echo " Job Name ............ ${{ steps.context.outputs.job_name }}"
|
||||
echo " Job ID .............. ${{ steps.context.outputs.job_id }}"
|
||||
echo " Job URL ............. ${{ steps.context.outputs.job_url }}"
|
||||
echo " Run ID .............. ${{ steps.context.outputs.run_id }}"
|
||||
echo " Run Attempt ......... ${{ steps.context.outputs.run_attempt }}"
|
||||
echo " Run Number .......... ${{ steps.context.outputs.run_number }}"
|
||||
echo " Run URL ............. ${{ steps.context.outputs.run_url }}"
|
||||
echo " Run Env ............. ${{ steps.context.outputs.environment }}"
|
||||
echo " Run Env URL ......... ${{ steps.context.outputs.environment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Deployment URL .. ${{ steps.context.outputs.deployment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Runner Name ..... ${{ steps.context.outputs.runner_name }}"
|
||||
echo " Run Runner ID ....... ${{ steps.context.outputs.runner_id }}"
|
||||
echo " Year ................ ${YEAR}"
|
||||
echo " Now ................. ${NOW}"
|
||||
echo " Now (Short) ......... ${NOW_SHORT}"
|
||||
echo " Now (Long) .......... ${NOW_LONG}"
|
||||
echo " Now (Docker) ........ ${NOW_DOCKER}"
|
||||
echo " Now (Docker TS) ..... ${NOW_DOCKER_TS}"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
tree -I node_modules -I .git
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# #
|
||||
# Release › Gitea › Set Vars
|
||||
# #
|
||||
|
||||
- name: '🕛 Set Vars'
|
||||
id: task_release_set_timestamp
|
||||
run: |
|
||||
echo "IMAGE_VERSION_1DIGIT=`echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-1`" >> ${GITHUB_ENV} # 1
|
||||
echo "IMAGE_VERSION_2DIGIT=`echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-2`" >> ${GITHUB_ENV} # 1.0
|
||||
echo "REGISTRY_REPO_ORG_AUTHOR_LC=`echo ${{ env.IMAGE_GITEA_AUTHOR }}/${{ env.IMAGE_NAME }} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} # thebinaryninja/tvapp2
|
||||
echo "REGISTRY_REPO_AUTHOR_LC=`echo ${{ env.IMAGE_GITEA_AUTHOR }} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} # thebinaryninja
|
||||
echo "DOCKER_SHA=${GITHUB_SHA}" >> $GITHUB_ENV # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "NOW=$(date +'%m-%d-%Y %H:%M:%S')" >> $GITHUB_ENV # 02-25-2025 12:49:48
|
||||
echo "NOW_SHORT=$(date +'%m-%d-%Y')" >> $GITHUB_ENV # 02-25-2025
|
||||
echo "NOW_LONG=$(date +'%m-%d-%Y %H:%M')" >> $GITHUB_ENV # 02-25-2025 12:49
|
||||
echo "NOW_DOCKER_LABEL=$(date +'%Y%m%d')" >> $GITHUB_ENV # 20250225
|
||||
echo "NOW_DOCKER_TS=$(date -u +'%FT%T.%3NZ')" >> $GITHUB_ENV # 2025-02-25T12:50:11.569Z
|
||||
|
||||
# #
|
||||
# Release › Gitea › Install Dependencies
|
||||
# #
|
||||
|
||||
- name: '📦 Install Dependencies'
|
||||
id: task_release_gi_dependencies
|
||||
run:
|
||||
sudo apt-get install -qq dos2unix
|
||||
|
||||
@@ -307,7 +540,6 @@ jobs:
|
||||
# #
|
||||
|
||||
- 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 --
|
||||
@@ -318,7 +550,6 @@ jobs:
|
||||
# #
|
||||
|
||||
- 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)
|
||||
@@ -340,6 +571,32 @@ jobs:
|
||||
id: task_release_gi_qemu
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
# #
|
||||
# Required to fix insecure SSL error with docker buildx
|
||||
# #
|
||||
|
||||
- name: '⚙️ Configure Docker daemon to allow insecure registry'
|
||||
run: |
|
||||
echo "Configuring daemon to treat ${REGISTRY_HOST} as insecure"
|
||||
sudo mkdir -p /etc/docker
|
||||
sudo tee /etc/docker/daemon.json > /dev/null <<'JSON'
|
||||
{
|
||||
"insecure-registries": ["git.binaryninja.net:443"]
|
||||
}
|
||||
JSON
|
||||
|
||||
# Restart Docker
|
||||
sudo service docker restart
|
||||
env:
|
||||
REGISTRY_HOST: git.binaryninja.net
|
||||
|
||||
# #
|
||||
# Make sure change in docker daemon config successful
|
||||
# #
|
||||
|
||||
- name: '⚙️ Check Docker Daemon Configuration'
|
||||
run: cat /etc/docker/daemon.json
|
||||
|
||||
# #
|
||||
# Release › Gitea › Setup BuildX › Amd64
|
||||
# #
|
||||
@@ -350,6 +607,10 @@ jobs:
|
||||
with:
|
||||
version: latest
|
||||
driver-opts: 'image=moby/buildkit:latest'
|
||||
driver: docker
|
||||
buildkitd-flags: --allow-insecure-entitlement
|
||||
install: true
|
||||
use: true
|
||||
|
||||
# #
|
||||
# Release › Gitea › Registry Login › Amd64
|
||||
@@ -409,16 +670,16 @@ jobs:
|
||||
type=ref,enable=${{ github.event_name == 'pull_request' || github.event_name == 'push' }},priority=600,prefix=,suffix=-amd64,event=tag
|
||||
|
||||
# tag add 1.0.0-amd64 ( dispatch only + no dev )
|
||||
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=500,prefix=,suffix=-amd64,value=${{ env.IMAGE_VERSION }}
|
||||
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=500,prefix=,suffix=-amd64,value=${{ env.PACKAGE_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 }}
|
||||
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=450,prefix=,suffix=,value=${{ env.PACKAGE_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 }}
|
||||
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=425,prefix=,suffix=,value=${{ env.PKG_VER_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 }}
|
||||
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=400,prefix=,suffix=,value=${{ env.PKG_VER_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
|
||||
@@ -428,25 +689,33 @@ jobs:
|
||||
flavor: |
|
||||
latest=false
|
||||
labels: |
|
||||
org.opencontainers.image.description=TVApp2
|
||||
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
|
||||
org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
|
||||
org.opencontainers.image.version=${{ env.PACKAGE_VERSION }}
|
||||
org.opencontainers.image.licenses=MIT
|
||||
org.opencontainers.image.revision=${{ github.sha }}
|
||||
org.opencontainers.image.revision=${{ env.SHA1 }}
|
||||
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.registry=${{ env.IMAGE_REGISTRY }}
|
||||
org.tvapp2.image.build-version="Version: ${{ env.PACKAGE_VERSION }} Date: ${{ env.NOW_DOCKER }}"
|
||||
org.tvapp2.image.build-version-alpine=${{ env.IMAGE_ALPINE_VERSION }}
|
||||
org.tvapp2.image.build-release="${{ inputs.DEV_RELEASE == true && 'development' || 'stable' }}"
|
||||
org.tvapp2.image.build-sha1=${{ env.SHA1 }}
|
||||
annotations: |-
|
||||
org.opencontainers.image.description=TVApp2
|
||||
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
|
||||
org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
|
||||
org.opencontainers.image.version=${{ env.PACKAGE_VERSION }}
|
||||
org.opencontainers.image.licenses=MIT
|
||||
org.opencontainers.image.revision=${{ github.sha }}
|
||||
org.opencontainers.image.revision=${{ env.SHA1 }}
|
||||
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 }}"
|
||||
org.opencontainers.image.registry=${{ env.IMAGE_REGISTRY }}
|
||||
org.tvapp2.image.build-version="Version: ${{ env.PACKAGE_VERSION }} Date: ${{ env.NOW_DOCKER }}"
|
||||
org.tvapp2.image.build-version-alpine=${{ env.IMAGE_ALPINE_VERSION }}
|
||||
org.tvapp2.image.build-release="${{ inputs.DEV_RELEASE == true && 'development' || 'stable' }}"
|
||||
org.tvapp2.image.build-sha1=${{ env.SHA1 }}
|
||||
|
||||
# #
|
||||
# Release › Gitea › Meta › arm64
|
||||
@@ -469,32 +738,40 @@ jobs:
|
||||
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 }}
|
||||
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=500,prefix=,suffix=-arm64,value=${{ env.PACKAGE_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.description=TVApp2
|
||||
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
|
||||
org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
|
||||
org.opencontainers.image.version=${{ env.PACKAGE_VERSION }}
|
||||
org.opencontainers.image.licenses=MIT
|
||||
org.opencontainers.image.revision=${{ github.sha }}
|
||||
org.opencontainers.image.revision=${{ env.SHA1 }}
|
||||
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.registry=${{ env.IMAGE_REGISTRY }}
|
||||
org.tvapp2.image.build-version="Version: ${{ env.PACKAGE_VERSION }} Date: ${{ env.NOW_DOCKER }}"
|
||||
org.tvapp2.image.build-version-alpine=${{ env.IMAGE_ALPINE_VERSION }}
|
||||
org.tvapp2.image.build-release="${{ inputs.DEV_RELEASE == true && 'development' || 'stable' }}"
|
||||
org.tvapp2.image.build-sha1=${{ env.SHA1 }}
|
||||
annotations: |-
|
||||
org.opencontainers.image.description=TVApp2
|
||||
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
|
||||
org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
|
||||
org.opencontainers.image.version=${{ env.PACKAGE_VERSION }}
|
||||
org.opencontainers.image.licenses=MIT
|
||||
org.opencontainers.image.revision=${{ github.sha }}
|
||||
org.opencontainers.image.revision=${{ env.SHA1 }}
|
||||
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 }}"
|
||||
org.opencontainers.image.registry=${{ env.IMAGE_REGISTRY }}
|
||||
org.tvapp2.image.build-version="Version: ${{ env.PACKAGE_VERSION }} Date: ${{ env.NOW_DOCKER }}"
|
||||
org.tvapp2.image.build-version-alpine=${{ env.IMAGE_ALPINE_VERSION }}
|
||||
org.tvapp2.image.build-release="${{ inputs.DEV_RELEASE == true && 'development' || 'stable' }}"
|
||||
org.tvapp2.image.build-sha1=${{ env.SHA1 }}
|
||||
|
||||
# #
|
||||
# Release › Gitea › Meta › Release
|
||||
@@ -520,13 +797,13 @@ jobs:
|
||||
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 }}
|
||||
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=450,prefix=,suffix=,value=${{ env.PACKAGE_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 }}
|
||||
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=425,prefix=,suffix=,value=${{ env.PKG_VER_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 }}
|
||||
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=400,prefix=,suffix=,value=${{ env.PKG_VER_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
|
||||
@@ -536,25 +813,33 @@ jobs:
|
||||
flavor: |
|
||||
latest=false
|
||||
labels: |
|
||||
org.opencontainers.image.description=TVApp2
|
||||
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
|
||||
org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
|
||||
org.opencontainers.image.version=${{ env.PACKAGE_VERSION }}
|
||||
org.opencontainers.image.licenses=MIT
|
||||
org.opencontainers.image.revision=${{ github.sha }}
|
||||
org.opencontainers.image.revision=${{ env.SHA1 }}
|
||||
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.registry=${{ env.IMAGE_REGISTRY }}
|
||||
org.tvapp2.image.build-version="Version: ${{ env.PACKAGE_VERSION }} Date: ${{ env.NOW_DOCKER }}"
|
||||
org.tvapp2.image.build-version-alpine=${{ env.IMAGE_ALPINE_VERSION }}
|
||||
org.tvapp2.image.build-release="${{ inputs.DEV_RELEASE == true && 'development' || 'stable' }}"
|
||||
org.tvapp2.image.build-sha1=${{ env.SHA1 }}
|
||||
annotations: |-
|
||||
org.opencontainers.image.description=TVApp2
|
||||
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
|
||||
org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
|
||||
org.opencontainers.image.version=${{ env.PACKAGE_VERSION }}
|
||||
org.opencontainers.image.licenses=MIT
|
||||
org.opencontainers.image.revision=${{ github.sha }}
|
||||
org.opencontainers.image.revision=${{ env.SHA1 }}
|
||||
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 }}"
|
||||
org.opencontainers.image.registry=${{ env.IMAGE_REGISTRY }}
|
||||
org.tvapp2.image.build-version="Version: ${{ env.PACKAGE_VERSION }} Date: ${{ env.NOW_DOCKER }}"
|
||||
org.tvapp2.image.build-version-alpine=${{ env.IMAGE_ALPINE_VERSION }}
|
||||
org.tvapp2.image.build-release="${{ inputs.DEV_RELEASE == true && 'development' || 'stable' }}"
|
||||
org.tvapp2.image.build-sha1=${{ env.SHA1 }}
|
||||
|
||||
# #
|
||||
# Release › Gitea › Build and Push › Amd64
|
||||
@@ -565,19 +850,41 @@ jobs:
|
||||
uses: docker/build-push-action@v6
|
||||
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
|
||||
with:
|
||||
allow: |
|
||||
network.host
|
||||
network: host
|
||||
context: .
|
||||
file: Dockerfile
|
||||
platforms: linux/amd64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
labels: ${{ steps.task_release_gi_meta_amd64.outputs.labels }}
|
||||
tags: |
|
||||
${{ steps.task_release_gi_meta_amd64.outputs.tags }}
|
||||
provenance: false
|
||||
sbom: false
|
||||
tags: |
|
||||
${{ steps.task_release_gi_meta_amd64.outputs.tags }}
|
||||
build-args: |-
|
||||
ARCH=amd64
|
||||
VERSION=${{ env.IMAGE_VERSION }}
|
||||
BUILDDATE=${{ env.NOW_DOCKER_LABEL }}
|
||||
RELEASE=${{ inputs.DEV_RELEASE == true && 'development' || 'stable' }}
|
||||
VERSION=${{ env.PACKAGE_VERSION }}
|
||||
BUILDDATE=${{ env.NOW_DOCKER }}
|
||||
GIT_SHA1=${{ env.SHA1 }}
|
||||
ALPINE_VERSION=${{ env.IMAGE_ALPINE_VERSION }}
|
||||
annotations: |-
|
||||
org.opencontainers.image.description=TVApp2
|
||||
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
|
||||
org.opencontainers.image.version=${{ env.PACKAGE_VERSION }}
|
||||
org.opencontainers.image.licenses=MIT
|
||||
org.opencontainers.image.architecture=amd64
|
||||
org.opencontainers.image.revision=${{ env.SHA1 }}
|
||||
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=${{ env.IMAGE_REGISTRY }}
|
||||
org.tvapp2.image.build-version="Version: ${{ env.PACKAGE_VERSION }} Date: ${{ env.NOW_DOCKER }}"
|
||||
org.tvapp2.image.build-version-alpine=${{ env.IMAGE_ALPINE_VERSION }}
|
||||
org.tvapp2.image.build-architecture=amd64
|
||||
org.tvapp2.image.build-release="${{ inputs.DEV_RELEASE == true && 'development' || 'stable' }}"
|
||||
org.tvapp2.image.build-sha1=${{ env.SHA1 }}
|
||||
|
||||
# #
|
||||
# Release › Gitea › Export Digest › Amd64
|
||||
@@ -616,19 +923,41 @@ jobs:
|
||||
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_gi_meta_arm64.outputs.labels }}
|
||||
tags: |
|
||||
${{ steps.task_release_gi_meta_arm64.outputs.tags }}
|
||||
provenance: false
|
||||
sbom: false
|
||||
tags: |
|
||||
${{ steps.task_release_gi_meta_arm64.outputs.tags }}
|
||||
build-args: |-
|
||||
ARCH=arm64
|
||||
VERSION=${{ env.IMAGE_VERSION }}
|
||||
BUILDDATE=${{ env.NOW_DOCKER_LABEL }}
|
||||
RELEASE=${{ inputs.DEV_RELEASE == true && 'development' || 'stable' }}
|
||||
VERSION=${{ env.PACKAGE_VERSION }}
|
||||
BUILDDATE=${{ env.NOW_DOCKER }}
|
||||
GIT_SHA1=${{ env.SHA1 }}
|
||||
ALPINE_VERSION=${{ env.IMAGE_ALPINE_VERSION }}
|
||||
annotations: |-
|
||||
org.opencontainers.image.description=TVApp2
|
||||
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
|
||||
org.opencontainers.image.version=${{ env.PACKAGE_VERSION }}
|
||||
org.opencontainers.image.licenses=MIT
|
||||
org.opencontainers.image.architecture=arm64
|
||||
org.opencontainers.image.revision=${{ env.SHA1 }}
|
||||
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=${{ env.IMAGE_REGISTRY }}
|
||||
org.tvapp2.image.build-version="Version: ${{ env.PACKAGE_VERSION }} Date: ${{ env.NOW_DOCKER }}"
|
||||
org.tvapp2.image.build-version-alpine=${{ env.IMAGE_ALPINE_VERSION }}
|
||||
org.tvapp2.image.build-architecture=arm64
|
||||
org.tvapp2.image.build-release="${{ inputs.DEV_RELEASE == true && 'development' || 'stable' }}"
|
||||
org.tvapp2.image.build-sha1=${{ env.SHA1 }}
|
||||
|
||||
# #
|
||||
# Release › Gitea › Export Digest › Arm64
|
||||
@@ -658,6 +987,70 @@ jobs:
|
||||
if-no-files-found: error
|
||||
retention-days: 10
|
||||
|
||||
# #
|
||||
# Release › Gitea › Checkpoint
|
||||
# #
|
||||
|
||||
- name: '⚠️ Checkpoint'
|
||||
run: |
|
||||
echo ""
|
||||
echo "---- [ GITHUB ] ----------------------------------------------------------------------------------------"
|
||||
echo "github.actor.............................. ${{ github.actor }}"
|
||||
echo "github.ref ............................... ${{ github.ref }}"
|
||||
echo "github.ref_name .......................... ${{ github.ref_name }}"
|
||||
echo "github.event_name ........................ ${{ github.event_name }}"
|
||||
echo "github.repository_owner .................. ${{ github.repository_owner }}"
|
||||
echo "github.repository ........................ ${{ github.repository }}"
|
||||
echo "github.sha ............................... ${{ github.sha }}"
|
||||
echo ""
|
||||
echo "---- [ INPUTS ] ----------------------------------------------------------------------------------------"
|
||||
echo "inputs.IMAGE_NAME ........................ ${{ inputs.IMAGE_NAME }}"
|
||||
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.PACKAGE_VERSION ...................... ${{ env.PACKAGE_VERSION }}"
|
||||
echo "env.PKG_VER_1DIGIT ....................... ${{ env.PKG_VER_1DIGIT }}"
|
||||
echo "env.PKG_VER_2DIGIT ....................... ${{ env.PKG_VER_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 ........................... ${{ env.NOW_DOCKER }}"
|
||||
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 " SHA 1 (GITHUB_SHA) ...................... ${GITHUB_SHA}"
|
||||
echo " SHA 2 (github.sha) ...................... ${{ github.sha }}"
|
||||
echo " SHA 3 (env.SHA1) ........................ ${{ env.SHA1 }}"
|
||||
echo " SHA 4 (env.SHA1_GH) ..................... ${{ env.SHA1_GH }}"
|
||||
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 }}"
|
||||
echo ""
|
||||
|
||||
# #
|
||||
# Release › Gitea › Push Manifest
|
||||
# #
|
||||
@@ -666,81 +1059,19 @@ jobs:
|
||||
id: task_release_gi_manifest
|
||||
uses: int128/docker-manifest-create-action@v2
|
||||
with:
|
||||
tags: |
|
||||
${{ steps.task_release_gi_meta_release.outputs.tags }}
|
||||
sources: |
|
||||
${{ env.IMAGE_GITEA_WEBSITE }}/${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}@${{ steps.task_release_gi_push_amd64.outputs.digest }}
|
||||
${{ env.IMAGE_GITEA_WEBSITE }}/${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}@${{ steps.task_release_gi_push_arm64.outputs.digest }}
|
||||
index-annotations: |
|
||||
${{ steps.task_release_gi_meta_release.outputs.labels }}
|
||||
|
||||
# #
|
||||
# Release › Gitea › Checkpoint
|
||||
# #
|
||||
|
||||
- name: '⚠️ Checkpoint'
|
||||
id: task_release_gi_checkpoint
|
||||
run: |
|
||||
echo ""
|
||||
echo "[ GITHUB ] ---------------------------------------------------------------------------------------------"
|
||||
echo "github.actor.............................. ${{ github.actor }}"
|
||||
echo "github.ref ............................... ${{ github.ref }}"
|
||||
echo "github.ref_name .......................... ${{ github.ref_name }}"
|
||||
echo "github.event_name ........................ ${{ github.event_name }}"
|
||||
echo "github.repository_owner .................. ${{ github.repository_owner }}"
|
||||
echo "github.repository ........................ ${{ github.repository }}"
|
||||
echo ""
|
||||
echo "[ INPUTS ] ---------------------------------------------------------------------------------------------"
|
||||
echo "inputs.IMAGE_NAME ........................ ${{ inputs.IMAGE_NAME }}"
|
||||
echo "inputs.IMAGE_VERSION ..................... ${{ inputs.IMAGE_VERSION }}"
|
||||
echo "inputs.IMAGE_GITEA_USERNAME .............. ${{ inputs.IMAGE_GITEA_AUTHOR }}"
|
||||
echo "inputs.IMAGE_GITEA_USERNAME .............. ${{ inputs.IMAGE_GITEA_USERNAME }}"
|
||||
echo "inputs.IMAGE_GITEA_WEBSITE ............... ${{ inputs.IMAGE_GITEA_WEBSITE }}"
|
||||
echo "inputs.DEV_RELEASE ....................... ${{ inputs.DEV_RELEASE }}"
|
||||
echo "inputs.DRY_RUN ........................... ${{ inputs.DRY_RUN }}"
|
||||
echo ""
|
||||
echo "[ ENV ] ------------------------------------------------------------------------------------------------"
|
||||
echo "env.IMAGE_NAME ........................... ${{ env.IMAGE_NAME }}"
|
||||
echo "env.IMAGE_VERSION ........................ ${{ env.IMAGE_VERSION }}"
|
||||
echo "env.IMAGE_VERSION_1DIGIT ................. ${{ env.IMAGE_VERSION_1DIGIT }}"
|
||||
echo "env.IMAGE_VERSION_2DIGIT ................. ${{ env.IMAGE_VERSION_2DIGIT }}"
|
||||
echo "env.IMAGE_GITEA_AUTHOR ................... ${{ env.IMAGE_GITEA_AUTHOR }}"
|
||||
echo "env.IMAGE_GITEA_USERNAME ................. ${{ env.IMAGE_GITEA_USERNAME }}"
|
||||
echo "env.IMAGE_GITEA_WEBSITE .................. ${{ env.IMAGE_GITEA_WEBSITE }}"
|
||||
echo "env.NOW .................................. ${{ env.NOW }}"
|
||||
echo "env.NOW_SHORT ............................ ${{ env.NOW_SHORT }}"
|
||||
echo "env.NOW_LONG ............................. ${{ env.NOW_LONG }}"
|
||||
echo "env.NOW_DOCKER_LABEL ..................... ${{ env.NOW_DOCKER_LABEL }}"
|
||||
echo "env.NOW_DOCKER_TS ........................ ${{ env.NOW_DOCKER_TS }}"
|
||||
echo "env.REGISTRY_REPO_ORG_AUTHOR_LC .......... ${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}"
|
||||
echo "env.REGISTRY_REPO_AUTHOR_LC .............. ${{ env.REGISTRY_REPO_AUTHOR_LC }}"
|
||||
echo "env.DOCKER_SHA ........................... ${{ env.DOCKER_SHA }}"
|
||||
echo ""
|
||||
echo "[ DOCKER IMAGES ] --------------------------------------------------------------------------------------"
|
||||
echo "registry ................................. Gitea"
|
||||
echo "(amd64) tags ............................. ${{ steps.task_release_gi_meta_amd64.outputs.tags }}"
|
||||
echo "(amd64) labels ........................... ${{ steps.task_release_gi_meta_amd64.outputs.labels }}"
|
||||
echo "(amd64) digest ........................... ${{ steps.task_release_gi_push_amd64.outputs.digest }}"
|
||||
echo ""
|
||||
echo "(arm64) tags ............................. ${{ steps.task_release_gi_meta_arm64.outputs.tags }}"
|
||||
echo "(arm64) labels ........................... ${{ steps.task_release_gi_meta_arm64.outputs.labels }}"
|
||||
echo "(arm64) digest ........................... ${{ steps.task_release_gi_push_arm64.outputs.digest }}"
|
||||
echo ""
|
||||
echo "(release) tags ........................... ${{ steps.task_release_gi_meta_release.outputs.tags }}"
|
||||
echo "(release) labels ......................... ${{ steps.task_release_gi_meta_release.outputs.labels }}"
|
||||
echo ""
|
||||
echo "[ DOCKER DIGESTS ] -------------------------------------------------------------------------------------"
|
||||
echo "docker image id (amd64) .................. ${{ steps.task_release_gi_push_amd64.outputs.imageid }}"
|
||||
echo "docker digest (amd64) .................... ${{ steps.task_release_gi_push_amd64.outputs.digest }}"
|
||||
echo "docker image id (arm64) .................. ${{ steps.task_release_gi_push_arm64.outputs.imageid }}"
|
||||
echo "docker digest (arm64) .................... ${{ steps.task_release_gi_push_arm64.outputs.digest }}"
|
||||
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 › 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
|
||||
@@ -754,27 +1085,27 @@ jobs:
|
||||
uses: tsickert/discord-webhook@v7.0.0
|
||||
if: success()
|
||||
with:
|
||||
username: 'Io'
|
||||
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
|
||||
username: ${{ env.DISCORD_BOT_NAME }}
|
||||
avatar-url: ${{ env.DISCORD_BOT_AVATAR }}
|
||||
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-thumbnail-url: ${{ env.DISCORD_BOT_EMBED_THUMBNAIL }}
|
||||
embed-description: |
|
||||
### 📦 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.PACKAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}`
|
||||
${{ inputs.DEV_RELEASE == true && '### ⚠️⚠️ Development / Pre-release ⚠️⚠️' || '' }}
|
||||
|
||||
A new version of the docker container `${{ env.IMAGE_NAME }}` has been released from Github to Gitea. The image is available at:
|
||||
- https://${{ env.IMAGE_GITEA_WEBSITE }}/${{ env.IMAGE_GITEA_USERNAME }}/${{ env.IMAGE_NAME }}/packages
|
||||
|
||||
- Version: `${{ env.IMAGE_VERSION }}`
|
||||
- Version: `${{ env.PACKAGE_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: `docker pull ${{ env.IMAGE_GITEA_WEBSITE }}/${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}:${{ inputs.DEV_RELEASE == true && 'development' || env.PACKAGE_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' || '' }}`
|
||||
- Docker Image: `${{ env.IMAGE_NAME }}-${{ env.PACKAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}`
|
||||
- Branch: `${{ github.ref_name }}`
|
||||
- Workflow: `${{ github.workflow }} (#${{github.run_number}})`
|
||||
- Runner: `${{ runner.name }}`
|
||||
@@ -799,4 +1130,4 @@ jobs:
|
||||
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"
|
||||
embed-author-icon-url: ${{ env.DISCORD_BOT_EMBED_AUTHOR_ICON }}
|
||||
|
||||
625
.github/workflows/deploy-docker-github.yml
vendored
625
.github/workflows/deploy-docker-github.yml
vendored
@@ -31,8 +31,8 @@
|
||||
# act -W .github/workflows/deploy-docker-github.yml -s TOKEN_CL=XXXXXXXXXX --pull=false
|
||||
# #
|
||||
|
||||
name: "📦 Deploy › Docker › Github"
|
||||
run-name: "📦 Deploy › Docker › Github"
|
||||
name: '📦 Deploy › Docker › Github'
|
||||
run-name: '📦 Deploy › Docker › Github'
|
||||
|
||||
# #
|
||||
# Triggers
|
||||
@@ -63,15 +63,18 @@ on:
|
||||
type: string
|
||||
|
||||
# #
|
||||
# Image Version
|
||||
# Registry Name
|
||||
#
|
||||
# used to create new release tag, and add version to docker image name
|
||||
# options:
|
||||
# - github
|
||||
# - dockerhub
|
||||
# - gitea
|
||||
# #
|
||||
|
||||
IMAGE_VERSION:
|
||||
description: '🏷️ Image Version'
|
||||
IMAGE_REGISTRY:
|
||||
description: '📘 Registry Name'
|
||||
required: true
|
||||
default: '1.0.0'
|
||||
default: 'github'
|
||||
type: string
|
||||
|
||||
# #
|
||||
@@ -99,6 +102,18 @@ on:
|
||||
default: 'TheBinaryNinja'
|
||||
type: string
|
||||
|
||||
# #
|
||||
# Alpine Version
|
||||
#
|
||||
# specifies the alpine base docker image version
|
||||
# #
|
||||
|
||||
IMAGE_ALPINE_VERSION:
|
||||
description: '📀 Alpine Version'
|
||||
required: true
|
||||
default: '3.22'
|
||||
type: string
|
||||
|
||||
# #
|
||||
# true no changes to the repo will be made
|
||||
# false workflow will behave normally, and push any changes detected to the files
|
||||
@@ -134,15 +149,20 @@ on:
|
||||
# #
|
||||
|
||||
env:
|
||||
IMAGE_NAME: ${{ github.event.inputs.IMAGE_NAME || 'tvapp2' }}
|
||||
IMAGE_VERSION: ${{ github.event.inputs.IMAGE_VERSION || '1.0.0' }}
|
||||
IMAGE_GHCR_AUTHOR: ${{ github.event.inputs.IMAGE_GHCR_AUTHOR || 'BinaryNinja' }}
|
||||
IMAGE_GHCR_USERNAME: ${{ github.event.inputs.IMAGE_GHCR_USERNAME || 'BinaryNinja' }}
|
||||
IMAGE_NAME: ${{ github.event.inputs.IMAGE_NAME || 'tvapp2' }}
|
||||
IMAGE_REGISTRY: ${{ github.event.inputs.IMAGE_REGISTRY || 'github' }}
|
||||
IMAGE_GHCR_AUTHOR: ${{ github.event.inputs.IMAGE_GHCR_AUTHOR || 'BinaryNinja' }}
|
||||
IMAGE_GHCR_USERNAME: ${{ github.event.inputs.IMAGE_GHCR_USERNAME || 'BinaryNinja' }}
|
||||
IMAGE_ALPINE_VERSION: ${{ github.event.inputs.IMAGE_ALPINE_VERSION || '3.22' }}
|
||||
DISCORD_BOT_NAME: 'Europa'
|
||||
DISCORD_BOT_AVATAR: 'https://i.imgur.com/UqwMom1.jpeg'
|
||||
DISCORD_BOT_EMBED_AUTHOR_ICON: 'https://avatars.githubusercontent.com/u/200161462'
|
||||
DISCORD_BOT_EMBED_THUMBNAIL: 'https://avatars.githubusercontent.com/u/200161462'
|
||||
|
||||
BOT_NAME_1: EuropaServ
|
||||
BOT_NAME_2: BinaryServ
|
||||
BOT_NAME_DEPENDABOT: dependabot[bot]
|
||||
BOT_NAME_RENOVATE: renovate[bot]
|
||||
BOT_NAME_1: EuropaServ
|
||||
BOT_NAME_2: BinaryServ
|
||||
BOT_NAME_DEPENDABOT: dependabot[bot]
|
||||
BOT_NAME_RENOVATE: renovate[bot]
|
||||
|
||||
# #
|
||||
# Jobs
|
||||
@@ -161,9 +181,11 @@ jobs:
|
||||
job-docker-release-tags-create:
|
||||
name: >-
|
||||
📦 Release › Create Tag
|
||||
# runs-on: ubuntu-latest
|
||||
runs-on: apollo-x64
|
||||
runs-on: ubuntu-latest
|
||||
# runs-on: apollo-x64
|
||||
timeout-minutes: 4
|
||||
outputs:
|
||||
package_version: ${{ steps.task_initialize_package_getversion.outputs.PACKAGE_VERSION }}
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
@@ -171,31 +193,149 @@ jobs:
|
||||
id-token: write
|
||||
steps:
|
||||
|
||||
# #
|
||||
# Release › Tags › Start
|
||||
# #
|
||||
|
||||
- name: '🏳️ Start'
|
||||
id: task_release_tags_start
|
||||
run: |
|
||||
echo "Creating Tag"
|
||||
|
||||
# #
|
||||
# Release › Tags › Checkout
|
||||
# #
|
||||
|
||||
- name: '✅ Checkout'
|
||||
id: task_release_tags_checkout
|
||||
- name: '☑️ Checkout'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# #
|
||||
# Release › Tags › Job Information
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🔄 Load Job
|
||||
uses: qoomon/actions--context@v4
|
||||
id: 'context'
|
||||
|
||||
# #
|
||||
# Release › Tags › Set › Package.json › Version
|
||||
# #
|
||||
|
||||
- name: '👁️🗨️ Package Version › Set'
|
||||
id: task_initialize_package_getversion
|
||||
working-directory: ./tvapp2
|
||||
run: |
|
||||
VER=$(cat package.json | jq -r '.version')
|
||||
echo "PACKAGE_VERSION=${VER}" >> $GITHUB_OUTPUT
|
||||
echo "PACKAGE_VERSION=${VER}" >> $GITHUB_ENV
|
||||
|
||||
# #
|
||||
# Initialize › Get › Package.json › Version
|
||||
# #
|
||||
|
||||
- name: '👁️🗨️ Package Version › Get'
|
||||
run: |
|
||||
echo "VERSION: ${{ steps.task_initialize_package_getversion.outputs.PACKAGE_VERSION }}"
|
||||
|
||||
# #
|
||||
# Release › Tags › Start
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
✅ Start
|
||||
run: |
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo " Starting Job ${{ steps.context.outputs.job_name }}"
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
|
||||
YEAR="$(date +'%Y')"
|
||||
echo "YEAR=${YEAR}" >> $GITHUB_ENV
|
||||
|
||||
NOW="$(date +'%m-%d-%Y %H:%M:%S')" # 02-25-2025 12:49:48
|
||||
echo "NOW=${NOW}" >> $GITHUB_ENV
|
||||
|
||||
NOW_SHORT="$(date +'%m-%d-%Y')" # 02-25-2025
|
||||
echo "NOW_SHORT=${NOW_SHORT}" >> $GITHUB_ENV
|
||||
|
||||
NOW_LONG="$(date +'%m-%d-%Y %H:%M')" # 02-25-2025 12:49
|
||||
echo "NOW_LONG=${NOW_LONG}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER="$(date +'%Y%m%d')" # 20250225
|
||||
echo "NOW_DOCKER=${NOW_DOCKER}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER_TS="$(date -u +'%FT%T.%3NZ')" # 2025-02-25T12:50:11.569Z
|
||||
echo "NOW_DOCKER_TS=${NOW_DOCKER_TS}" >> $GITHUB_ENV
|
||||
|
||||
SHA1="$(git rev-parse HEAD)" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1=${SHA1}" >> $GITHUB_ENV
|
||||
|
||||
SHA1_GH="$(echo ${GITHUB_SHA})" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1_GH=${SHA1_GH}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_1DIGIT="$(echo ${{ env.PACKAGE_VERSION }} | cut -d '.' -f1-1)" # 3.22 > 3
|
||||
echo "PKG_VER_1DIGIT=${PKG_VER_1DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_2DIGIT="$(echo ${{ env.PACKAGE_VERSION }} | cut -f2 -d ":" | cut -c1-3)" # 3.22 > 3.2
|
||||
echo "PKG_VER_2DIGIT=${PKG_VER_2DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
sudo apt -qq update
|
||||
sudo apt -qq install tree
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
echo " Runner .............. ${{ runner.name }}"
|
||||
echo " Workflow ............ ${{ github.workflow }} (#${{ github.workflow_ref }})"
|
||||
echo " Run Number .......... ${{ github.run_number }}"
|
||||
echo " Ref ................. ${{ github.ref }}"
|
||||
echo " Ref Name ............ ${{ github.ref_name }}"
|
||||
echo " Event Name .......... ${{ github.event_name }}"
|
||||
echo " Repo ................ ${{ github.repository }}"
|
||||
echo " Repo Owner .......... ${{ github.repository_owner }}"
|
||||
echo " Run ID .............. https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
echo " Triggered By ........ ${{ github.actor }}"
|
||||
echo " SHA 1 (GITHUB_SHA) .. ${GITHUB_SHA}"
|
||||
echo " SHA 2 (github.sha) .. ${{ github.sha }}"
|
||||
echo " SHA 3 (env.SHA1) .... ${SHA1}"
|
||||
echo " SHA 4 (env.SHA1_GH) . ${SHA1_GH}"
|
||||
echo " Workspace ........... ${{ github.workspace }}"
|
||||
echo " PWD ................. ${PWD}"
|
||||
echo " Job Name ............ ${{ steps.context.outputs.job_name }}"
|
||||
echo " Job ID .............. ${{ steps.context.outputs.job_id }}"
|
||||
echo " Job URL ............. ${{ steps.context.outputs.job_url }}"
|
||||
echo " Run ID .............. ${{ steps.context.outputs.run_id }}"
|
||||
echo " Run Attempt ......... ${{ steps.context.outputs.run_attempt }}"
|
||||
echo " Run Number .......... ${{ steps.context.outputs.run_number }}"
|
||||
echo " Run URL ............. ${{ steps.context.outputs.run_url }}"
|
||||
echo " Run Env ............. ${{ steps.context.outputs.environment }}"
|
||||
echo " Run Env URL ......... ${{ steps.context.outputs.environment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Deployment URL .. ${{ steps.context.outputs.deployment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Runner Name ..... ${{ steps.context.outputs.runner_name }}"
|
||||
echo " Run Runner ID ....... ${{ steps.context.outputs.runner_id }}"
|
||||
echo " Year ................ ${YEAR}"
|
||||
echo " Now ................. ${NOW}"
|
||||
echo " Now (Short) ......... ${NOW_SHORT}"
|
||||
echo " Now (Long) .......... ${NOW_LONG}"
|
||||
echo " Now (Docker) ........ ${NOW_DOCKER}"
|
||||
echo " Now (Docker TS) ..... ${NOW_DOCKER_TS}"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
tree -I node_modules -I .git
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# #
|
||||
# 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)
|
||||
@@ -210,18 +350,17 @@ jobs:
|
||||
fi
|
||||
|
||||
# #
|
||||
# Release › Tags › Create Tag
|
||||
# Tags › 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: "${{ env.PACKAGE_VERSION }}"
|
||||
tag_exists_error: false
|
||||
message: '${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}'
|
||||
message: '${{ env.IMAGE_NAME }}-${{ env.PACKAGE_VERSION }}'
|
||||
gpg_private_key: ${{ secrets.ADMINSERV_GPG_KEY_ASC }}
|
||||
gpg_passphrase: ${{ secrets.ADMINSERV_GPG_PASSPHRASE }}
|
||||
|
||||
@@ -232,58 +371,151 @@ jobs:
|
||||
job-docker-release-github:
|
||||
name: >-
|
||||
📦 Release › Github
|
||||
# runs-on: ubuntu-latest
|
||||
runs-on: apollo-x64
|
||||
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
|
||||
needs: [ job-docker-release-tags-create ]
|
||||
env:
|
||||
PACKAGE_VERSION: ${{ needs.job-docker-release-tags-create.outputs.package_version }}
|
||||
steps:
|
||||
|
||||
# #
|
||||
# Release › Github › Start › Amd64
|
||||
# Release › Github › Checkout
|
||||
# #
|
||||
|
||||
- name: '🏳️ Start'
|
||||
id: task_release_gh_start
|
||||
run: |
|
||||
echo "Starting Github docker release"
|
||||
|
||||
# #
|
||||
# Release › Github › Checkout › Amd64
|
||||
# #
|
||||
|
||||
- name: '✅ Checkout'
|
||||
id: task_release_gh_checkout
|
||||
- name: '☑️ Checkout'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# #
|
||||
# Release › Github › Get Timestamp
|
||||
# Release › Github › Job Information
|
||||
# #
|
||||
|
||||
- name: '🕛 Get Timestamp'
|
||||
id: task_release_set_timestamp
|
||||
- name: >-
|
||||
🔄 Load Job
|
||||
uses: qoomon/actions--context@v4
|
||||
id: 'context'
|
||||
|
||||
# #
|
||||
# Release › Github › Start
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
✅ Start
|
||||
run: |
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo " Starting Job ${{ steps.context.outputs.job_name }}"
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
|
||||
YEAR="$(date +'%Y')"
|
||||
echo "YEAR=${YEAR}" >> $GITHUB_ENV
|
||||
|
||||
NOW="$(date +'%m-%d-%Y %H:%M:%S')" # 02-25-2025 12:49:48
|
||||
echo "NOW=${NOW}" >> $GITHUB_ENV
|
||||
|
||||
NOW_SHORT="$(date +'%m-%d-%Y')" # 02-25-2025
|
||||
echo "NOW_SHORT=${NOW_SHORT}" >> $GITHUB_ENV
|
||||
|
||||
NOW_LONG="$(date +'%m-%d-%Y %H:%M')" # 02-25-2025 12:49
|
||||
echo "NOW_LONG=${NOW_LONG}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER="$(date +'%Y%m%d')" # 20250225
|
||||
echo "NOW_DOCKER=${NOW_DOCKER}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER_TS="$(date -u +'%FT%T.%3NZ')" # 2025-02-25T12:50:11.569Z
|
||||
echo "NOW_DOCKER_TS=${NOW_DOCKER_TS}" >> $GITHUB_ENV
|
||||
|
||||
SHA1="$(git rev-parse HEAD)" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1=${SHA1}" >> $GITHUB_ENV
|
||||
|
||||
SHA1_GH="$(echo ${GITHUB_SHA})" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1_GH=${SHA1_GH}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_1DIGIT="$(echo ${{ env.PACKAGE_VERSION }} | cut -d '.' -f1-1)" # 3.22 > 3
|
||||
echo "PKG_VER_1DIGIT=${PKG_VER_1DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_2DIGIT="$(echo ${{ env.PACKAGE_VERSION }} | cut -f2 -d ":" | cut -c1-3)" # 3.22 > 3.2
|
||||
echo "PKG_VER_2DIGIT=${PKG_VER_2DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
sudo apt -qq update
|
||||
sudo apt -qq install tree
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
echo " Runner .............. ${{ runner.name }}"
|
||||
echo " Workflow ............ ${{ github.workflow }} (#${{ github.workflow_ref }})"
|
||||
echo " Run Number .......... ${{ github.run_number }}"
|
||||
echo " Ref ................. ${{ github.ref }}"
|
||||
echo " Ref Name ............ ${{ github.ref_name }}"
|
||||
echo " Event Name .......... ${{ github.event_name }}"
|
||||
echo " Repo ................ ${{ github.repository }}"
|
||||
echo " Repo Owner .......... ${{ github.repository_owner }}"
|
||||
echo " Run ID .............. https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
echo " Triggered By ........ ${{ github.actor }}"
|
||||
echo " SHA 1 (GITHUB_SHA) .. ${GITHUB_SHA}"
|
||||
echo " SHA 2 (github.sha) .. ${{ github.sha }}"
|
||||
echo " SHA 3 (env.SHA1) .... ${SHA1}"
|
||||
echo " SHA 4 (env.SHA1_GH) . ${SHA1_GH}"
|
||||
echo " Workspace ........... ${{ github.workspace }}"
|
||||
echo " PWD ................. ${PWD}"
|
||||
echo " Job Name ............ ${{ steps.context.outputs.job_name }}"
|
||||
echo " Job ID .............. ${{ steps.context.outputs.job_id }}"
|
||||
echo " Job URL ............. ${{ steps.context.outputs.job_url }}"
|
||||
echo " Run ID .............. ${{ steps.context.outputs.run_id }}"
|
||||
echo " Run Attempt ......... ${{ steps.context.outputs.run_attempt }}"
|
||||
echo " Run Number .......... ${{ steps.context.outputs.run_number }}"
|
||||
echo " Run URL ............. ${{ steps.context.outputs.run_url }}"
|
||||
echo " Run Env ............. ${{ steps.context.outputs.environment }}"
|
||||
echo " Run Env URL ......... ${{ steps.context.outputs.environment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Deployment URL .. ${{ steps.context.outputs.deployment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Runner Name ..... ${{ steps.context.outputs.runner_name }}"
|
||||
echo " Run Runner ID ....... ${{ steps.context.outputs.runner_id }}"
|
||||
echo " Year ................ ${YEAR}"
|
||||
echo " Now ................. ${NOW}"
|
||||
echo " Now (Short) ......... ${NOW_SHORT}"
|
||||
echo " Now (Long) .......... ${NOW_LONG}"
|
||||
echo " Now (Docker) ........ ${NOW_DOCKER}"
|
||||
echo " Now (Docker TS) ..... ${NOW_DOCKER_TS}"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
tree -I node_modules -I .git
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# #
|
||||
# Release › Github › Set Vars
|
||||
# #
|
||||
|
||||
- name: '🕛 Set Vars'
|
||||
run: |
|
||||
echo "IMAGE_VERSION_1DIGIT=`echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-1`" >> ${GITHUB_ENV} # 1
|
||||
echo "IMAGE_VERSION_2DIGIT=`echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-2`" >> ${GITHUB_ENV} # 1.0
|
||||
echo "REGISTRY_REPO_ORG_AUTHOR_LC=`echo ${{ env.IMAGE_GHCR_AUTHOR }}/${{ env.IMAGE_NAME }} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} # thebinaryninja/tvapp2
|
||||
echo "REGISTRY_REPO_AUTHOR_LC=`echo ${{ env.IMAGE_GHCR_AUTHOR }} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} # thebinaryninja
|
||||
echo "DOCKER_SHA=${GITHUB_SHA}" >> $GITHUB_ENV # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "NOW=$(date +'%m-%d-%Y %H:%M:%S')" >> $GITHUB_ENV # 02-25-2025 12:49:48
|
||||
echo "NOW_SHORT=$(date +'%m-%d-%Y')" >> $GITHUB_ENV # 02-25-2025
|
||||
echo "NOW_LONG=$(date +'%m-%d-%Y %H:%M')" >> $GITHUB_ENV # 02-25-2025 12:49
|
||||
echo "NOW_DOCKER_LABEL=$(date +'%Y%m%d')" >> $GITHUB_ENV # 20250225
|
||||
echo "NOW_DOCKER_TS=$(date -u +'%FT%T.%3NZ')" >> $GITHUB_ENV # 2025-02-25T12:50:11.569Z
|
||||
|
||||
# #
|
||||
# Release › Github › Install Dependencies
|
||||
# #
|
||||
|
||||
- name: '📦 Install Dependencies'
|
||||
id: task_release_gh_dependencies
|
||||
run:
|
||||
sudo apt-get install -qq dos2unix
|
||||
|
||||
@@ -292,7 +524,6 @@ jobs:
|
||||
# #
|
||||
|
||||
- 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 --
|
||||
@@ -303,7 +534,6 @@ jobs:
|
||||
# #
|
||||
|
||||
- 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)
|
||||
@@ -322,7 +552,6 @@ jobs:
|
||||
# #
|
||||
|
||||
- name: '⚙️ Set up QEMU'
|
||||
id: task_release_gh_qemu
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
# #
|
||||
@@ -330,7 +559,6 @@ jobs:
|
||||
# #
|
||||
|
||||
- name: '⚙️ Setup Buildx'
|
||||
id: task_release_gh_buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
version: latest
|
||||
@@ -341,7 +569,6 @@ jobs:
|
||||
# #
|
||||
|
||||
- name: '⚙️ Login to Github'
|
||||
id: task_release_gh_registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
@@ -364,11 +591,12 @@ jobs:
|
||||
|
||||
const { promises: fs } = require('fs')
|
||||
|
||||
const main = async () => {
|
||||
const path = "README.md"
|
||||
let content = await fs.readFile(path, 'utf8')
|
||||
const main = async () =>
|
||||
{
|
||||
const path = "README.md"
|
||||
let content = await fs.readFile(path, 'utf8')
|
||||
|
||||
core.setOutput('content', content)
|
||||
core.setOutput('content', content)
|
||||
}
|
||||
|
||||
main().catch(err => core.setFailed(err.message))
|
||||
@@ -394,13 +622,13 @@ jobs:
|
||||
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 }}
|
||||
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=450,prefix=,suffix=,value=${{ env.PACKAGE_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 }}
|
||||
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=425,prefix=,suffix=,value=${{ env.PKG_VER_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 }}
|
||||
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && inputs.DEV_RELEASE == false }},priority=400,prefix=,suffix=,value=${{ env.PKG_VER_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
|
||||
@@ -410,25 +638,33 @@ jobs:
|
||||
flavor: |
|
||||
latest=false
|
||||
labels: |
|
||||
org.opencontainers.image.description=TVApp2
|
||||
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
|
||||
org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
|
||||
org.opencontainers.image.version=${{ env.PACKAGE_VERSION }}
|
||||
org.opencontainers.image.licenses=MIT
|
||||
org.opencontainers.image.revision=${{ github.sha }}
|
||||
org.opencontainers.image.revision=${{ env.SHA1 }}
|
||||
org.opencontainers.image.vendor=${{ env.REGISTRY_REPO_AUTHOR_LC }}
|
||||
org.opencontainers.image.ref.name=${{ github.ref_name }}
|
||||
org.opencontainers.image.development=${{ inputs.DEV_RELEASE == true && 'true' || 'false' }}
|
||||
org.opencontainers.image.registry=github
|
||||
org.tvapp2.image.build-version="Version:- ${{ env.IMAGE_VERSION }} Date:- ${{ env.NOW_DOCKER_LABEL }}"
|
||||
annotations: |
|
||||
org.opencontainers.image.registry=${{ env.IMAGE_REGISTRY }}
|
||||
org.tvapp2.image.build-version="Version: ${{ env.PACKAGE_VERSION }} Date: ${{ env.NOW_DOCKER }}"
|
||||
org.tvapp2.image.build-version-alpine=${{ env.IMAGE_ALPINE_VERSION }}
|
||||
org.tvapp2.image.build-release="${{ inputs.DEV_RELEASE == true && 'development' || 'stable' }}"
|
||||
org.tvapp2.image.build-sha1=${{ env.SHA1 }}
|
||||
annotations: |-
|
||||
org.opencontainers.image.description=TVApp2
|
||||
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
|
||||
org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
|
||||
org.opencontainers.image.version=${{ env.PACKAGE_VERSION }}
|
||||
org.opencontainers.image.licenses=MIT
|
||||
org.opencontainers.image.revision=${{ github.sha }}
|
||||
org.opencontainers.image.revision=${{ env.SHA1 }}
|
||||
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 }}"
|
||||
org.opencontainers.image.registry=${{ env.IMAGE_REGISTRY }}
|
||||
org.tvapp2.image.build-version="Version: ${{ env.PACKAGE_VERSION }} Date: ${{ env.NOW_DOCKER }}"
|
||||
org.tvapp2.image.build-version-alpine=${{ env.IMAGE_ALPINE_VERSION }}
|
||||
org.tvapp2.image.build-release="${{ inputs.DEV_RELEASE == true && 'development' || 'stable' }}"
|
||||
org.tvapp2.image.build-sha1=${{ env.SHA1 }}
|
||||
|
||||
# #
|
||||
# Release › Github › Build and Push › Amd64
|
||||
@@ -440,30 +676,46 @@ jobs:
|
||||
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
|
||||
with:
|
||||
allow: |
|
||||
network.host
|
||||
network.host
|
||||
network: host
|
||||
context: .
|
||||
file: Dockerfile
|
||||
platforms: linux/amd64
|
||||
provenance: false
|
||||
sbom: false
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
labels: ${{ steps.task_release_gh_meta.outputs.labels }}
|
||||
tags: |
|
||||
${{ steps.task_release_gh_meta.outputs.tags }}
|
||||
annotations: |
|
||||
${{ steps.task_release_gh_meta.outputs.annotations }}
|
||||
provenance: false
|
||||
sbom: false
|
||||
build-args: |-
|
||||
ARCH=amd64
|
||||
VERSION=${{ env.IMAGE_VERSION }}
|
||||
BUILDDATE=${{ env.NOW_DOCKER_LABEL }}
|
||||
RELEASE=${{ inputs.DEV_RELEASE == true && 'development' || 'stable' }}
|
||||
VERSION=${{ env.PACKAGE_VERSION }}
|
||||
BUILDDATE=${{ env.NOW_DOCKER }}
|
||||
GIT_SHA1=${{ env.SHA1 }}
|
||||
ALPINE_VERSION=${{ env.IMAGE_ALPINE_VERSION }}
|
||||
annotations: |-
|
||||
org.opencontainers.image.description=TVApp2
|
||||
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
|
||||
org.opencontainers.image.version=${{ env.PACKAGE_VERSION }}
|
||||
org.opencontainers.image.licenses=MIT
|
||||
org.opencontainers.image.architecture=amd64
|
||||
org.opencontainers.image.revision=${{ env.SHA1 }}
|
||||
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=${{ env.IMAGE_REGISTRY }}
|
||||
org.tvapp2.image.build-version="Version: ${{ env.PACKAGE_VERSION }} Date: ${{ env.NOW_DOCKER }}"
|
||||
org.tvapp2.image.build-version-alpine=${{ env.IMAGE_ALPINE_VERSION }}
|
||||
org.tvapp2.image.build-architecture=amd64
|
||||
org.tvapp2.image.build-release="${{ inputs.DEV_RELEASE == true && 'development' || 'stable' }}"
|
||||
org.tvapp2.image.build-sha1=${{ env.SHA1 }}
|
||||
|
||||
# #
|
||||
# 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
|
||||
@@ -477,7 +729,6 @@ jobs:
|
||||
# #
|
||||
|
||||
- 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:
|
||||
@@ -496,30 +747,46 @@ jobs:
|
||||
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
|
||||
with:
|
||||
allow: |
|
||||
network.host
|
||||
network.host
|
||||
network: host
|
||||
context: .
|
||||
file: Dockerfile
|
||||
platforms: linux/arm64
|
||||
provenance: false
|
||||
sbom: false
|
||||
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=${{ inputs.DEV_RELEASE == true && 'development' || 'stable' }}
|
||||
VERSION=${{ env.PACKAGE_VERSION }}
|
||||
BUILDDATE=${{ env.NOW_DOCKER }}
|
||||
GIT_SHA1=${{ env.SHA1 }}
|
||||
ALPINE_VERSION=${{ env.IMAGE_ALPINE_VERSION }}
|
||||
annotations: |-
|
||||
org.opencontainers.image.description=TVApp2
|
||||
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
|
||||
org.opencontainers.image.version=${{ env.PACKAGE_VERSION }}
|
||||
org.opencontainers.image.licenses=MIT
|
||||
org.opencontainers.image.architecture=arm64
|
||||
org.opencontainers.image.revision=${{ env.SHA1 }}
|
||||
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=${{ env.IMAGE_REGISTRY }}
|
||||
org.tvapp2.image.build-version="Version: ${{ env.PACKAGE_VERSION }} Date: ${{ env.NOW_DOCKER }}"
|
||||
org.tvapp2.image.build-version-alpine=${{ env.IMAGE_ALPINE_VERSION }}
|
||||
org.tvapp2.image.build-architecture=arm64
|
||||
org.tvapp2.image.build-release="${{ inputs.DEV_RELEASE == true && 'development' || 'stable' }}"
|
||||
org.tvapp2.image.build-sha1=${{ env.SHA1 }}
|
||||
|
||||
# #
|
||||
# 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
|
||||
@@ -533,7 +800,6 @@ jobs:
|
||||
# #
|
||||
|
||||
- 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:
|
||||
@@ -542,12 +808,69 @@ jobs:
|
||||
if-no-files-found: error
|
||||
retention-days: 10
|
||||
|
||||
# #
|
||||
# Release › Github › Checkpoint
|
||||
# #
|
||||
|
||||
- name: '⚠️ Checkpoint'
|
||||
run: |
|
||||
echo ""
|
||||
echo "---- [ GITHUB ] ----------------------------------------------------------------------------------------"
|
||||
echo "github.actor.............................. ${{ github.actor }}"
|
||||
echo "github.ref ............................... ${{ github.ref }}"
|
||||
echo "github.ref_name .......................... ${{ github.ref_name }}"
|
||||
echo "github.event_name ........................ ${{ github.event_name }}"
|
||||
echo "github.repository_owner .................. ${{ github.repository_owner }}"
|
||||
echo "github.repository ........................ ${{ github.repository }}"
|
||||
echo "github.sha ............................... ${{ github.sha }}"
|
||||
echo ""
|
||||
echo "---- [ INPUTS ] ----------------------------------------------------------------------------------------"
|
||||
echo "inputs.IMAGE_NAME ........................ ${{ inputs.IMAGE_NAME }}"
|
||||
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.PACKAGE_VERSION ...................... ${{ env.PACKAGE_VERSION }}"
|
||||
echo "env.PKG_VER_1DIGIT ....................... ${{ env.PKG_VER_1DIGIT }}"
|
||||
echo "env.PKG_VER_2DIGIT ....................... ${{ env.PKG_VER_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 ........................... ${{ env.NOW_DOCKER }}"
|
||||
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 " SHA 1 (GITHUB_SHA) ...................... ${GITHUB_SHA}"
|
||||
echo " SHA 2 (github.sha) ...................... ${{ github.sha }}"
|
||||
echo " SHA 3 (env.SHA1) ........................ ${{ env.SHA1 }}"
|
||||
echo " SHA 4 (env.SHA1_GH) ..................... ${{ env.SHA1_GH }}"
|
||||
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 }}"
|
||||
echo ""
|
||||
|
||||
# #
|
||||
# Release › Github › Push Manifest
|
||||
# #
|
||||
|
||||
- name: '📦 Push Manifest'
|
||||
id: task_release_gh_manifest
|
||||
uses: int128/docker-manifest-create-action@v2
|
||||
with:
|
||||
push: ${{ !inputs.DRY_RUN }}
|
||||
@@ -559,68 +882,11 @@ jobs:
|
||||
index-annotations: |
|
||||
${{ steps.task_release_gh_meta.outputs.labels }}
|
||||
|
||||
# #
|
||||
# Release › Github › Checkpoint
|
||||
# #
|
||||
|
||||
- name: '⚠️ Checkpoint'
|
||||
id: task_release_gh_checkpoint
|
||||
run: |
|
||||
echo ""
|
||||
echo "[ GITHUB ] ---------------------------------------------------------------------------------------------"
|
||||
echo "github.actor.............................. ${{ github.actor }}"
|
||||
echo "github.ref ............................... ${{ github.ref }}"
|
||||
echo "github.ref_name .......................... ${{ github.ref_name }}"
|
||||
echo "github.event_name ........................ ${{ github.event_name }}"
|
||||
echo "github.repository_owner .................. ${{ github.repository_owner }}"
|
||||
echo "github.repository ........................ ${{ github.repository }}"
|
||||
echo ""
|
||||
echo "[ INPUTS ] ---------------------------------------------------------------------------------------------"
|
||||
echo "inputs.IMAGE_NAME ........................ ${{ inputs.IMAGE_NAME }}"
|
||||
echo "inputs.IMAGE_VERSION ..................... ${{ inputs.IMAGE_VERSION }}"
|
||||
echo "inputs.IMAGE_GHCR_AUTHOR ................. ${{ inputs.IMAGE_GHCR_AUTHOR }}"
|
||||
echo "inputs.IMAGE_GHCR_USERNAME ............... ${{ inputs.IMAGE_GHCR_USERNAME }}"
|
||||
echo "inputs.DEV_RELEASE ....................... ${{ inputs.DEV_RELEASE }}"
|
||||
echo "inputs.DRY_RUN ........................... ${{ inputs.DRY_RUN }}"
|
||||
echo ""
|
||||
echo "[ ENV ] ------------------------------------------------------------------------------------------------"
|
||||
echo "env.IMAGE_NAME ........................... ${{ env.IMAGE_NAME }}"
|
||||
echo "env.IMAGE_VERSION ........................ ${{ env.IMAGE_VERSION }}"
|
||||
echo "env.IMAGE_VERSION_1DIGIT ................. ${{ env.IMAGE_VERSION_1DIGIT }}"
|
||||
echo "env.IMAGE_VERSION_2DIGIT ................. ${{ env.IMAGE_VERSION_2DIGIT }}"
|
||||
echo "env.IMAGE_GHCR_AUTHOR .................... ${{ env.IMAGE_GHCR_AUTHOR }}"
|
||||
echo "env.IMAGE_GHCR_USERNAME .................. ${{ env.IMAGE_GHCR_USERNAME }}"
|
||||
echo "env.NOW .................................. ${{ env.NOW }}"
|
||||
echo "env.NOW_SHORT ............................ ${{ env.NOW_SHORT }}"
|
||||
echo "env.NOW_LONG ............................. ${{ env.NOW_LONG }}"
|
||||
echo "env.NOW_DOCKER_LABEL ..................... ${{ env.NOW_DOCKER_LABEL }}"
|
||||
echo "env.NOW_DOCKER_TS ........................ ${{ env.NOW_DOCKER_TS }}"
|
||||
echo "env.DOCKER_IMAGE ......................... ${{ env.DOCKER_IMAGE }}"
|
||||
echo "env.REGISTRY_REPO_ORG_AUTHOR_LC .......... ${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}"
|
||||
echo "env.REGISTRY_REPO_AUTHOR_LC .............. ${{ env.REGISTRY_REPO_AUTHOR_LC }}"
|
||||
echo "env.DOCKER_SHA ........................... ${{ env.DOCKER_SHA }}"
|
||||
echo ""
|
||||
echo "[ DOCKER IMAGES ] --------------------------------------------------------------------------------------"
|
||||
echo "registry ................................. Github GHCR"
|
||||
echo "tags ..................................... ${{ steps.task_release_gh_meta.outputs.tags }}"
|
||||
echo "labels ................................... ${{ steps.task_release_gh_meta.outputs.labels }}"
|
||||
echo "digest ................................... ${{ steps.task_release_gh_push_amd64.outputs.digest }}"
|
||||
echo ""
|
||||
echo "(release) tags ........................... ${{ steps.task_release_gh_meta.outputs.tags }}"
|
||||
echo "(release) labels ......................... ${{ steps.task_release_gh_meta.outputs.labels }}"
|
||||
echo ""
|
||||
echo "[ DOCKER DIGESTS ] -------------------------------------------------------------------------------------"
|
||||
echo "docker image id (amd64) .................. ${{ steps.task_release_gh_push_amd64.outputs.imageid }}"
|
||||
echo "docker digest (amd64) .................... ${{ steps.task_release_gh_push_amd64.outputs.digest }}"
|
||||
echo "docker image id (arm64) .................. ${{ steps.task_release_gh_push_arm64.outputs.imageid }}"
|
||||
echo "docker digest (arm64) .................... ${{ steps.task_release_gh_push_arm64.outputs.digest }}"
|
||||
|
||||
# #
|
||||
# Release › Github › Get Weekly Commits
|
||||
# #
|
||||
|
||||
- name: '🕛 Get Weekly Commit List'
|
||||
id: task_release_set_weekly_commit_list
|
||||
run: |
|
||||
echo 'WEEKLY_COMMITS<<EOF' >> $GITHUB_ENV
|
||||
git log --format="[\`%h\`](${{ github.server_url }}/${{ github.repository }}/commit/%H) %s - %an" --since=7.days >> $GITHUB_ENV
|
||||
@@ -634,27 +900,27 @@ jobs:
|
||||
uses: tsickert/discord-webhook@v7.0.0
|
||||
if: success()
|
||||
with:
|
||||
username: 'Io'
|
||||
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
|
||||
username: ${{ env.DISCORD_BOT_NAME }}
|
||||
avatar-url: ${{ env.DISCORD_BOT_AVATAR }}
|
||||
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-thumbnail-url: ${{ env.DISCORD_BOT_EMBED_THUMBNAIL }}
|
||||
embed-description: |
|
||||
### 📦 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.PACKAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}`
|
||||
${{ inputs.DEV_RELEASE == true && '### ⚠️⚠️ Development / Pre-release ⚠️⚠️' || '' }}
|
||||
|
||||
A new version of the docker container `${{ env.IMAGE_NAME }}` has been released from Github to Github GHCR. The image is available at:
|
||||
- https://github.com/${{ github.repository }}/pkgs/container/${{ env.IMAGE_NAME }}
|
||||
|
||||
- Version: `${{ env.IMAGE_VERSION }}`
|
||||
- Version: `${{ env.PACKAGE_VERSION }}`
|
||||
- Release Type: `${{ inputs.DEV_RELEASE == true && '⚠️⚠️ Development / Pre-release ⚠️⚠️' || 'Stable' }}`
|
||||
- Pull: `docker pull ghcr.io/${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}:${{ inputs.DEV_RELEASE == true && 'development' || env.IMAGE_VERSION }}`
|
||||
- Pull: `docker pull ghcr.io/${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}:${{ inputs.DEV_RELEASE == true && 'development' || env.PACKAGE_VERSION }}`
|
||||
- Pull (amd64): `docker pull ghcr.io/${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}@${{ steps.task_release_gh_push_amd64.outputs.digest }}`
|
||||
- Pull (arm64): `docker pull ghcr.io/${{ env.REGISTRY_REPO_ORG_AUTHOR_LC }}@${{ steps.task_release_gh_push_arm64.outputs.digest }}`
|
||||
- Dry Run: `${{ inputs.DRY_RUN }}`
|
||||
- Source: `Github` https://github.com/${{ github.repository }}
|
||||
- Docker Image: `${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}`
|
||||
- Docker Image: `${{ env.IMAGE_NAME }}-${{ env.PACKAGE_VERSION }}${{ inputs.DEV_RELEASE == true && '-development' || '' }}`
|
||||
- Branch: `${{ github.ref_name }}`
|
||||
- Workflow: `${{ github.workflow }} (#${{github.run_number}})`
|
||||
- Runner: `${{ runner.name }}`
|
||||
@@ -679,7 +945,7 @@ jobs:
|
||||
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"
|
||||
embed-author-icon-url: ${{ env.DISCORD_BOT_EMBED_AUTHOR_ICON }}
|
||||
|
||||
# #
|
||||
# Job › Docker Release › Cleanup
|
||||
@@ -688,42 +954,41 @@ jobs:
|
||||
job-docker-release-cleanup:
|
||||
name: >-
|
||||
🧹 Release › Cleanup
|
||||
# runs-on: ubuntu-latest
|
||||
runs-on: apollo-x64
|
||||
runs-on: ubuntu-latest
|
||||
# runs-on: apollo-x64
|
||||
timeout-minutes: 5
|
||||
needs: [ job-docker-release-tags-create, job-docker-release-github ]
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
attestations: write
|
||||
id-token: write
|
||||
needs: [ job-docker-release-tags-create, job-docker-release-github ]
|
||||
env:
|
||||
PACKAGE_VERSION: ${{ needs.job-docker-release-tags-create.outputs.package_version }}
|
||||
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
|
||||
fetch-depth: 0
|
||||
|
||||
# #
|
||||
# Release › Cleanup › Print Version Debug
|
||||
# #
|
||||
|
||||
- name: '🪪 Get Package Version'
|
||||
run: |
|
||||
echo "VERSION: ${{ env.PACKAGE_VERSION }}"
|
||||
|
||||
# #
|
||||
# Release › Cleanup › Clean Untagged Images
|
||||
# #
|
||||
|
||||
- name: '🧹 Clean Untagged Images'
|
||||
id: task_cleanup_clean
|
||||
uses: quartx-analytics/ghcr-cleaner@v1
|
||||
with:
|
||||
owner-type: org
|
||||
|
||||
255
.github/workflows/documentation.yml
vendored
255
.github/workflows/documentation.yml
vendored
@@ -15,15 +15,20 @@
|
||||
# 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
|
||||
# secrets.CODECOV_TOKEN codecov upload token for nodejs projects
|
||||
# secrets.MAXMIND_GELITE_TOKEN maxmind API token
|
||||
# secrets.CF_ACCOUNT_ID cloudflare account id
|
||||
# secrets.CF_ACCOUNT_TOKEN cloudflare account token
|
||||
# secrets.ORG_TOKEN org github personal access token (fine-grained)
|
||||
# secrets.ORG_TOKEN_CL org github personal access token (classic)
|
||||
# secrets.ORG_DOCKERHUB_TOKEN org dockerhub secret
|
||||
# secrets.ORG_GITEA_TOKEN org gitea personal access token (classic) with package:write permission
|
||||
# secrets.BOT_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
|
||||
# secrets.BOT_GPG_KEY_B64 bot gpg private key (binary) converted to base64
|
||||
# secrets.BOT_GPG_PASSPHRASE bot gpg private key passphrase
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_RELEASES discord webhook to report release notifications from github to discord
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_WORKFLOWS discord webhook to report workflow notifications from github to discord
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_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
|
||||
@@ -35,8 +40,8 @@
|
||||
# act -W .github/workflows/documentation.yml -s TOKEN_CL=XXXXXXXXXX --pull=false
|
||||
# #
|
||||
|
||||
name: "📒 Docs › Build"
|
||||
run-name: "📒 Docs › Build"
|
||||
name: '📒 Docs › Build'
|
||||
run-name: '📒 Docs › Build'
|
||||
|
||||
# #
|
||||
# triggers
|
||||
@@ -86,26 +91,78 @@ on:
|
||||
default: './docs/site'
|
||||
type: string
|
||||
|
||||
# #
|
||||
# Discord Bot › Name
|
||||
#
|
||||
# The discord bot name
|
||||
# #
|
||||
|
||||
DISCORD_BOT_NAME:
|
||||
description: '🤖 Bot Name'
|
||||
required: true
|
||||
default: 'Europa'
|
||||
type: string
|
||||
|
||||
# #
|
||||
# Discord Bot › Avatar
|
||||
#
|
||||
# The discord bot avatar to show; let's use some weird picture
|
||||
# #
|
||||
|
||||
DISCORD_BOT_AVATAR:
|
||||
description: '🤖 Avatar URL'
|
||||
required: true
|
||||
default: 'https://i.imgur.com/UqwMom1.jpeg'
|
||||
type: string
|
||||
|
||||
# #
|
||||
# Discord Bot › Author Icon URL
|
||||
#
|
||||
# A small picture shown to the top-right of each post
|
||||
# #
|
||||
|
||||
DISCORD_BOT_EMBED_AUTHOR_ICON:
|
||||
description: '🤖 Embed Author Icon'
|
||||
required: true
|
||||
default: 'https://avatars.githubusercontent.com/u/200161462'
|
||||
type: string
|
||||
|
||||
# #
|
||||
# Discord Bot › Thumbnail URL
|
||||
#
|
||||
# A small picture shown to the top-right of each post
|
||||
# #
|
||||
|
||||
DISCORD_BOT_EMBED_THUMBNAIL:
|
||||
description: '🤖 Embed Thumbnail URL'
|
||||
required: true
|
||||
default: 'https://avatars.githubusercontent.com/u/200161462'
|
||||
type: string
|
||||
|
||||
# #
|
||||
# Trigger › Cron
|
||||
#
|
||||
# update documentation every X hours
|
||||
# #
|
||||
|
||||
schedule:
|
||||
- cron: "0 */12 * * *"
|
||||
# schedule:
|
||||
# - cron: "0 */12 * * *"
|
||||
|
||||
# #
|
||||
# environment variables
|
||||
# #
|
||||
|
||||
env:
|
||||
WORKING_DIR: ${{ github.event.inputs.WORKING_DIR || './docs/site' }}
|
||||
ASSIGN_USER: Aetherinox
|
||||
BOT_NAME_1: EuropaServ
|
||||
BOT_NAME_2: BinaryServ
|
||||
BOT_NAME_DEPENDABOT: dependabot[bot]
|
||||
BOT_NAME_RENOVATE: renovate[bot]
|
||||
WORKING_DIR: ${{ github.event.inputs.WORKING_DIR || './docs/site' }}
|
||||
DISCORD_BOT_NAME: ${{ github.event.inputs.DISCORD_BOT_NAME || 'Europa' }}
|
||||
DISCORD_BOT_AVATAR: ${{ github.event.inputs.DISCORD_BOT_AVATAR || 'https://i.imgur.com/UqwMom1.jpeg' }}
|
||||
DISCORD_BOT_EMBED_AUTHOR_ICON: ${{ github.event.inputs.DISCORD_BOT_EMBED_AUTHOR_ICON || 'https://avatars.githubusercontent.com/u/200161462' }}
|
||||
DISCORD_BOT_EMBED_THUMBNAIL: ${{ github.event.inputs.DISCORD_BOT_EMBED_THUMBNAIL || 'https://avatars.githubusercontent.com/u/200161462' }}
|
||||
ASSIGN_USER: Aetherinox
|
||||
BOT_NAME_1: EuropaServ
|
||||
BOT_NAME_2: BinaryServ
|
||||
BOT_NAME_DEPENDABOT: dependabot[bot]
|
||||
BOT_NAME_RENOVATE: renovate[bot]
|
||||
|
||||
# #
|
||||
# jobs
|
||||
@@ -113,9 +170,9 @@ env:
|
||||
|
||||
jobs:
|
||||
build-docs:
|
||||
# runs-on: ubuntu-latest
|
||||
runs-on: apollo-x64
|
||||
timeout-minutes: 20
|
||||
runs-on: ubuntu-latest
|
||||
# runs-on: apollo-x64
|
||||
timeout-minutes: 10
|
||||
permissions:
|
||||
contents: write
|
||||
pages: write
|
||||
@@ -124,45 +181,139 @@ jobs:
|
||||
steps:
|
||||
|
||||
# #
|
||||
# Documentation › Checkout › Arm64
|
||||
# Documentation › Build › Checkout
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
✅ Checkout
|
||||
id: task_docs_checkout
|
||||
- name: '☑️ Checkout'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# #
|
||||
# Documentation › Set Env Variables
|
||||
# Documentation › Build › Job Information
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🕛 Get Timestamp
|
||||
id: task_docs_set_timestamp
|
||||
run: |
|
||||
echo "NOW=$(date +'%m-%d-%Y %H:%M:%S')" >> $GITHUB_ENV
|
||||
echo "NOW_SHORT=$(date +'%m-%d-%Y')" >> $GITHUB_ENV
|
||||
echo "NOW_LONG=$(date +'%m-%d-%Y %H:%M')" >> $GITHUB_ENV
|
||||
echo "NOW_DOCKER_LABEL=$(date +'%Y%m%d')" >> $GITHUB_ENV
|
||||
🔄 Load Job
|
||||
uses: qoomon/actions--context@v4
|
||||
id: 'context'
|
||||
|
||||
# #
|
||||
# Documentation › Setup Python
|
||||
# Documentation › Build › Start
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
✅ Start
|
||||
run: |
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo " Starting Job ${{ steps.context.outputs.job_name }}"
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
|
||||
YEAR="$(date +'%Y')"
|
||||
echo "YEAR=${YEAR}" >> $GITHUB_ENV
|
||||
|
||||
NOW="$(date +'%m-%d-%Y %H:%M:%S')" # 02-25-2025 12:49:48
|
||||
echo "NOW=${NOW}" >> $GITHUB_ENV
|
||||
|
||||
NOW_SHORT="$(date +'%m-%d-%Y')" # 02-25-2025
|
||||
echo "NOW_SHORT=${NOW_SHORT}" >> $GITHUB_ENV
|
||||
|
||||
NOW_LONG="$(date +'%m-%d-%Y %H:%M')" # 02-25-2025 12:49
|
||||
echo "NOW_LONG=${NOW_LONG}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER="$(date +'%Y%m%d')" # 20250225
|
||||
echo "NOW_DOCKER=${NOW_DOCKER}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER_TS="$(date -u +'%FT%T.%3NZ')" # 2025-02-25T12:50:11.569Z
|
||||
echo "NOW_DOCKER_TS=${NOW_DOCKER_TS}" >> $GITHUB_ENV
|
||||
|
||||
SHA1="$(git rev-parse HEAD)" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1=${SHA1}" >> $GITHUB_ENV
|
||||
|
||||
SHA1_GH="$(echo ${GITHUB_SHA})" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1_GH=${SHA1_GH}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_1DIGIT="$(echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-1)" # 3.22 > 3
|
||||
echo "PKG_VER_1DIGIT=${PKG_VER_1DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_2DIGIT="$(echo ${{ env.IMAGE_VERSION }} | cut -f2 -d ":" | cut -c1-3)" # 3.22 > 3.2
|
||||
echo "PKG_VER_2DIGIT=${PKG_VER_2DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
sudo apt -qq update
|
||||
sudo apt -qq install tree
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
echo " Runner .............. ${{ runner.name }}"
|
||||
echo " Workflow ............ ${{ github.workflow }} (#${{ github.workflow_ref }})"
|
||||
echo " Run Number .......... ${{ github.run_number }}"
|
||||
echo " Ref ................. ${{ github.ref }}"
|
||||
echo " Ref Name ............ ${{ github.ref_name }}"
|
||||
echo " Event Name .......... ${{ github.event_name }}"
|
||||
echo " Repo ................ ${{ github.repository }}"
|
||||
echo " Repo Owner .......... ${{ github.repository_owner }}"
|
||||
echo " Run ID .............. https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
echo " Triggered By ........ ${{ github.actor }}"
|
||||
echo " SHA 1 (GITHUB_SHA) .. ${GITHUB_SHA}"
|
||||
echo " SHA 2 (github.sha) .. ${{ github.sha }}"
|
||||
echo " SHA 3 (env.SHA1) .... ${SHA1}"
|
||||
echo " SHA 4 (env.SHA1_GH) . ${SHA1_GH}"
|
||||
echo " Workspace ........... ${{ github.workspace }}"
|
||||
echo " PWD ................. ${PWD}"
|
||||
echo " Job Name ............ ${{ steps.context.outputs.job_name }}"
|
||||
echo " Job ID .............. ${{ steps.context.outputs.job_id }}"
|
||||
echo " Job URL ............. ${{ steps.context.outputs.job_url }}"
|
||||
echo " Run ID .............. ${{ steps.context.outputs.run_id }}"
|
||||
echo " Run Attempt ......... ${{ steps.context.outputs.run_attempt }}"
|
||||
echo " Run Number .......... ${{ steps.context.outputs.run_number }}"
|
||||
echo " Run URL ............. ${{ steps.context.outputs.run_url }}"
|
||||
echo " Run Env ............. ${{ steps.context.outputs.environment }}"
|
||||
echo " Run Env URL ......... ${{ steps.context.outputs.environment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Deployment URL .. ${{ steps.context.outputs.deployment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Runner Name ..... ${{ steps.context.outputs.runner_name }}"
|
||||
echo " Run Runner ID ....... ${{ steps.context.outputs.runner_id }}"
|
||||
echo " Year ................ ${YEAR}"
|
||||
echo " Now ................. ${NOW}"
|
||||
echo " Now (Short) ......... ${NOW_SHORT}"
|
||||
echo " Now (Long) .......... ${NOW_LONG}"
|
||||
echo " Now (Docker) ........ ${NOW_DOCKER}"
|
||||
echo " Now (Docker TS) ..... ${NOW_DOCKER_TS}"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
tree -I node_modules -I .git
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# #
|
||||
# Documentation › Build › Setup Python
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🐍 Setup Python
|
||||
id: task_docs_python_setup
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.x
|
||||
|
||||
# #
|
||||
# Documentation › Build Documentation
|
||||
# Documentation › Build › Build
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
📕 Build Documentation
|
||||
id: task_docs_build
|
||||
run: |
|
||||
export DOCS_NAME=${{ secrets.DOCS_NAME || 'TVApp2' }}
|
||||
export DOCS_SECRET_L1=${{ secrets.DOCS_SECRET_L1 }}
|
||||
@@ -183,12 +334,11 @@ jobs:
|
||||
GH_TOKEN: ${{ secrets.ADMINSERV_TOKEN }}
|
||||
|
||||
# #
|
||||
# Documentation › Deploy
|
||||
# Documentation › Build › Deploy
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
💽 Deploy
|
||||
id: task_docs_deploy
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
with:
|
||||
personal_token: ${{ secrets.ADMINSERV_TOKEN_CL }}
|
||||
@@ -196,33 +346,31 @@ jobs:
|
||||
|
||||
|
||||
# #
|
||||
# Documentation › Get Weekly Commits
|
||||
# Documentation › Build › Get Weekly Commits
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🕛 Get Weekly Commit List
|
||||
id: task_docs_set_weekly_commit_list
|
||||
run: |
|
||||
echo 'WEEKLY_COMMITS<<EOF' >> $GITHUB_ENV
|
||||
git log --format="[\`%h\`](${{ github.server_url }}/${{ github.repository }}/commit/%H) %s - %an" --since=7.days >> $GITHUB_ENV
|
||||
echo 'EOF' >> $GITHUB_ENV
|
||||
|
||||
# #
|
||||
# Documentation › Notify Github › Success
|
||||
# Documentation › Build › Notify Github › Success
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🔔 Send Discord Webhook Message (Success)
|
||||
id: task_docs_notify_discord_success
|
||||
uses: tsickert/discord-webhook@v7.0.0
|
||||
if: success()
|
||||
with:
|
||||
username: 'Io'
|
||||
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
|
||||
username: ${{ env.DISCORD_BOT_NAME }}
|
||||
avatar-url: ${{ env.DISCORD_BOT_AVATAR }}
|
||||
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKfLOWS }}
|
||||
embed-title: "⚙️ ${{ github.workflow_ref }}"
|
||||
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg'
|
||||
embed-thumbnail-url: ${{ env.DISCORD_BOT_EMBED_THUMBNAIL }}
|
||||
embed-description: |
|
||||
## 📦 Documentation Deployment${{ job.status == 'success' && '✅' || '❌' }}
|
||||
|
||||
@@ -239,24 +387,23 @@ jobs:
|
||||
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"
|
||||
embed-author-icon-url: ${{ env.DISCORD_BOT_EMBED_AUTHOR_ICON }}
|
||||
|
||||
# #
|
||||
# Documentation › Notify Github › Failure
|
||||
# Documentation › Build › Notify Github › Failure
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🔔 Send Discord Webhook Message (Failure)
|
||||
id: task_docs_notify_discord_failure
|
||||
uses: tsickert/discord-webhook@v7.0.0
|
||||
if: failure()
|
||||
with:
|
||||
username: 'Io'
|
||||
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
|
||||
username: ${{ env.DISCORD_BOT_NAME }}
|
||||
avatar-url: ${{ env.DISCORD_BOT_AVATAR }}
|
||||
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKfLOWS }}
|
||||
embed-title: "⚙️ ${{ github.workflow_ref }}"
|
||||
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg'
|
||||
embed-thumbnail-url: ${{ env.DISCORD_BOT_EMBED_THUMBNAIL }}
|
||||
embed-description: |
|
||||
## 📦 Documentation Deployment${{ job.status == 'success' && '✅' || '❌' }}
|
||||
|
||||
@@ -273,5 +420,5 @@ jobs:
|
||||
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"
|
||||
embed-author-icon-url: ${{ env.DISCORD_BOT_EMBED_AUTHOR_ICON }}
|
||||
|
||||
|
||||
366
.github/workflows/gpg-tests.yml
vendored
Normal file
366
.github/workflows/gpg-tests.yml
vendored
Normal file
@@ -0,0 +1,366 @@
|
||||
# #
|
||||
# @type github workflow
|
||||
# @author Aetherinox
|
||||
# @url https://github.com/Aetherinox
|
||||
# @usage tests gpg keys
|
||||
#
|
||||
# @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.CODECOV_TOKEN codecov upload token for nodejs projects
|
||||
# secrets.MAXMIND_GELITE_TOKEN maxmind API token
|
||||
# secrets.CF_ACCOUNT_ID cloudflare account id
|
||||
# secrets.CF_ACCOUNT_TOKEN cloudflare account token
|
||||
# secrets.ORG_TOKEN org github personal access token (fine-grained)
|
||||
# secrets.ORG_TOKEN_CL org github personal access token (classic)
|
||||
# secrets.ORG_DOCKERHUB_TOKEN org dockerhub secret
|
||||
# secrets.ORG_GITEA_TOKEN org gitea personal access token (classic) with package:write permission
|
||||
# secrets.BOT_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
|
||||
# secrets.BOT_GPG_KEY_B64 bot gpg private key (binary) converted to base64
|
||||
# secrets.BOT_GPG_PASSPHRASE bot gpg private key passphrase
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_RELEASES discord webhook to report release notifications from github to discord
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_WORKFLOWS discord webhook to report workflow notifications from github to discord
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_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/gpg-tests.yml -P ubuntu-latest=catthehacker/ubuntu:full-22.04
|
||||
# act -W .github/workflows/gpg-tests.yml -s TOKEN_CL=XXXXXXXXXX --pull=false
|
||||
# #
|
||||
|
||||
name: '🔑 GPG › Tests'
|
||||
run-name: '🔑 GPG › Tests'
|
||||
|
||||
# #
|
||||
# triggers
|
||||
# #
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
|
||||
# #
|
||||
# Name of the plugin to use when creating the release zip filename
|
||||
# e.g: ntfy-desktop-v1.0.0.zip
|
||||
# #
|
||||
|
||||
PROJECT_NAME:
|
||||
description: '📦 Name of App'
|
||||
required: true
|
||||
default: 'ntfy-desktop'
|
||||
type: string
|
||||
|
||||
# #
|
||||
# environment variables
|
||||
# #
|
||||
|
||||
env:
|
||||
PROJECT_NAME: ${{ github.event.inputs.PROJECT_NAME || 'ntfy-desktop' }}
|
||||
ASSIGN_USER: Aetherinox
|
||||
BOT_NAME_1: EuropaServ
|
||||
BOT_NAME_2: BinaryServ
|
||||
BOT_NAME_DEPENDABOT: dependabot[bot]
|
||||
BOT_NAME_RENOVATE: renovate[bot]
|
||||
GPG_KEY_BASE64: ${{ secrets.ADMINSERV_GPG_KEY_B64 }}
|
||||
GPG_KEY_PASSPHRASE: ${{ secrets.ADMINSERV_GPG_PASSPHRASE }}
|
||||
|
||||
# #
|
||||
# Jobs
|
||||
# #
|
||||
|
||||
jobs:
|
||||
|
||||
# #
|
||||
# JOB > INITIALIZE
|
||||
# #
|
||||
|
||||
job-initialize:
|
||||
name: >-
|
||||
🔑 GPG › Tests
|
||||
runs-on: ubuntu-latest
|
||||
# runs-on: apollo-x64
|
||||
timeout-minutes: 5
|
||||
outputs:
|
||||
package_version: ${{ steps.task_initialize_package_getversion.outputs.PACKAGE_VERSION }}
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
steps:
|
||||
|
||||
# #
|
||||
# GPG › Checkout
|
||||
# #
|
||||
|
||||
- name: '☑️ Checkout'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# #
|
||||
# GPG › Job Information
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🔄 Load Job
|
||||
uses: qoomon/actions--context@v4
|
||||
id: 'context'
|
||||
|
||||
# #
|
||||
# GPG › Start
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
✅ Start
|
||||
run: |
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo " Starting Job ${{ steps.context.outputs.job_name }}"
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
|
||||
YEAR="$(date +'%Y')"
|
||||
echo "YEAR=${YEAR}" >> $GITHUB_ENV
|
||||
|
||||
NOW="$(date +'%m-%d-%Y %H:%M:%S')" # 02-25-2025 12:49:48
|
||||
echo "NOW=${NOW}" >> $GITHUB_ENV
|
||||
|
||||
NOW_SHORT="$(date +'%m-%d-%Y')" # 02-25-2025
|
||||
echo "NOW_SHORT=${NOW_SHORT}" >> $GITHUB_ENV
|
||||
|
||||
NOW_LONG="$(date +'%m-%d-%Y %H:%M')" # 02-25-2025 12:49
|
||||
echo "NOW_LONG=${NOW_LONG}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER="$(date +'%Y%m%d')" # 20250225
|
||||
echo "NOW_DOCKER=${NOW_DOCKER}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER_TS="$(date -u +'%FT%T.%3NZ')" # 2025-02-25T12:50:11.569Z
|
||||
echo "NOW_DOCKER_TS=${NOW_DOCKER_TS}" >> $GITHUB_ENV
|
||||
|
||||
SHA1="$(git rev-parse HEAD)" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1=${SHA1}" >> $GITHUB_ENV
|
||||
|
||||
SHA1_GH="$(echo ${GITHUB_SHA})" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1_GH=${SHA1_GH}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_1DIGIT="$(echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-1)" # 3.22 > 3
|
||||
echo "PKG_VER_1DIGIT=${PKG_VER_1DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_2DIGIT="$(echo ${{ env.IMAGE_VERSION }} | cut -f2 -d ":" | cut -c1-3)" # 3.22 > 3.2
|
||||
echo "PKG_VER_2DIGIT=${PKG_VER_2DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
sudo apt -qq update
|
||||
sudo apt -qq install tree
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
echo " Runner .............. ${{ runner.name }}"
|
||||
echo " Workflow ............ ${{ github.workflow }} (#${{ github.workflow_ref }})"
|
||||
echo " Run Number .......... ${{ github.run_number }}"
|
||||
echo " Ref ................. ${{ github.ref }}"
|
||||
echo " Ref Name ............ ${{ github.ref_name }}"
|
||||
echo " Event Name .......... ${{ github.event_name }}"
|
||||
echo " Repo ................ ${{ github.repository }}"
|
||||
echo " Repo Owner .......... ${{ github.repository_owner }}"
|
||||
echo " Run ID .............. https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
echo " Triggered By ........ ${{ github.actor }}"
|
||||
echo " SHA 1 (GITHUB_SHA) .. ${GITHUB_SHA}"
|
||||
echo " SHA 2 (github.sha) .. ${{ github.sha }}"
|
||||
echo " SHA 3 (env.SHA1) .... ${SHA1}"
|
||||
echo " SHA 4 (env.SHA1_GH) . ${SHA1_GH}"
|
||||
echo " Workspace ........... ${{ github.workspace }}"
|
||||
echo " PWD ................. ${PWD}"
|
||||
echo " Job Name ............ ${{ steps.context.outputs.job_name }}"
|
||||
echo " Job ID .............. ${{ steps.context.outputs.job_id }}"
|
||||
echo " Job URL ............. ${{ steps.context.outputs.job_url }}"
|
||||
echo " Run ID .............. ${{ steps.context.outputs.run_id }}"
|
||||
echo " Run Attempt ......... ${{ steps.context.outputs.run_attempt }}"
|
||||
echo " Run Number .......... ${{ steps.context.outputs.run_number }}"
|
||||
echo " Run URL ............. ${{ steps.context.outputs.run_url }}"
|
||||
echo " Run Env ............. ${{ steps.context.outputs.environment }}"
|
||||
echo " Run Env URL ......... ${{ steps.context.outputs.environment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Deployment URL .. ${{ steps.context.outputs.deployment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Runner Name ..... ${{ steps.context.outputs.runner_name }}"
|
||||
echo " Run Runner ID ....... ${{ steps.context.outputs.runner_id }}"
|
||||
echo " Year ................ ${YEAR}"
|
||||
echo " Now ................. ${NOW}"
|
||||
echo " Now (Short) ......... ${NOW_SHORT}"
|
||||
echo " Now (Long) .......... ${NOW_LONG}"
|
||||
echo " Now (Docker) ........ ${NOW_DOCKER}"
|
||||
echo " Now (Docker TS) ..... ${NOW_DOCKER_TS}"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
tree -I node_modules -I .git
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# #
|
||||
# GPG › Get version from package.json VERSION value
|
||||
# #
|
||||
|
||||
- name: '👁️🗨️ Get Package Version'
|
||||
id: task_initialize_package_getversion
|
||||
run: |
|
||||
VER=$(cat package.json | jq -r '.version')
|
||||
echo "PACKAGE_VERSION=$VER" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: '👁️🗨️ Get Package Version › Print'
|
||||
id: task_initialize_package_getversion_debug
|
||||
run: |
|
||||
echo "VERSION: ${{ steps.task_initialize_package_getversion.outputs.PACKAGE_VERSION }}"
|
||||
|
||||
# #
|
||||
# GPG › Import Key (No Passphrase)
|
||||
#
|
||||
# requires your GPG private key, converted to base64 binary .gpg (not armored .asc)
|
||||
# #
|
||||
|
||||
- name: '🪪 GPG › Import Signing Key › W/o Passphrase'
|
||||
if: env.GPG_KEY_BASE64 != '' && env.GPG_KEY_PASSPHRASE == ''
|
||||
run: |
|
||||
echo "$GPG_KEY_BASE64" | base64 -di | gpg --import
|
||||
|
||||
# #
|
||||
# GPG › Import Key (With Passphrase)
|
||||
#
|
||||
# requires your GPG private key, converted to base64 binary .gpg (not armored .asc)
|
||||
# #
|
||||
|
||||
- name: '🪪 GPG › Import Signing Key › w/ Passphrase'
|
||||
if: env.GPG_KEY_BASE64 != '' && env.GPG_KEY_PASSPHRASE != ''
|
||||
run: |
|
||||
echo "$GPG_KEY_BASE64" | base64 -di > /tmp/signing-key.gpg
|
||||
echo "$GPG_KEY_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg
|
||||
(echo "$GPG_KEY_PASSPHRASE"; echo; echo) | gpg --command-fd 0 --pinentry-mode loopback --change-passphrase $(gpg --list-secret-keys --with-colons 2> /dev/null | grep '^sec:' | cut --delimiter ':' --fields 5 | tail -n 1)
|
||||
|
||||
# #
|
||||
# GPG › Checksum › Stable
|
||||
# #
|
||||
|
||||
- name: '🆔 Checksum › Stable'
|
||||
run: |
|
||||
# windows
|
||||
file_1_example="package.json"
|
||||
file_2_example="package-lock.json"
|
||||
|
||||
|
||||
# get sha1 and sha256 for .json
|
||||
find . -maxdepth 1 \( -name '*.json' -o -name '*.gz' \) -printf '%P\n' | xargs -r sha1sum | gpg --digest-algo sha256 --clearsign > sha1sum.txt.asc
|
||||
find . -maxdepth 1 \( -name '*.json' -o -name '*.gz' \) -printf '%P\n' | xargs -r sha256sum | gpg --digest-algo sha256 --clearsign > sha256sum.txt.asc
|
||||
|
||||
|
||||
# SHA1SUM
|
||||
sha1sum_file_1="$(shasum --algorithm 1 ${file_1_example} | awk '{ print $1 }')"
|
||||
echo "SHA1SUM_FILE_1=${sha1sum_file_1}" >> $GITHUB_ENV
|
||||
|
||||
sha1sum_file_2="$(shasum --algorithm 1 ${file_2_example} | awk '{ print $1 }')"
|
||||
echo "SHA1SUM_FILE_2=${sha1sum_file_2}" >> $GITHUB_ENV
|
||||
|
||||
|
||||
# SHA256SUM
|
||||
sha256sum_file_1="$(shasum --algorithm 256 ${file_1_example} | awk '{ print $1 }')"
|
||||
echo "SHA256SUM_FILE_1=${sha256sum_file_1}" >> $GITHUB_ENV
|
||||
|
||||
sha256sum_file_2="$(shasum --algorithm 256 ${file_2_example} | awk '{ print $1 }')"
|
||||
echo "SHA256SUM_FILE_2=${sha256sum_file_2}" >> $GITHUB_ENV
|
||||
|
||||
|
||||
# no longer needed, replaced by find . command
|
||||
# shasum --algorithm 256 ${file_file_1} > SHA256SUMS.txt
|
||||
echo "FILE_1_EXAMPLE=${file_1_example}" >> $GITHUB_ENV
|
||||
echo "FILE_2_EXAMPLE=${file_2_example}" >> $GITHUB_ENV
|
||||
|
||||
|
||||
# generate sha256sum.sig from sha256sum.txt.asc file
|
||||
gpg --batch --yes --quiet --armor --detach-sig --sign --output sha256sum.sig sha256sum.txt.asc
|
||||
|
||||
# #
|
||||
# GPG › Verbose › Print Results
|
||||
# #
|
||||
|
||||
- name: '⚙️ Verbose › Print Results'
|
||||
run: |
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo -e " 🌲 Tree"
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
tree -I node_modules
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo -e " 📄 sha256sum.txt.asc"
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
cat sha256sum.txt.asc
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo -e " 📄 sha1sum.txt.asc"
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
cat sha1sum.txt.asc
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo -e " 📄 sha256sum.sig"
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
cat sha256sum.sig
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Running command gpg --verify sha256sum.sig sha256sum.txt.asc"
|
||||
echo ""
|
||||
gpg --verify sha256sum.sig sha256sum.txt.asc
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo -e " 🔑 List GPG Keys"
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
gpg --list-keys --keyid-format=long --fingerprint --with-fingerprint
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# #
|
||||
# GPG › Checksum › Print
|
||||
# #
|
||||
|
||||
- name: '🆔 Checksum › Print'
|
||||
run: |
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo " Checksums"
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo " ${{ env.FILE_1_EXAMPLE }} ${{ env.SHA256SUM_FILE_1 }}"
|
||||
echo " ${{ env.FILE_2_EXAMPLE }} ${{ env.SHA256SUM_FILE_2 }}"
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
313
.github/workflows/history-clean.yml
vendored
Normal file
313
.github/workflows/history-clean.yml
vendored
Normal file
@@ -0,0 +1,313 @@
|
||||
# #
|
||||
# @type github workflow
|
||||
# @author Aetherinox
|
||||
# @url https://github.com/Aetherinox
|
||||
# @usage cleans all commit history for a repository
|
||||
# edit the 'environment:' to determine which deployment to keep clean
|
||||
# - can be ran manually
|
||||
#
|
||||
# @secrets secrets.SELF_TOKEN self github personal access token (fine-grained)
|
||||
# secrets.SELF_TOKEN_CL self github personal access token (classic)
|
||||
# secrets.NPM_TOKEN self npmjs access token
|
||||
# secrets.PYPI_API_TOKEN self Pypi API token (production site) - https://pypi.org/
|
||||
# secrets.PYPI_API_TEST_TOKEN self Pypi API token (test site) - https://test.pypi.org/
|
||||
# secrets.SELF_DOCKERHUB_TOKEN self Dockerhub token
|
||||
# secrets.CODECOV_TOKEN codecov upload token for nodejs projects
|
||||
# secrets.MAXMIND_GELITE_TOKEN maxmind API token
|
||||
# secrets.CF_ACCOUNT_ID cloudflare account id
|
||||
# secrets.CF_ACCOUNT_TOKEN cloudflare account token
|
||||
# secrets.ORG_TOKEN org github personal access token (fine-grained)
|
||||
# secrets.ORG_TOKEN_CL org github personal access token (classic)
|
||||
# secrets.ORG_DOCKERHUB_TOKEN org dockerhub secret
|
||||
# secrets.ORG_GITEA_TOKEN org gitea personal access token (classic) with package:write permission
|
||||
# secrets.BOT_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
|
||||
# secrets.BOT_GPG_KEY_B64 bot gpg private key (binary) converted to base64
|
||||
# secrets.BOT_GPG_PASSPHRASE bot gpg private key passphrase
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_RELEASES discord webhook to report release notifications from github to discord
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_WORKFLOWS discord webhook to report workflow notifications from github to discord
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_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/history-clean.yml -P ubuntu-latest=catthehacker/ubuntu:full-22.04
|
||||
# act -W .github/workflows/history-clean.yml -s TOKEN_CL=XXXXXXXXXX --pull=false
|
||||
# #
|
||||
|
||||
name: '🧹 History › Clean'
|
||||
run-name: '🧹 History › Clean'
|
||||
|
||||
# #
|
||||
# triggers
|
||||
# #
|
||||
|
||||
on:
|
||||
|
||||
# #
|
||||
# Trigger > Workflow Dispatch
|
||||
# #
|
||||
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
|
||||
# #
|
||||
# Commit Label
|
||||
#
|
||||
# the label to use when repository is cleaned
|
||||
# #
|
||||
|
||||
COMMIT_LABEL:
|
||||
description: '🏷️ Commit Label'
|
||||
required: true
|
||||
default: 'cleanup'
|
||||
type: string
|
||||
|
||||
# #
|
||||
# Branch
|
||||
#
|
||||
# select branch to clean
|
||||
# you must also run the workflow from that branch
|
||||
# #
|
||||
|
||||
BRANCH:
|
||||
description: '🌳 Branch'
|
||||
required: true
|
||||
default: 'main'
|
||||
type: string
|
||||
|
||||
# #
|
||||
# environment variables
|
||||
# #
|
||||
|
||||
env:
|
||||
COMMIT_LABEL: ${{ github.event.inputs.COMMIT_LABEL || 'cleanup' }}
|
||||
BRANCH: ${{ github.event.inputs.BRANCH || 'main' }}
|
||||
BOT_NAME_1: EuropaServ
|
||||
BOT_NAME_2: BinaryServ
|
||||
BOT_NAME_DEPENDABOT: dependabot[bot]
|
||||
BOT_NAME_RENOVATE: renovate[bot]
|
||||
|
||||
# #
|
||||
# jobs
|
||||
# #
|
||||
|
||||
jobs:
|
||||
history-clean:
|
||||
name: >-
|
||||
🧹 History › Clean
|
||||
runs-on: ubuntu-latest
|
||||
# runs-on: apollo-x64
|
||||
timeout-minutes: 15
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
|
||||
# #
|
||||
# History › Clean › Checkout
|
||||
# #
|
||||
|
||||
- name: '☑️ Checkout'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# #
|
||||
# History › Clean › Job Information
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🔄 Load Job
|
||||
uses: qoomon/actions--context@v4
|
||||
id: 'context'
|
||||
|
||||
# #
|
||||
# History › Clean › Start
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
✅ Start
|
||||
run: |
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo " Starting Job ${{ steps.context.outputs.job_name }}"
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
|
||||
YEAR="$(date +'%Y')"
|
||||
echo "YEAR=${YEAR}" >> $GITHUB_ENV
|
||||
|
||||
NOW="$(date +'%m-%d-%Y %H:%M:%S')" # 02-25-2025 12:49:48
|
||||
echo "NOW=${NOW}" >> $GITHUB_ENV
|
||||
|
||||
NOW_SHORT="$(date +'%m-%d-%Y')" # 02-25-2025
|
||||
echo "NOW_SHORT=${NOW_SHORT}" >> $GITHUB_ENV
|
||||
|
||||
NOW_LONG="$(date +'%m-%d-%Y %H:%M')" # 02-25-2025 12:49
|
||||
echo "NOW_LONG=${NOW_LONG}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER="$(date +'%Y%m%d')" # 20250225
|
||||
echo "NOW_DOCKER=${NOW_DOCKER}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER_TS="$(date -u +'%FT%T.%3NZ')" # 2025-02-25T12:50:11.569Z
|
||||
echo "NOW_DOCKER_TS=${NOW_DOCKER_TS}" >> $GITHUB_ENV
|
||||
|
||||
SHA1="$(git rev-parse HEAD)" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1=${SHA1}" >> $GITHUB_ENV
|
||||
|
||||
SHA1_GH="$(echo ${GITHUB_SHA})" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1_GH=${SHA1_GH}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_1DIGIT="$(echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-1)" # 3.22 > 3
|
||||
echo "PKG_VER_1DIGIT=${PKG_VER_1DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_2DIGIT="$(echo ${{ env.IMAGE_VERSION }} | cut -f2 -d ":" | cut -c1-3)" # 3.22 > 3.2
|
||||
echo "PKG_VER_2DIGIT=${PKG_VER_2DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
sudo apt -qq update
|
||||
sudo apt -qq install tree
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
echo " Runner .............. ${{ runner.name }}"
|
||||
echo " Workflow ............ ${{ github.workflow }} (#${{ github.workflow_ref }})"
|
||||
echo " Run Number .......... ${{ github.run_number }}"
|
||||
echo " Ref ................. ${{ github.ref }}"
|
||||
echo " Ref Name ............ ${{ github.ref_name }}"
|
||||
echo " Event Name .......... ${{ github.event_name }}"
|
||||
echo " Repo ................ ${{ github.repository }}"
|
||||
echo " Repo Owner .......... ${{ github.repository_owner }}"
|
||||
echo " Run ID .............. https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
echo " Triggered By ........ ${{ github.actor }}"
|
||||
echo " SHA 1 (GITHUB_SHA) .. ${GITHUB_SHA}"
|
||||
echo " SHA 2 (github.sha) .. ${{ github.sha }}"
|
||||
echo " SHA 3 (env.SHA1) .... ${SHA1}"
|
||||
echo " SHA 4 (env.SHA1_GH) . ${SHA1_GH}"
|
||||
echo " Workspace ........... ${{ github.workspace }}"
|
||||
echo " PWD ................. ${PWD}"
|
||||
echo " Job Name ............ ${{ steps.context.outputs.job_name }}"
|
||||
echo " Job ID .............. ${{ steps.context.outputs.job_id }}"
|
||||
echo " Job URL ............. ${{ steps.context.outputs.job_url }}"
|
||||
echo " Run ID .............. ${{ steps.context.outputs.run_id }}"
|
||||
echo " Run Attempt ......... ${{ steps.context.outputs.run_attempt }}"
|
||||
echo " Run Number .......... ${{ steps.context.outputs.run_number }}"
|
||||
echo " Run URL ............. ${{ steps.context.outputs.run_url }}"
|
||||
echo " Run Env ............. ${{ steps.context.outputs.environment }}"
|
||||
echo " Run Env URL ......... ${{ steps.context.outputs.environment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Deployment URL .. ${{ steps.context.outputs.deployment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Runner Name ..... ${{ steps.context.outputs.runner_name }}"
|
||||
echo " Run Runner ID ....... ${{ steps.context.outputs.runner_id }}"
|
||||
echo " Year ................ ${YEAR}"
|
||||
echo " Now ................. ${NOW}"
|
||||
echo " Now (Short) ......... ${NOW_SHORT}"
|
||||
echo " Now (Long) .......... ${NOW_LONG}"
|
||||
echo " Now (Docker) ........ ${NOW_DOCKER}"
|
||||
echo " Now (Docker TS) ..... ${NOW_DOCKER_TS}"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
tree -I node_modules -I .git
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# #
|
||||
# History › Clean › Git Identify
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🪪 Configure Git Identity
|
||||
run: |
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
|
||||
# #
|
||||
# History › Clean › Pre-Commit
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
📦 Commit › Pre-commit
|
||||
run: |
|
||||
now=$(date -u '+%m/%d/%Y %H:%M')
|
||||
commit_label="${{ env.COMMIT_LABEL }}" >> $GITHUB_ENV
|
||||
echo -e "$commit_label"
|
||||
commit_message="chore(maint): \\\`️️🧹 $commit_label 🧹\\\` \\\`$now UTC\\\`" >> $GITHUB_ENV
|
||||
echo -e "$commit_message"
|
||||
echo "COMMIT_MESSAGE=$(echo $commit_message)" >> $GITHUB_ENV
|
||||
echo "NOW=$(echo $now)" >> $GITHUB_ENV
|
||||
|
||||
# #
|
||||
# History › Clean › Pre-Commit › Debug
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
📦 Commit › Pre-commit › Debug
|
||||
run: |
|
||||
echo -e "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo -e " Printing Values"
|
||||
echo -e "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo -e " env.COMMIT_LABEL .................... ${{ env.COMMIT_LABEL }}"
|
||||
echo -e " env.COMMIT_MESSAGE .................. ${{ env.COMMIT_MESSAGE }}"
|
||||
echo -e " env.NOW ............................. ${{ env.NOW }}"
|
||||
|
||||
# #
|
||||
# History › Clean › Start
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🧹 Clean Repo History
|
||||
run: |
|
||||
# Create a new orphan branch
|
||||
git checkout --orphan temp-branch
|
||||
|
||||
# Add all files to the new branch
|
||||
git add -A
|
||||
|
||||
# Commit the files to the new branch
|
||||
git commit -m "${{ env.COMMIT_MESSAGE }}"
|
||||
|
||||
# Delete the old main branch
|
||||
git branch -D ${{ env.BRANCH }}
|
||||
|
||||
# Rename the new orphan branch to main
|
||||
git branch -m ${{ env.BRANCH }}
|
||||
|
||||
# Force push the new main branch to the remote repository
|
||||
git push -f origin ${{ env.BRANCH }}
|
||||
|
||||
# #
|
||||
# History › Clean › References
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🗑️ Garbage Collection (Aggressive)
|
||||
run: |
|
||||
# Remove remote-tracking references to deleted branches (optional)
|
||||
git fetch origin --prune
|
||||
git repack
|
||||
git prune-packed
|
||||
git reflog expire --expire=now --all
|
||||
git gc --prune=now --aggressive
|
||||
|
||||
# #
|
||||
# History › Clean › Commit
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
📦 Commit › Execute
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: ${{ env.COMMIT_MESSAGE }}
|
||||
1002
.github/workflows/issues-new.yml
vendored
1002
.github/workflows/issues-new.yml
vendored
File diff suppressed because it is too large
Load Diff
459
.github/workflows/issues-scan.yml
vendored
459
.github/workflows/issues-scan.yml
vendored
@@ -2,7 +2,7 @@
|
||||
# @type github workflow
|
||||
# @author Aetherinox
|
||||
# @url https://github.com/Aetherinox
|
||||
# @desc pull request auto-scan
|
||||
# @usage pull request auto-scan
|
||||
# scans all of the files related to a particular pull request
|
||||
# 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.
|
||||
@@ -16,15 +16,20 @@
|
||||
# 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
|
||||
# secrets.CODECOV_TOKEN codecov upload token for nodejs projects
|
||||
# secrets.MAXMIND_GELITE_TOKEN maxmind API token
|
||||
# secrets.CF_ACCOUNT_ID cloudflare account id
|
||||
# secrets.CF_ACCOUNT_TOKEN cloudflare account token
|
||||
# secrets.ORG_TOKEN org github personal access token (fine-grained)
|
||||
# secrets.ORG_TOKEN_CL org github personal access token (classic)
|
||||
# secrets.ORG_DOCKERHUB_TOKEN org dockerhub secret
|
||||
# secrets.ORG_GITEA_TOKEN org gitea personal access token (classic) with package:write permission
|
||||
# secrets.BOT_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
|
||||
# secrets.BOT_GPG_KEY_B64 bot gpg private key (binary) converted to base64
|
||||
# secrets.BOT_GPG_PASSPHRASE bot gpg private key passphrase
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_RELEASES discord webhook to report release notifications from github to discord
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_WORKFLOWS discord webhook to report workflow notifications from github to discord
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_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
|
||||
@@ -36,8 +41,8 @@
|
||||
# act -W .github/workflows/issues-scan.yml -s TOKEN_CL=XXXXXXXXXX --pull=false
|
||||
# #
|
||||
|
||||
name: "🎫 Issues › Scan"
|
||||
run-name: "🎫 Issues › Scan"
|
||||
name: '🎫 PR › Scan'
|
||||
run-name: '🎫 PR › Scan'
|
||||
|
||||
# #
|
||||
# triggers
|
||||
@@ -53,6 +58,11 @@ on:
|
||||
# #
|
||||
|
||||
env:
|
||||
DISCORD_BOT_NAME: 'Europa'
|
||||
DISCORD_BOT_AVATAR: 'https://i.imgur.com/UqwMom1.jpeg'
|
||||
DISCORD_BOT_EMBED_AUTHOR_ICON: 'https://avatars.githubusercontent.com/u/200161462'
|
||||
DISCORD_BOT_EMBED_THUMBNAIL: 'https://avatars.githubusercontent.com/u/200161462'
|
||||
|
||||
LABEL_CHECK_STATUS_FAILED: AC › Failed
|
||||
LABEL_CHECK_REVIEW_READY: AC › Passed
|
||||
LABEL_CHECK_CHANGES_REQ: AC › Changes Required
|
||||
@@ -61,9 +71,10 @@ env:
|
||||
LABEL_CHECK_SECURITY_ERR: AC › Security Warning
|
||||
LABEL_CHECK_STATUS_CHGMADE: AC › Changes Made
|
||||
LABEL_CHECK_SCAN_SKIPPED: AC › Skipped Scan
|
||||
LABEL_TYPE_PR: Type ◦ Pull Request
|
||||
LABEL_TYPE_DEPENDENCY: Type ◦ Dependency
|
||||
LABEL_TYPE_GITACTION: Type ◦ Git Action
|
||||
LABEL_TYPE_PR: Type › Pull Request
|
||||
LABEL_TYPE_DEPENDENCY: Type › Dependency
|
||||
LABEL_TYPE_GITACTION: Type › Git Action
|
||||
LABEL_TYPE_MAINTENANCE: Type › Lock Maintenance
|
||||
|
||||
ASSIGN_USER: Aetherinox
|
||||
BOT_NAME_1: EuropaServ
|
||||
@@ -73,64 +84,65 @@ env:
|
||||
|
||||
LABELS_JSON: |
|
||||
[
|
||||
{ "name": "AC › Changes Made", "color": "8F1784", "description": "Requested changes have been made and are pending a re-scan" },
|
||||
{ "name": "AC › Changes Required", "color": "8F1784", "description": "Requires changes to be made to the package before being accepted" },
|
||||
{ "name": "AC › Failed", "color": "a61f2d", "description": "Autocheck failed to run through a complete cycle, requires investigation" },
|
||||
{ "name": "AC › Needs Rebase", "color": "8F1784", "description": "Due to the permissions on the requesting repo, this pull request must be rebased by the author" },
|
||||
{ "name": "AC › Passed", "color": "146b4a", "description": "Ready to be reviewed" },
|
||||
{ "name": "AC › Review Required", "color": "8F1784", "description": "PR needs to be reviewed by another person, after the requested changes have been made" },
|
||||
{ "name": "AC › Security Warning", "color": "761620", "description": "Does not conform to developer policies, or includes potentially dangerous code" },
|
||||
{ "name": "AC › Skipped Scan", "color": "8F1784", "description": "Author has skipped code scan" },
|
||||
{ "name": "Status 𐄂 Duplicate", "color": "75536b", "description": "Issue or pull request already exists" },
|
||||
{ "name": "Status 𐄂 Accepted", "color": "2e7539", "description": "This pull request has been accepted" },
|
||||
{ "name": "Status 𐄂 Autoclosed", "color": "3E0915", "description": "Originally stale and was autoclosed for no activity" },
|
||||
{ "name": "Status 𐄂 Denied", "color": "ba4058", "description": "Pull request has been denied" },
|
||||
{ "name": "Status 𐄂 Locked", "color": "550F45", "description": "Automatically locked by EuropaServ for a prolonged period of inactivity" },
|
||||
{ "name": "Status 𐄂 Need Info", "color": "2E3C4C", "description": "Not enough information to resolve" },
|
||||
{ "name": "Status 𐄂 No Action", "color": "030406", "description": "Closed without any action being taken" },
|
||||
{ "name": "Status 𐄂 Pending", "color": "984b12", "description": "Pending pull request" },
|
||||
{ "name": "Status 𐄂 Released", "color": "1b6626", "description": "Issues or PR has been implemented and is now live" },
|
||||
{ "name": "Status 𐄂 Reopened", "color": "8a6f14", "description": "A previously closed PR which has been re-opened" },
|
||||
{ "name": "Status 𐄂 Review", "color": "9e1451", "description": "Currently pending review" },
|
||||
{ "name": "Status 𐄂 Stale", "color": "928282", "description": "Has not had any activity in over 30 days" },
|
||||
{ "name": "Type ◦ Bug", "color": "9a2c2c", "description": "Something isn't working" },
|
||||
{ "name": "Type ◦ Dependency", "color": "243759", "description": "Item is associated to dependency" },
|
||||
{ "name": "Type ◦ Docs", "color": "0e588d", "description": "Improvements or modifications to docs" },
|
||||
{ "name": "Type ◦ Feature", "color": "3c4e93", "description": "Feature request" },
|
||||
{ "name": "Type ◦ Git Action", "color": "030406", "description": "GitHub Action / workflow" },
|
||||
{ "name": "Type ◦ Pull Request", "color": "8F1784", "description": "Normal pull request" },
|
||||
{ "name": "Type ◦ Roadmap", "color": "8F1784", "description": "Feature or bug currently planned for implementation" },
|
||||
{ "name": "Type ◦ Internal", "color": "A51994", "description": "Assigned items are for internal developer use" },
|
||||
{ "name": "Build ◦ Desktop", "color": "c7ca4a", "description": "Specific to desktop" },
|
||||
{ "name": "Build ◦ Linux", "color": "c7ca4a", "description": "Specific to Linux" },
|
||||
{ "name": "Build ◦ MacOS", "color": "c7ca4a", "description": "Specific to MacOS" },
|
||||
{ "name": "Build ◦ Mobile", "color": "c7ca4a", "description": "Specific to mobile" },
|
||||
{ "name": "Build ◦ Web", "color": "c7ca4a", "description": "Specific to web" },
|
||||
{ "name": "Build ◦ Windows", "color": "c7ca4a", "description": "Specific to Windows" },
|
||||
{ "name": "› API", "color": "F99B50", "description": "Plugin API, CLI, browser JS API" },
|
||||
{ "name": "› Auto-type", "color": "9141E0", "description": "Auto-type functionality in desktop apps" },
|
||||
{ "name": "› Browser", "color": "9141E0", "description": "Browser plugins and passing data to <=> from app" },
|
||||
{ "name": "› Customization", "color": "E3F0FC", "description": "Customizations: plugins, themes, configs" },
|
||||
{ "name": "› Design", "color": "FA70DE", "description": "Design related queries" },
|
||||
{ "name": "› Dist", "color": "FA70DE", "description": "Installers and other forms of software distribution" },
|
||||
{ "name": "› Enterprise", "color": "11447a", "description": "Issues about collaboration, administration, and so on" },
|
||||
{ "name": "› Hardware", "color": "5a7503", "description": "YubiKey, other tokens, biometrics" },
|
||||
{ "name": "› Import/Export", "color": "F5FFCC", "description": "Import from and export to different file formats" },
|
||||
{ "name": "› Improvement", "color": "185c98", "description": "Enhance an existing feature" },
|
||||
{ "name": "› Performance", "color": "006b75", "description": "Web and desktop performance issues" },
|
||||
{ "name": "› Plugin Request", "color": "FCE9CA", "description": "Requested changes should be implemented as a plugin" },
|
||||
{ "name": "› Security", "color": "F75D39", "description": "Security issues" },
|
||||
{ "name": "› Self-Hosting", "color": "fad8c7", "description": "Self-hosting installations and configs" },
|
||||
{ "name": "› Storage", "color": "5319e7", "description": "Storage providers: Dropbox, Google, WebDAV, etc." },
|
||||
{ "name": "› Updater", "color": "1BADDE", "description": "Auto-updater issues" },
|
||||
{ "name": "› UX", "color": "1BADDE", "description": "UX and usability" },
|
||||
{ "name": "› Website", "color": "fef2c0", "description": "Website related issues" },
|
||||
{ "name": "⚠ Urgent", "color": "a8740e", "description": "Requires urgent attention" },
|
||||
{ "name": "⚠ Announcement", "color": "DB4712", "description": "Announcements" },
|
||||
{ "name": "📰 Progress Report", "color": "392297", "description": "Development updates" },
|
||||
{ "name": "📦 Release", "color": "277542", "description": "Release announcements" },
|
||||
{ "name": "✔️ Poll", "color": "972255", "description": "Community polls" },
|
||||
{ "name": "❔ Question", "color": "FFFFFF", "description": "All questions" }
|
||||
{ "name": "AC › Changes Made", "color": "8F1784", "description": "Requested changes have been made and are pending a re-scan" },
|
||||
{ "name": "AC › Changes Required", "color": "8F1784", "description": "Requires changes to be made to the package before being accepted" },
|
||||
{ "name": "AC › Failed", "color": "a61f2d", "description": "Autocheck failed to run through a complete cycle, requires investigation" },
|
||||
{ "name": "AC › Needs Rebase", "color": "8F1784", "description": "Due to the permissions on the requesting repo, this pull request must be rebased by the author" },
|
||||
{ "name": "AC › Passed", "color": "146b4a", "description": "Ready to be reviewed" },
|
||||
{ "name": "AC › Review Required", "color": "8F1784", "description": "PR needs to be reviewed by another person, after the requested changes have been made" },
|
||||
{ "name": "AC › Security Warning", "color": "761620", "description": "Does not conform to developer policies, or includes potentially dangerous code" },
|
||||
{ "name": "AC › Skipped Scan", "color": "8F1784", "description": "Author has skipped code scan" },
|
||||
{ "name": "Status › Duplicate", "color": "75536b", "description": "Issue or pull request already exists" },
|
||||
{ "name": "Status › Accepted", "color": "2e7539", "description": "This pull request has been accepted" },
|
||||
{ "name": "Status › Autoclosed", "color": "3E0915", "description": "Originally stale and was autoclosed for no activity" },
|
||||
{ "name": "Status › Denied", "color": "ba4058", "description": "Pull request has been denied" },
|
||||
{ "name": "Status › Locked", "color": "550F45", "description": "Automatically locked by AdminServ for a prolonged period of inactivity" },
|
||||
{ "name": "Status › Need Info", "color": "2E3C4C", "description": "Not enough information to resolve" },
|
||||
{ "name": "Status › No Action", "color": "030406", "description": "Closed without any action being taken" },
|
||||
{ "name": "Status › Pending", "color": "984b12", "description": "Pending pull request" },
|
||||
{ "name": "Status › Released", "color": "1b6626", "description": "Issues or PR has been implemented and is now live" },
|
||||
{ "name": "Status › Reopened", "color": "8a6f14", "description": "A previously closed PR which has been re-opened" },
|
||||
{ "name": "Status › Review", "color": "9e1451", "description": "Currently pending review" },
|
||||
{ "name": "Status › Stale", "color": "928282", "description": "Has not had any activity in over 30 days" },
|
||||
{ "name": "Type › Bug", "color": "9a2c2c", "description": "Something isn't working" },
|
||||
{ "name": "Type › Dependency", "color": "243759", "description": "Item is associated to dependency" },
|
||||
{ "name": "Type › Lock Maintenance", "color": "FBCA04", "description": "Sync package-lock.json" },
|
||||
{ "name": "Type › Docs", "color": "0e588d", "description": "Improvements or modifications to docs" },
|
||||
{ "name": "Type › Feature", "color": "3c4e93", "description": "Feature request" },
|
||||
{ "name": "Type › Git Action", "color": "030406", "description": "GitHub Action / workflow" },
|
||||
{ "name": "Type › Pull Request", "color": "8F1784", "description": "Normal pull request" },
|
||||
{ "name": "Type › Roadmap", "color": "8F1784", "description": "Feature or bug currently planned for implementation" },
|
||||
{ "name": "Type › Internal", "color": "A51994", "description": "Assigned items are for internal developer use" },
|
||||
{ "name": "Build › Desktop", "color": "c7ca4a", "description": "Specific to desktop" },
|
||||
{ "name": "Build › Linux", "color": "c7ca4a", "description": "Specific to Linux" },
|
||||
{ "name": "Build › MacOS", "color": "c7ca4a", "description": "Specific to MacOS" },
|
||||
{ "name": "Build › Mobile", "color": "c7ca4a", "description": "Specific to mobile" },
|
||||
{ "name": "Build › Web", "color": "c7ca4a", "description": "Specific to web" },
|
||||
{ "name": "Build › Windows", "color": "c7ca4a", "description": "Specific to Windows" },
|
||||
{ "name": "› API", "color": "F99B50", "description": "Plugin API, CLI, browser JS API" },
|
||||
{ "name": "› Auto-type", "color": "9141E0", "description": "Auto-type functionality in desktop apps" },
|
||||
{ "name": "› Browser", "color": "9141E0", "description": "Browser plugins and passing data to <=> from app" },
|
||||
{ "name": "› Customization", "color": "E3F0FC", "description": "Customizations: plugins, themes, configs" },
|
||||
{ "name": "› Design", "color": "FA70DE", "description": "Design related queries" },
|
||||
{ "name": "› Dist", "color": "FA70DE", "description": "Installers and other forms of software distribution" },
|
||||
{ "name": "› Enterprise", "color": "11447a", "description": "Issues about collaboration, administration, and so on" },
|
||||
{ "name": "› Hardware", "color": "5a7503", "description": "YubiKey, other tokens, biometrics" },
|
||||
{ "name": "› Import/Export", "color": "F5FFCC", "description": "Import from and export to different file formats" },
|
||||
{ "name": "› Improvement", "color": "185c98", "description": "Enhance an existing feature" },
|
||||
{ "name": "› Performance", "color": "006b75", "description": "Web and desktop performance issues" },
|
||||
{ "name": "› Plugin Request", "color": "FCE9CA", "description": "Requested changes should be implemented as a plugin" },
|
||||
{ "name": "› Security", "color": "F75D39", "description": "Security issues" },
|
||||
{ "name": "› Self-Hosting", "color": "fad8c7", "description": "Self-hosting installations and configs" },
|
||||
{ "name": "› Storage", "color": "5319e7", "description": "Storage providers: Dropbox, Google, WebDAV, etc." },
|
||||
{ "name": "› Updater", "color": "1BADDE", "description": "Auto-updater issues" },
|
||||
{ "name": "› UX", "color": "1BADDE", "description": "UX and usability" },
|
||||
{ "name": "› Website", "color": "fef2c0", "description": "Website related issues" },
|
||||
{ "name": "⚠ Urgent", "color": "a8740e", "description": "Requires urgent attention" },
|
||||
{ "name": "⚠ Announcement", "color": "DB4712", "description": "Announcements" },
|
||||
{ "name": "📰 Progress Report", "color": "392297", "description": "Development updates" },
|
||||
{ "name": "📦 Release", "color": "277542", "description": "Release announcements" },
|
||||
{ "name": "✔️ Poll", "color": "972255", "description": "Community polls" },
|
||||
{ "name": "❔ Question", "color": "FFFFFF", "description": "All questions" }
|
||||
]
|
||||
|
||||
# #
|
||||
@@ -140,14 +152,17 @@ env:
|
||||
jobs:
|
||||
|
||||
# #
|
||||
# Job › Autoscan
|
||||
# Job › PR Scan
|
||||
#
|
||||
# automatically scan a pull request once it is submitted
|
||||
# #
|
||||
|
||||
job-pr-autoscan:
|
||||
name: 🎫 Issues › Autoscan
|
||||
# runs-on: ubuntu-latest
|
||||
runs-on: apollo-x64
|
||||
timeout-minutes: 7
|
||||
job-pr-scan:
|
||||
name: >-
|
||||
🎫 Issues › Autoscan
|
||||
runs-on: ubuntu-latest
|
||||
# runs-on: apollo-x64
|
||||
timeout-minutes: 5
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
@@ -156,27 +171,135 @@ jobs:
|
||||
steps:
|
||||
|
||||
# #
|
||||
# Cleanup › Set Env Variables
|
||||
# PR › Scan › Checkout
|
||||
# #
|
||||
|
||||
- name: '☑️ Checkout'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# #
|
||||
# PR › Scan › Job Information
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🕛 Get Timestamp
|
||||
id: task_autocheck_set_timestamp
|
||||
run: |
|
||||
echo "NOW=$(date +'%m-%d-%Y %H:%M:%S')" >> $GITHUB_ENV
|
||||
echo "NOW_SHORT=$(date +'%m-%d-%Y')" >> $GITHUB_ENV
|
||||
echo "NOW_LONG=$(date +'%m-%d-%Y %H:%M')" >> $GITHUB_ENV
|
||||
echo "NOW_DOCKER_LABEL=$(date +'%Y%m%d')" >> $GITHUB_ENV
|
||||
🔄 Load Job
|
||||
uses: qoomon/actions--context@v4
|
||||
id: 'context'
|
||||
|
||||
# #
|
||||
# PR › Scan › Start
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
✅ Start
|
||||
run: |
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo " Starting Job ${{ steps.context.outputs.job_name }}"
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
|
||||
YEAR="$(date +'%Y')"
|
||||
echo "YEAR=${YEAR}" >> $GITHUB_ENV
|
||||
|
||||
NOW="$(date +'%m-%d-%Y %H:%M:%S')" # 02-25-2025 12:49:48
|
||||
echo "NOW=${NOW}" >> $GITHUB_ENV
|
||||
|
||||
NOW_SHORT="$(date +'%m-%d-%Y')" # 02-25-2025
|
||||
echo "NOW_SHORT=${NOW_SHORT}" >> $GITHUB_ENV
|
||||
|
||||
NOW_LONG="$(date +'%m-%d-%Y %H:%M')" # 02-25-2025 12:49
|
||||
echo "NOW_LONG=${NOW_LONG}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER="$(date +'%Y%m%d')" # 20250225
|
||||
echo "NOW_DOCKER=${NOW_DOCKER}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER_TS="$(date -u +'%FT%T.%3NZ')" # 2025-02-25T12:50:11.569Z
|
||||
echo "NOW_DOCKER_TS=${NOW_DOCKER_TS}" >> $GITHUB_ENV
|
||||
|
||||
SHA1="$(git rev-parse HEAD)" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1=${SHA1}" >> $GITHUB_ENV
|
||||
|
||||
SHA1_GH="$(echo ${GITHUB_SHA})" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1_GH=${SHA1_GH}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_1DIGIT="$(echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-1)" # 3.22 > 3
|
||||
echo "PKG_VER_1DIGIT=${PKG_VER_1DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_2DIGIT="$(echo ${{ env.IMAGE_VERSION }} | cut -f2 -d ":" | cut -c1-3)" # 3.22 > 3.2
|
||||
echo "PKG_VER_2DIGIT=${PKG_VER_2DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
sudo apt -qq update
|
||||
sudo apt -qq install tree
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
echo " Runner .............. ${{ runner.name }}"
|
||||
echo " Workflow ............ ${{ github.workflow }} (#${{ github.workflow_ref }})"
|
||||
echo " Run Number .......... ${{ github.run_number }}"
|
||||
echo " Ref ................. ${{ github.ref }}"
|
||||
echo " Ref Name ............ ${{ github.ref_name }}"
|
||||
echo " Event Name .......... ${{ github.event_name }}"
|
||||
echo " Repo ................ ${{ github.repository }}"
|
||||
echo " Repo Owner .......... ${{ github.repository_owner }}"
|
||||
echo " Run ID .............. https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
echo " Triggered By ........ ${{ github.actor }}"
|
||||
echo " SHA 1 (GITHUB_SHA) .. ${GITHUB_SHA}"
|
||||
echo " SHA 2 (github.sha) .. ${{ github.sha }}"
|
||||
echo " SHA 3 (env.SHA1) .... ${SHA1}"
|
||||
echo " SHA 4 (env.SHA1_GH) . ${SHA1_GH}"
|
||||
echo " Workspace ........... ${{ github.workspace }}"
|
||||
echo " PWD ................. ${PWD}"
|
||||
echo " Job Name ............ ${{ steps.context.outputs.job_name }}"
|
||||
echo " Job ID .............. ${{ steps.context.outputs.job_id }}"
|
||||
echo " Job URL ............. ${{ steps.context.outputs.job_url }}"
|
||||
echo " Run ID .............. ${{ steps.context.outputs.run_id }}"
|
||||
echo " Run Attempt ......... ${{ steps.context.outputs.run_attempt }}"
|
||||
echo " Run Number .......... ${{ steps.context.outputs.run_number }}"
|
||||
echo " Run URL ............. ${{ steps.context.outputs.run_url }}"
|
||||
echo " Run Env ............. ${{ steps.context.outputs.environment }}"
|
||||
echo " Run Env URL ......... ${{ steps.context.outputs.environment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Deployment URL .. ${{ steps.context.outputs.deployment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Runner Name ..... ${{ steps.context.outputs.runner_name }}"
|
||||
echo " Run Runner ID ....... ${{ steps.context.outputs.runner_id }}"
|
||||
echo " Year ................ ${YEAR}"
|
||||
echo " Now ................. ${NOW}"
|
||||
echo " Now (Short) ......... ${NOW_SHORT}"
|
||||
echo " Now (Long) .......... ${NOW_LONG}"
|
||||
echo " Now (Docker) ........ ${NOW_DOCKER}"
|
||||
echo " Now (Docker TS) ..... ${NOW_DOCKER_TS}"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
tree -I node_modules -I .git
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# #
|
||||
# PR Scan › Labels › Verify Existing
|
||||
#
|
||||
# check if repo has all of the needed issue / pr labels; create label if not exists
|
||||
#
|
||||
# action needed if using 'pull_request' and 'issue_comment'
|
||||
# to get the pull request, you would normally use ${{ github.event.number }}
|
||||
# however this isnt available for 'issue_comment'
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🏷️ Verify Existing Labels
|
||||
id: task_autocheck_labels_verify
|
||||
🎫 Labels › Verify Existing
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.ADMINSERV_TOKEN_CL || github.token }}
|
||||
@@ -191,7 +314,7 @@ jobs:
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
name: label.name,
|
||||
description: label.description || '',
|
||||
description: label.description || 'No Description',
|
||||
color: label.color
|
||||
});
|
||||
}
|
||||
@@ -209,13 +332,15 @@ jobs:
|
||||
}
|
||||
|
||||
# #
|
||||
# set issue number
|
||||
# PR Scan › Assign Pull Request ID to variable
|
||||
#
|
||||
# get id (number) for pr when submitted
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
#️⃣ Issue number › Set
|
||||
#️⃣ Pull-Request ID › Set
|
||||
id: task_prscan_issue_num_set
|
||||
uses: actions/github-script@v7
|
||||
id: task_autocheck_issue_num_set
|
||||
with:
|
||||
github-token: ${{ secrets.ADMINSERV_TOKEN_CL || github.token }}
|
||||
script: |
|
||||
@@ -244,41 +369,40 @@ jobs:
|
||||
result-encoding: string
|
||||
|
||||
# #
|
||||
# print issue number
|
||||
# PR Scan › Pull-Request ID › Print
|
||||
#
|
||||
# prints the pr number detected
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
#️⃣ Issue number › Print
|
||||
id: task_autocheck_issue_num_get
|
||||
#️⃣ Pull-Request ID › Print
|
||||
run: |
|
||||
echo '${{ steps.task_autocheck_issue_num_set.outputs.result }}'
|
||||
echo '${{ steps.task_prscan_issue_num_set.outputs.result }}'
|
||||
|
||||
# #
|
||||
# checkout
|
||||
# PR Scan › Checkout
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
☑️ Checkout
|
||||
id: task_autoscan_checkout
|
||||
uses: actions/checkout@v4
|
||||
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' ) )
|
||||
with:
|
||||
token: ${{ secrets.ADMINSERV_TOKEN_CL || github.token }}
|
||||
fetch-depth: 0
|
||||
ref: "refs/pull/${{ steps.task_autocheck_issue_num_set.outputs.result }}/merge"
|
||||
ref: "refs/pull/${{ steps.task_prscan_issue_num_set.outputs.result }}/merge"
|
||||
|
||||
# #
|
||||
# nodejs
|
||||
# PR Scan › Setup NodeJS
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
⚙️ Setup Node
|
||||
id: task_autocheck_nodejs
|
||||
uses: actions/setup-node@v4
|
||||
|
||||
# #
|
||||
# get list of changed files
|
||||
# PR Scan › Get List of Changed Files
|
||||
#
|
||||
# Effortlessly track all changed files and directories relative to a target branch,
|
||||
# the current branch (preceding commit or the last remote commit), multiple branches,
|
||||
@@ -288,49 +412,47 @@ jobs:
|
||||
|
||||
- name: >-
|
||||
📄 Get changed files
|
||||
id: task_autocheck_changed_files_get
|
||||
id: task_prscan_changed_files_get
|
||||
uses: tj-actions/changed-files@v46
|
||||
with:
|
||||
separator: ","
|
||||
|
||||
# #
|
||||
# list of changed files
|
||||
# PR Scan › List All Changed Files
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
📄 List all added files
|
||||
id: task_autocheck_added_files_get
|
||||
id: task_prscan_added_files_get
|
||||
run: |
|
||||
for file in ${CHANGED_FILES}; do
|
||||
echo "$file was changed"
|
||||
done
|
||||
env:
|
||||
ADDED_FILES: ${{ steps.task_autocheck_changed_files_get.outputs.added_files }}
|
||||
MODIFIED_FILES: ${{ steps.task_autocheck_changed_files_get.outputs.modified_files }}
|
||||
CHANGED_FILES: ${{ steps.task_autocheck_changed_files_get.outputs.all_changed_files }}
|
||||
COUNT_ADDED: ${{ steps.task_autocheck_changed_files_get.outputs.added_files_count }}
|
||||
COUNT_MODIFIED: ${{ steps.task_autocheck_changed_files_get.outputs.modified_files_count }}
|
||||
COUNT_DELETED: ${{ steps.task_autocheck_changed_files_get.outputs.deleted_files_count }}
|
||||
COUNT_RENAMED: ${{ steps.task_autocheck_changed_files_get.outputs.renamed_files_count }}
|
||||
COUNT_COPIED: ${{ steps.task_autocheck_changed_files_get.outputs.copied_files_count }}
|
||||
ADDED_FILES: ${{ steps.task_prscan_changed_files_get.outputs.added_files }}
|
||||
MODIFIED_FILES: ${{ steps.task_prscan_changed_files_get.outputs.modified_files }}
|
||||
CHANGED_FILES: ${{ steps.task_prscan_changed_files_get.outputs.all_changed_files }}
|
||||
COUNT_ADDED: ${{ steps.task_prscan_changed_files_get.outputs.added_files_count }}
|
||||
COUNT_MODIFIED: ${{ steps.task_prscan_changed_files_get.outputs.modified_files_count }}
|
||||
COUNT_DELETED: ${{ steps.task_prscan_changed_files_get.outputs.deleted_files_count }}
|
||||
COUNT_RENAMED: ${{ steps.task_prscan_changed_files_get.outputs.renamed_files_count }}
|
||||
COUNT_COPIED: ${{ steps.task_prscan_changed_files_get.outputs.copied_files_count }}
|
||||
|
||||
# #
|
||||
# List directories
|
||||
# PR Scan › List Directories / File Structure
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
📂 List Directories
|
||||
id: task_autocheck_dirs_list
|
||||
run: |
|
||||
ls
|
||||
|
||||
# #
|
||||
# Run autocheck
|
||||
# PR Scan › Autocheck
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
☑️ Run Autocheck
|
||||
id: task_autocheck_run
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.ADMINSERV_TOKEN_CL }}
|
||||
@@ -358,8 +480,8 @@ jobs:
|
||||
"number": 32
|
||||
},
|
||||
"repo": {
|
||||
"owner": "TheBinaryNinja",
|
||||
"repo": "TVApp2"
|
||||
"owner": "Aetherinox",
|
||||
"repo": "TheRepoName"
|
||||
},
|
||||
"payload": {
|
||||
"action": "synchronize",
|
||||
@@ -368,19 +490,19 @@ jobs:
|
||||
"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"
|
||||
"events_url": "https://api.github.com/orgs/Aetherinox/events",
|
||||
"hooks_url": "https://api.github.com/orgs/Aetherinox/hooks",
|
||||
"issues_url": "https://api.github.com/orgs/Aetherinox/issues",
|
||||
"login": "Aetherinox",
|
||||
"members_url": "https://api.github.com/orgs/Aetherinox/members{/member}",
|
||||
"public_members_url": "https://api.github.com/orgs/Aetherinox/public_members{/member}",
|
||||
"repos_url": "https://api.github.com/orgs/Aetherinox/repos",
|
||||
"url": "https://api.github.com/orgs/Aetherinox"
|
||||
},
|
||||
"pull_request": {
|
||||
"created_at": "2025-03-17T23:32:22Z",
|
||||
"updated_at": "2025-03-17T23:32:22Z",
|
||||
"url": "https://api.github.com/repos/TheBinaryNinja/tvapp2",
|
||||
"url": "https://api.github.com/repos/Aetherinox/TheRepoName",
|
||||
"title": "Test PR Workflow",
|
||||
"head": {
|
||||
"ref": "main"
|
||||
@@ -399,16 +521,16 @@ jobs:
|
||||
"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"
|
||||
"url": "https://api.github.com/repos/Aetherinox/TheRepoName/labels/AC%20%E2%80%BA%20Passed"
|
||||
},
|
||||
{
|
||||
"color": "8F1784",
|
||||
"default": false,
|
||||
"description": "Normal pull request",
|
||||
"id": 7821944963,
|
||||
"name": "Type ◦ Pull Request",
|
||||
"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"
|
||||
"url": "https://api.github.com/repos/Aetherinox/TheRepoName/labels/Type%20%E2%97%A6%20Pull%20Request"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -417,7 +539,7 @@ jobs:
|
||||
"sha": "c938f7a21247f69b29cf352d0c6890a63f260d47",
|
||||
"ref": "refs/heads/main",
|
||||
"workflow": "🎫 Issues › Scan",
|
||||
"action": "task_autocheck_run",
|
||||
"action": "task_prscan_run",
|
||||
"actor": "renovate[bot]",
|
||||
"job": "job-pr-autoscan",
|
||||
"runNumber": 45,
|
||||
@@ -454,7 +576,7 @@ jobs:
|
||||
labels.push(name);
|
||||
});
|
||||
|
||||
const files_List = `${{ steps.task_autocheck_changed_files_get.outputs.all_changed_files }}` || ''
|
||||
const files_List = `${{ steps.task_prscan_changed_files_get.outputs.all_changed_files }}` || ''
|
||||
const files_Array = files_List.split(',')
|
||||
const branch_ref = `${ ct.payload.pull_request.head.ref }`
|
||||
|
||||
@@ -507,11 +629,11 @@ jobs:
|
||||
| Author | [ ` + ct.payload.pull_request.user.login + ` ](https://github.com/` + ct.repo.owner + `/) |
|
||||
| Repo | [ ` + ct.repo.repo + ` ](https://github.com/` + ct.repo.owner + `/` + ct.repo.repo + `) |
|
||||
| Branch | [ ` + ct.payload.pull_request.head.ref + `](https://github.com/` + ct.repo.owner + `/` + ct.repo.repo + `/tree/` + ct.payload.pull_request.head.ref + `) ⇁ [ ` + ct.payload.pull_request.base.ref + `](https://github.com/` + ct.repo.owner + `/` + ct.repo.repo + `/tree/` + ct.payload.pull_request.base.ref + `) |
|
||||
| Added Files | ${{ steps.task_autocheck_changed_files_get.outputs.added_files_count }} |
|
||||
| Modified Files | ${{ steps.task_autocheck_changed_files_get.outputs.all_modified_files_count }} |
|
||||
| Renamed Files | ${{ steps.task_autocheck_changed_files_get.outputs.renamed_files_count }} |
|
||||
| Copied Files | ${{ steps.task_autocheck_changed_files_get.outputs.deleted_files_count }} |
|
||||
| Deleted Files | ${{ steps.task_autocheck_changed_files_get.outputs.deleted_files_count }} |
|
||||
| Added Files | ${{ steps.task_prscan_changed_files_get.outputs.added_files_count }} |
|
||||
| Modified Files | ${{ steps.task_prscan_changed_files_get.outputs.all_modified_files_count }} |
|
||||
| Renamed Files | ${{ steps.task_prscan_changed_files_get.outputs.renamed_files_count }} |
|
||||
| Copied Files | ${{ steps.task_prscan_changed_files_get.outputs.deleted_files_count }} |
|
||||
| Deleted Files | ${{ steps.task_prscan_changed_files_get.outputs.deleted_files_count }} |
|
||||
`;
|
||||
|
||||
message.push ( md_table );
|
||||
@@ -542,7 +664,21 @@ jobs:
|
||||
const type_dependency =
|
||||
[
|
||||
"dependabot/npm_and_yarn",
|
||||
"renovate/github_actions"
|
||||
"renovate/github_actions",
|
||||
"renovate/testing-library",
|
||||
"renovate/electron",
|
||||
"renovate/aetherinox/noxenv",
|
||||
"renovate/playwright",
|
||||
"renovate/types",
|
||||
"renovate/@types",
|
||||
"renovate/eslint",
|
||||
"renovate/stylistic",
|
||||
"renovate/jimp",
|
||||
"renovate/custom-electron-prompt",
|
||||
"renovate/moment",
|
||||
"renovate/semver",
|
||||
"renovate/toasted",
|
||||
"renovate/uuid"
|
||||
];
|
||||
|
||||
const type_gitaction =
|
||||
@@ -551,6 +687,11 @@ jobs:
|
||||
"renovate/github_actions"
|
||||
];
|
||||
|
||||
const type_maint =
|
||||
[
|
||||
"renovate/lock-file-maintenance"
|
||||
];
|
||||
|
||||
const files_skipList =
|
||||
[
|
||||
".github",
|
||||
@@ -907,11 +1048,14 @@ jobs:
|
||||
|
||||
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 bMaintenance = type_maint.some( s => s.includes( branch_ref ) || branch_ref.includes( s ) );
|
||||
|
||||
if ( actor == "${{ env.BOT_NAME_DEPENDABOT }}" && bDependency || actor == "${{ env.BOT_NAME_RENOVATE }}" && bDependency )
|
||||
labels.push( "${{ env.LABEL_TYPE_DEPENDENCY }}" );
|
||||
else if ( actor == "${{ env.BOT_NAME_DEPENDABOT }}" && bGitaction || actor == "${{ env.BOT_NAME_RENOVATE }}" && bGitaction )
|
||||
labels.push( "${{ env.LABEL_TYPE_GITACTION }}" );
|
||||
else if ( actor == "${{ env.BOT_NAME_DEPENDABOT }}" && bMaintenance || actor == "${{ env.BOT_NAME_RENOVATE }}" && bMaintenance )
|
||||
labels.push( "${{ env.LABEL_TYPE_MAINTENANCE }}" );
|
||||
|
||||
if ( ct.payload.pull_request.labels.filter( label => label.name === "${{ env.LABEL_CHECK_CHANGES_REQ }}" ).length > 0 )
|
||||
labels.push( "${{ env.LABEL_CHECK_CHANGES_REQ }}" );
|
||||
@@ -960,7 +1104,6 @@ jobs:
|
||||
|
||||
- name: >-
|
||||
🕛 Get Weekly Commit List
|
||||
id: task_autocheck_set_weekly_commit_list
|
||||
run: |
|
||||
echo 'WEEKLY_COMMITS<<EOF' >> $GITHUB_ENV
|
||||
git log --format="[\`%h\`](${{ github.server_url }}/${{ github.repository }}/commit/%H) %s - %an" --since=7.days >> $GITHUB_ENV
|
||||
@@ -972,16 +1115,15 @@ jobs:
|
||||
|
||||
- name: >-
|
||||
🔔 Send Discord Webhook Message (Success)
|
||||
id: task_autocheck_notify_discord_success
|
||||
uses: tsickert/discord-webhook@v7.0.0
|
||||
if: success()
|
||||
with:
|
||||
username: 'Io'
|
||||
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
|
||||
username: ${{ env.DISCORD_BOT_NAME }}
|
||||
avatar-url: ${{ env.DISCORD_BOT_AVATAR }}
|
||||
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKfLOWS }}
|
||||
embed-title: "⚙️ ${{ github.workflow_ref }}"
|
||||
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
embed-thumbnail-url: 'https://cdn.pixabay.com/photo/2022/01/30/13/33/github-6980894_960_720.png'
|
||||
embed-thumbnail-url: ${{ env.DISCORD_BOT_EMBED_THUMBNAIL }}
|
||||
embed-description: |
|
||||
## 🎫 Issues › Scan ${{ job.status == 'success' && '✅' || '❌' }}
|
||||
|
||||
@@ -1004,11 +1146,11 @@ jobs:
|
||||
- Status: `${{ github.event.pull_request.state }}`
|
||||
|
||||
### Scan Results
|
||||
- Added Files: ${{ steps.task_autocheck_changed_files_get.outputs.added_files_count }}
|
||||
- Modified Files: ${{ steps.task_autocheck_changed_files_get.outputs.all_modified_files_count }}
|
||||
- Renamed Files: ${{ steps.task_autocheck_changed_files_get.outputs.renamed_files_count }}
|
||||
- Copied Files: ${{ steps.task_autocheck_changed_files_get.outputs.copied_files_count }}
|
||||
- Deleted Files: ${{ steps.task_autocheck_changed_files_get.outputs.deleted_files_count }}
|
||||
- Added Files: ${{ steps.task_prscan_added_files_get.outputs.added_files_count }}
|
||||
- Modified Files: ${{ steps.task_prscan_added_files_get.outputs.all_modified_files_count }}
|
||||
- Renamed Files: ${{ steps.task_prscan_added_files_get.outputs.renamed_files_count }}
|
||||
- Copied Files: ${{ steps.task_prscan_added_files_get.outputs.copied_files_count }}
|
||||
- Deleted Files: ${{ steps.task_prscan_added_files_get.outputs.deleted_files_count }}
|
||||
|
||||
embed-color: ${{ job.status == 'success' && '5763719' || '15418782' }}
|
||||
embed-footer-text: "Completed at ${{ env.NOW }} UTC"
|
||||
@@ -1023,16 +1165,15 @@ jobs:
|
||||
|
||||
- name: >-
|
||||
🔔 Send Discord Webhook Message (Failure)
|
||||
id: task_autocheck_notify_discord_failure
|
||||
uses: tsickert/discord-webhook@v7.0.0
|
||||
if: failure()
|
||||
with:
|
||||
username: 'Io'
|
||||
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
|
||||
username: ${{ env.DISCORD_BOT_NAME }}
|
||||
avatar-url: ${{ env.DISCORD_BOT_AVATAR }}
|
||||
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKfLOWS }}
|
||||
embed-title: "⚙️ ${{ github.workflow_ref }}"
|
||||
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
embed-thumbnail-url: 'https://cdn.pixabay.com/photo/2022/01/30/13/33/github-6980894_960_720.png'
|
||||
embed-thumbnail-url: ${{ env.DISCORD_BOT_EMBED_THUMBNAIL }}
|
||||
embed-description: |
|
||||
## 🎫 Issues › Scan ${{ job.status == 'success' && '✅' || '❌' }}
|
||||
|
||||
@@ -1055,11 +1196,11 @@ jobs:
|
||||
- Status: `${{ github.event.pull_request.state }}`
|
||||
|
||||
### Scan Results
|
||||
- Added Files: ${{ steps.task_autocheck_changed_files_get.outputs.added_files_count }}
|
||||
- Modified Files: ${{ steps.task_autocheck_changed_files_get.outputs.all_modified_files_count }}
|
||||
- Renamed Files: ${{ steps.task_autocheck_changed_files_get.outputs.renamed_files_count }}
|
||||
- Copied Files: ${{ steps.task_autocheck_changed_files_get.outputs.copied_files_count }}
|
||||
- Deleted Files: ${{ steps.task_autocheck_changed_files_get.outputs.deleted_files_count }}
|
||||
- Added Files: ${{ steps.task_prscan_added_files_get.outputs.added_files_count }}
|
||||
- Modified Files: ${{ steps.task_prscan_added_files_get.outputs.all_modified_files_count }}
|
||||
- Renamed Files: ${{ steps.task_prscan_added_files_get.outputs.renamed_files_count }}
|
||||
- Copied Files: ${{ steps.task_prscan_added_files_get.outputs.copied_files_count }}
|
||||
- Deleted Files: ${{ steps.task_prscan_added_files_get.outputs.deleted_files_count }}
|
||||
|
||||
embed-color: ${{ job.status == 'success' && '5763719' || '15418782' }}
|
||||
embed-footer-text: "Completed at ${{ env.NOW }} UTC"
|
||||
|
||||
720
.github/workflows/issues-stale.yml
vendored
720
.github/workflows/issues-stale.yml
vendored
@@ -3,19 +3,18 @@
|
||||
# @author 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
|
||||
# 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
|
||||
#
|
||||
# @notes This Github action must be activated manually. This workflow script will do the following:
|
||||
#
|
||||
# - Scan issues / pull requests and make sure they have properly assigned labels:
|
||||
# - `Bug`
|
||||
# - `Feature`
|
||||
# - `Urgent`
|
||||
# - `Roadmap`
|
||||
# - `Bug`
|
||||
# - `Feature`
|
||||
# - `Urgent`
|
||||
# - `Roadmap`
|
||||
#
|
||||
# - Workflow script will then scan each pr or issue and mark them as `Stale`
|
||||
# if they haven't had any replies in 30 days.
|
||||
@@ -28,15 +27,20 @@
|
||||
# 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
|
||||
# secrets.CODECOV_TOKEN codecov upload token for nodejs projects
|
||||
# secrets.MAXMIND_GELITE_TOKEN maxmind API token
|
||||
# secrets.CF_ACCOUNT_ID cloudflare account id
|
||||
# secrets.CF_ACCOUNT_TOKEN cloudflare account token
|
||||
# secrets.ORG_TOKEN org github personal access token (fine-grained)
|
||||
# secrets.ORG_TOKEN_CL org github personal access token (classic)
|
||||
# secrets.ORG_DOCKERHUB_TOKEN org dockerhub secret
|
||||
# secrets.ORG_GITEA_TOKEN org gitea personal access token (classic) with package:write permission
|
||||
# secrets.BOT_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
|
||||
# secrets.BOT_GPG_KEY_B64 bot gpg private key (binary) converted to base64
|
||||
# secrets.BOT_GPG_PASSPHRASE bot gpg private key passphrase
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_RELEASES discord webhook to report release notifications from github to discord
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_WORKFLOWS discord webhook to report workflow notifications from github to discord
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_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
|
||||
@@ -48,8 +52,8 @@
|
||||
# act -W .github/workflows/issues-stale.yml -s TOKEN_CL=XXXXXXXXXX --pull=false
|
||||
# #
|
||||
|
||||
name: "🎫 Issues › Stale"
|
||||
run-name: "🎫 Issues › Stale"
|
||||
name: '🎫 Issues › Stale'
|
||||
run-name: '🎫 Issues › Stale'
|
||||
|
||||
# #
|
||||
# triggers
|
||||
@@ -57,76 +61,84 @@ run-name: "🎫 Issues › Stale"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
# schedule:
|
||||
# - cron: "0 0 * * *"
|
||||
|
||||
# #
|
||||
# environment variables
|
||||
# #
|
||||
|
||||
env:
|
||||
PREFIX_BUG: "🐛 Bug"
|
||||
PREFIX_DEPENDENCY: "Dependency"
|
||||
PREFIX_DOCS: "Docs"
|
||||
PREFIX_FEATURE: "💡 Feature"
|
||||
PREFIX_GIT: "Git Action"
|
||||
PREFIX_PR: "PR"
|
||||
PREFIX_ROADMAP: "🗺️ Roadmap"
|
||||
PREFIX_INTERNAL: "Internal"
|
||||
PREFIX_URGENT: "⚠ Urgent"
|
||||
PREFIX_BUG: "🐛 Bug"
|
||||
PREFIX_DEPENDENCY: "Dependency"
|
||||
PREFIX_DOCS: "Docs"
|
||||
PREFIX_FEATURE: "💡 Feature"
|
||||
PREFIX_GIT: "Git Action"
|
||||
PREFIX_PR: "PR"
|
||||
PREFIX_ROADMAP: "🗺️ Roadmap"
|
||||
PREFIX_INTERNAL: "Internal"
|
||||
PREFIX_URGENT: "⚠ Urgent"
|
||||
|
||||
LABEL_BUG: "Type ◦ Bug"
|
||||
LABEL_DEPENDENCY: "Type ◦ Dependency"
|
||||
LABEL_DOCS: "Type ◦ Docs"
|
||||
LABEL_FEATURE: "Type ◦ Feature"
|
||||
LABEL_GIT: "Type ◦ Git Action"
|
||||
LABEL_PR: "Type ◦ Pull Request"
|
||||
LABEL_ROADMAP: "Type ◦ Roadmap"
|
||||
LABEL_INTERNAL: "Type ◦ Internal"
|
||||
LABEL_URGENT: "⚠ Urgent"
|
||||
LABEL_BUG: "Type › Bug"
|
||||
LABEL_DEPENDENCY: "Type › Dependency"
|
||||
LABEL_DOCS: "Type › Docs"
|
||||
LABEL_FEATURE: "Type › Feature"
|
||||
LABEL_GIT: "Type › Git Action"
|
||||
LABEL_PR: "Type › Pull Request"
|
||||
LABEL_ROADMAP: "Type › Roadmap"
|
||||
LABEL_INTERNAL: "Type › Internal"
|
||||
LABEL_LOCKED: "Status › Locked"
|
||||
LABEL_STALE: "Status › Stale"
|
||||
LABEL_AUTOCLOSE: "Status › Autoclosed"
|
||||
LABEL_ACCEPTED: "Status › Accepted"
|
||||
LABEL_REVIEW: "Status › Review"
|
||||
LABEL_PENDING: "Status › Pending"
|
||||
LABEL_AC_REVIEW: "AC › Review Required"
|
||||
LABEL_URGENT: "⚠ Urgent"
|
||||
|
||||
ASSIGN_USER: Aetherinox
|
||||
BOT_NAME_1: EuropaServ
|
||||
BOT_NAME_2: BinaryServ
|
||||
BOT_NAME_DEPENDABOT: dependabot[bot]
|
||||
BOT_NAME_RENOVATE: renovate[bot]
|
||||
ASSIGN_USER: Aetherinox
|
||||
BOT_NAME_1: EuropaServ
|
||||
BOT_NAME_2: BinaryServ
|
||||
BOT_NAME_DEPENDABOT: dependabot[bot]
|
||||
BOT_NAME_RENOVATE: renovate[bot]
|
||||
|
||||
LABELS_JSON: |
|
||||
[
|
||||
{ "name": "AC › Changes Made", "color": "8F1784", "description": "Requested changes have been made and are pending a re-scan" },
|
||||
{ "name": "AC › Changes Required", "color": "8F1784", "description": "Requires changes to be made to the package before being accepted" },
|
||||
{ "name": "AC › Failed", "color": "a61f2d", "description": "Autocheck failed to run through a complete cycle, requires investigation" },
|
||||
{ "name": "AC › Needs Rebase", "color": "8F1784", "description": "Due to the permissions on the requesting repo, this pull request must be rebased by the author" },
|
||||
{ "name": "AC › Passed", "color": "146b4a", "description": "Ready to be reviewed" },
|
||||
{ "name": "AC › Review Required", "color": "8F1784", "description": "PR needs to be reviewed by another person, after the requested changes have been made" },
|
||||
{ "name": "AC › Security Warning", "color": "761620", "description": "Does not conform to developer policies, or includes potentially dangerous code" },
|
||||
{ "name": "AC › Skipped Scan", "color": "8F1784", "description": "Author has skipped code scan" },
|
||||
{ "name": "Status 𐄂 Duplicate", "color": "75536b", "description": "Issue or pull request already exists" },
|
||||
{ "name": "Status 𐄂 Accepted", "color": "2e7539", "description": "This pull request has been accepted" },
|
||||
{ "name": "Status 𐄂 Autoclosed", "color": "3E0915", "description": "Originally stale and was autoclosed for no activity" },
|
||||
{ "name": "Status 𐄂 Denied", "color": "ba4058", "description": "Pull request has been denied" },
|
||||
{ "name": "Status 𐄂 Locked", "color": "550F45", "description": "Automatically locked by AdminServ for a prolonged period of inactivity" },
|
||||
{ "name": "Status 𐄂 Need Info", "color": "2E3C4C", "description": "Not enough information to resolve" },
|
||||
{ "name": "Status 𐄂 No Action", "color": "030406", "description": "Closed without any action being taken" },
|
||||
{ "name": "Status 𐄂 Pending", "color": "984b12", "description": "Pending pull request" },
|
||||
{ "name": "Status 𐄂 Released", "color": "1b6626", "description": "Issues or PR has been implemented and is now live" },
|
||||
{ "name": "Status 𐄂 Reopened", "color": "8a6f14", "description": "A previously closed PR which has been re-opened" },
|
||||
{ "name": "Status 𐄂 Review", "color": "9e1451", "description": "Currently pending review" },
|
||||
{ "name": "Status 𐄂 Stale", "color": "928282", "description": "Has not had any activity in over 30 days" },
|
||||
{ "name": "Type ◦ Bug", "color": "9a2c2c", "description": "Something isn't working" },
|
||||
{ "name": "Type ◦ Dependency", "color": "243759", "description": "Item is associated to dependency" },
|
||||
{ "name": "Type ◦ Docs", "color": "0e588d", "description": "Improvements or modifications to docs" },
|
||||
{ "name": "Type ◦ Feature", "color": "3c4e93", "description": "Feature request" },
|
||||
{ "name": "Type ◦ Git Action", "color": "030406", "description": "GitHub Action / workflow" },
|
||||
{ "name": "Type ◦ Pull Request", "color": "8F1784", "description": "Normal pull request" },
|
||||
{ "name": "Type ◦ Roadmap", "color": "8F1784", "description": "Feature or bug currently planned for implementation" },
|
||||
{ "name": "Type ◦ Internal", "color": "A51994", "description": "Assigned items are for internal developer use" },
|
||||
{ "name": "Build ◦ Desktop", "color": "c7ca4a", "description": "Specific to desktop" },
|
||||
{ "name": "Build ◦ Linux", "color": "c7ca4a", "description": "Specific to Linux" },
|
||||
{ "name": "Build ◦ MacOS", "color": "c7ca4a", "description": "Specific to MacOS" },
|
||||
{ "name": "Build ◦ Mobile", "color": "c7ca4a", "description": "Specific to mobile" },
|
||||
{ "name": "Build ◦ Web", "color": "c7ca4a", "description": "Specific to web" },
|
||||
{ "name": "Build ◦ Windows", "color": "c7ca4a", "description": "Specific to Windows" },
|
||||
{ "name": "AC › Changes Made", "color": "8F1784", "description": "Requested changes have been made and are pending a re-scan" },
|
||||
{ "name": "AC › Changes Required", "color": "8F1784", "description": "Requires changes to be made to the package before being accepted" },
|
||||
{ "name": "AC › Failed", "color": "a61f2d", "description": "Autocheck failed to run through a complete cycle, requires investigation" },
|
||||
{ "name": "AC › Needs Rebase", "color": "8F1784", "description": "Due to the permissions on the requesting repo, this pull request must be rebased by the author" },
|
||||
{ "name": "AC › Passed", "color": "146b4a", "description": "Ready to be reviewed" },
|
||||
{ "name": "AC › Review Required", "color": "8F1784", "description": "PR needs to be reviewed by another person, after the requested changes have been made" },
|
||||
{ "name": "AC › Security Warning", "color": "761620", "description": "Does not conform to developer policies, or includes potentially dangerous code" },
|
||||
{ "name": "AC › Skipped Scan", "color": "8F1784", "description": "Author has skipped code scan" },
|
||||
{ "name": "Status › Duplicate", "color": "75536b", "description": "Issue or pull request already exists" },
|
||||
{ "name": "Status › Accepted", "color": "2e7539", "description": "This pull request has been accepted" },
|
||||
{ "name": "Status › Autoclosed", "color": "3E0915", "description": "Originally stale and was autoclosed for no activity" },
|
||||
{ "name": "Status › Denied", "color": "ba4058", "description": "Pull request has been denied" },
|
||||
{ "name": "Status › Locked", "color": "550F45", "description": "Automatically locked by AdminServ for a prolonged period of inactivity" },
|
||||
{ "name": "Status › Need Info", "color": "2E3C4C", "description": "Not enough information to resolve" },
|
||||
{ "name": "Status › No Action", "color": "030406", "description": "Closed without any action being taken" },
|
||||
{ "name": "Status › Pending", "color": "984b12", "description": "Pending pull request" },
|
||||
{ "name": "Status › Released", "color": "1b6626", "description": "Issues or PR has been implemented and is now live" },
|
||||
{ "name": "Status › Reopened", "color": "8a6f14", "description": "A previously closed PR which has been re-opened" },
|
||||
{ "name": "Status › Review", "color": "9e1451", "description": "Currently pending review" },
|
||||
{ "name": "Status › Stale", "color": "928282", "description": "Has not had any activity in over 30 days" },
|
||||
{ "name": "Type › Bug", "color": "9a2c2c", "description": "Something isn't working" },
|
||||
{ "name": "Type › Dependency", "color": "243759", "description": "Item is associated to dependency" },
|
||||
{ "name": "Type › Lock Maintenance", "color": "FBCA04", "description": "Sync package-lock.json" },
|
||||
{ "name": "Type › Docs", "color": "0e588d", "description": "Improvements or modifications to docs" },
|
||||
{ "name": "Type › Feature", "color": "3c4e93", "description": "Feature request" },
|
||||
{ "name": "Type › Git Action", "color": "030406", "description": "GitHub Action / workflow" },
|
||||
{ "name": "Type › Pull Request", "color": "8F1784", "description": "Normal pull request" },
|
||||
{ "name": "Type › Roadmap", "color": "8F1784", "description": "Feature or bug currently planned for implementation" },
|
||||
{ "name": "Type › Internal", "color": "A51994", "description": "Assigned items are for internal developer use" },
|
||||
{ "name": "Build › Desktop", "color": "c7ca4a", "description": "Specific to desktop" },
|
||||
{ "name": "Build › Linux", "color": "c7ca4a", "description": "Specific to Linux" },
|
||||
{ "name": "Build › MacOS", "color": "c7ca4a", "description": "Specific to MacOS" },
|
||||
{ "name": "Build › Mobile", "color": "c7ca4a", "description": "Specific to mobile" },
|
||||
{ "name": "Build › Web", "color": "c7ca4a", "description": "Specific to web" },
|
||||
{ "name": "Build › Windows", "color": "c7ca4a", "description": "Specific to Windows" },
|
||||
{ "name": "› API", "color": "F99B50", "description": "Plugin API, CLI, browser JS API" },
|
||||
{ "name": "› Auto-type", "color": "9141E0", "description": "Auto-type functionality in desktop apps" },
|
||||
{ "name": "› Browser", "color": "9141E0", "description": "Browser plugins and passing data to <=> from app" },
|
||||
@@ -170,40 +182,143 @@ jobs:
|
||||
name: >-
|
||||
🎫 Labels › Verify Existing
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 4
|
||||
# runs-on: apollo-x64
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
|
||||
# #
|
||||
# [ Create Labels ] Start
|
||||
# Labels › Create › Checkout
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
✅ Start
|
||||
id: task_label_create_start
|
||||
run: |
|
||||
echo "Assigning labels and assignees"
|
||||
|
||||
# #
|
||||
# [ Create Labels ] Checkout
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
☑️ Checkout
|
||||
id: task_label_create_checkout
|
||||
- name: '☑️ Checkout'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# #
|
||||
# [ Create Labels ] Verify Existing Labels
|
||||
# Labels › Create › Job Information
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🏷️ Verify Existing Labels
|
||||
id: task_label_create_verify
|
||||
🔄 Load Job
|
||||
uses: qoomon/actions--context@v4
|
||||
id: 'context'
|
||||
|
||||
# #
|
||||
# Labels › Create › Start
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
✅ Start
|
||||
run: |
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo " Starting Job ${{ steps.context.outputs.job_name }}"
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
|
||||
YEAR="$(date +'%Y')"
|
||||
echo "YEAR=${YEAR}" >> $GITHUB_ENV
|
||||
|
||||
NOW="$(date +'%m-%d-%Y %H:%M:%S')" # 02-25-2025 12:49:48
|
||||
echo "NOW=${NOW}" >> $GITHUB_ENV
|
||||
|
||||
NOW_SHORT="$(date +'%m-%d-%Y')" # 02-25-2025
|
||||
echo "NOW_SHORT=${NOW_SHORT}" >> $GITHUB_ENV
|
||||
|
||||
NOW_LONG="$(date +'%m-%d-%Y %H:%M')" # 02-25-2025 12:49
|
||||
echo "NOW_LONG=${NOW_LONG}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER="$(date +'%Y%m%d')" # 20250225
|
||||
echo "NOW_DOCKER=${NOW_DOCKER}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER_TS="$(date -u +'%FT%T.%3NZ')" # 2025-02-25T12:50:11.569Z
|
||||
echo "NOW_DOCKER_TS=${NOW_DOCKER_TS}" >> $GITHUB_ENV
|
||||
|
||||
SHA1="$(git rev-parse HEAD)" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1=${SHA1}" >> $GITHUB_ENV
|
||||
|
||||
SHA1_GH="$(echo ${GITHUB_SHA})" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1_GH=${SHA1_GH}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_1DIGIT="$(echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-1)" # 3.22 > 3
|
||||
echo "PKG_VER_1DIGIT=${PKG_VER_1DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_2DIGIT="$(echo ${{ env.IMAGE_VERSION }} | cut -f2 -d ":" | cut -c1-3)" # 3.22 > 3.2
|
||||
echo "PKG_VER_2DIGIT=${PKG_VER_2DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
sudo apt -qq update
|
||||
sudo apt -qq install tree
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
echo " Runner .............. ${{ runner.name }}"
|
||||
echo " Workflow ............ ${{ github.workflow }} (#${{ github.workflow_ref }})"
|
||||
echo " Run Number .......... ${{ github.run_number }}"
|
||||
echo " Ref ................. ${{ github.ref }}"
|
||||
echo " Ref Name ............ ${{ github.ref_name }}"
|
||||
echo " Event Name .......... ${{ github.event_name }}"
|
||||
echo " Repo ................ ${{ github.repository }}"
|
||||
echo " Repo Owner .......... ${{ github.repository_owner }}"
|
||||
echo " Run ID .............. https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
echo " Triggered By ........ ${{ github.actor }}"
|
||||
echo " SHA 1 (GITHUB_SHA) .. ${GITHUB_SHA}"
|
||||
echo " SHA 2 (github.sha) .. ${{ github.sha }}"
|
||||
echo " SHA 3 (env.SHA1) .... ${SHA1}"
|
||||
echo " SHA 4 (env.SHA1_GH) . ${SHA1_GH}"
|
||||
echo " Workspace ........... ${{ github.workspace }}"
|
||||
echo " PWD ................. ${PWD}"
|
||||
echo " Job Name ............ ${{ steps.context.outputs.job_name }}"
|
||||
echo " Job ID .............. ${{ steps.context.outputs.job_id }}"
|
||||
echo " Job URL ............. ${{ steps.context.outputs.job_url }}"
|
||||
echo " Run ID .............. ${{ steps.context.outputs.run_id }}"
|
||||
echo " Run Attempt ......... ${{ steps.context.outputs.run_attempt }}"
|
||||
echo " Run Number .......... ${{ steps.context.outputs.run_number }}"
|
||||
echo " Run URL ............. ${{ steps.context.outputs.run_url }}"
|
||||
echo " Run Env ............. ${{ steps.context.outputs.environment }}"
|
||||
echo " Run Env URL ......... ${{ steps.context.outputs.environment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Deployment URL .. ${{ steps.context.outputs.deployment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Runner Name ..... ${{ steps.context.outputs.runner_name }}"
|
||||
echo " Run Runner ID ....... ${{ steps.context.outputs.runner_id }}"
|
||||
echo " Year ................ ${YEAR}"
|
||||
echo " Now ................. ${NOW}"
|
||||
echo " Now (Short) ......... ${NOW_SHORT}"
|
||||
echo " Now (Long) .......... ${NOW_LONG}"
|
||||
echo " Now (Docker) ........ ${NOW_DOCKER}"
|
||||
echo " Now (Docker TS) ..... ${NOW_DOCKER_TS}"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
tree -I node_modules -I .git
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# #
|
||||
# Issues (Stale) › Labels › Create › Verify Existing
|
||||
#
|
||||
# check if repo has all of the needed issue / pr labels; create label if not exists
|
||||
#
|
||||
# action needed if using 'pull_request' and 'issue_comment'
|
||||
# to get the pull request, you would normally use ${{ github.event.number }}
|
||||
# however this isnt available for 'issue_comment'
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🎫 Labels › Verify Existing
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.ADMINSERV_TOKEN_CL }}
|
||||
github-token: ${{ secrets.ADMINSERV_TOKEN_CL || github.token }}
|
||||
script: |
|
||||
const labels = JSON.parse( process.env.LABELS_JSON );
|
||||
for ( const label of labels )
|
||||
@@ -215,7 +330,7 @@ jobs:
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
name: label.name,
|
||||
description: label.description || '',
|
||||
description: label.description || 'No Description',
|
||||
color: label.color
|
||||
});
|
||||
}
|
||||
@@ -233,7 +348,7 @@ jobs:
|
||||
}
|
||||
|
||||
# #
|
||||
# Job [ Check Labels ]
|
||||
# Issues (Stale) › Labels › Assign Missing
|
||||
#
|
||||
# Runs through all submissions to check for ones that have not been properly labeled
|
||||
# - Bug
|
||||
@@ -246,30 +361,140 @@ jobs:
|
||||
name: >-
|
||||
🎫 Labels › Assign Missing
|
||||
runs-on: ubuntu-latest
|
||||
# runs-on: apollo-x64
|
||||
timeout-minutes: 4
|
||||
needs: job-labels-create
|
||||
steps:
|
||||
|
||||
# #
|
||||
# [ Check Labels ] Checkout
|
||||
# Labels › Assign › Checkout
|
||||
# #
|
||||
|
||||
- name: "☑️ Prepare"
|
||||
id: task_issues_nolabel_prepare
|
||||
- name: '☑️ Checkout'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# #
|
||||
# [ Check Labels ] Check
|
||||
# Check if repo has labels currently added to issues
|
||||
# Labels › Assign › Job Information
|
||||
# #
|
||||
|
||||
- name: 🏷️ Checking Issues
|
||||
id: task_issues_nolabel_run
|
||||
- name: >-
|
||||
🔄 Load Job
|
||||
uses: qoomon/actions--context@v4
|
||||
id: 'context'
|
||||
|
||||
# #
|
||||
# Labels › Assign › Start
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
✅ Start
|
||||
run: |
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo " Starting Job ${{ steps.context.outputs.job_name }}"
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
|
||||
YEAR="$(date +'%Y')"
|
||||
echo "YEAR=${YEAR}" >> $GITHUB_ENV
|
||||
|
||||
NOW="$(date +'%m-%d-%Y %H:%M:%S')" # 02-25-2025 12:49:48
|
||||
echo "NOW=${NOW}" >> $GITHUB_ENV
|
||||
|
||||
NOW_SHORT="$(date +'%m-%d-%Y')" # 02-25-2025
|
||||
echo "NOW_SHORT=${NOW_SHORT}" >> $GITHUB_ENV
|
||||
|
||||
NOW_LONG="$(date +'%m-%d-%Y %H:%M')" # 02-25-2025 12:49
|
||||
echo "NOW_LONG=${NOW_LONG}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER="$(date +'%Y%m%d')" # 20250225
|
||||
echo "NOW_DOCKER=${NOW_DOCKER}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER_TS="$(date -u +'%FT%T.%3NZ')" # 2025-02-25T12:50:11.569Z
|
||||
echo "NOW_DOCKER_TS=${NOW_DOCKER_TS}" >> $GITHUB_ENV
|
||||
|
||||
SHA1="$(git rev-parse HEAD)" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1=${SHA1}" >> $GITHUB_ENV
|
||||
|
||||
SHA1_GH="$(echo ${GITHUB_SHA})" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1_GH=${SHA1_GH}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_1DIGIT="$(echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-1)" # 3.22 > 3
|
||||
echo "PKG_VER_1DIGIT=${PKG_VER_1DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_2DIGIT="$(echo ${{ env.IMAGE_VERSION }} | cut -f2 -d ":" | cut -c1-3)" # 3.22 > 3.2
|
||||
echo "PKG_VER_2DIGIT=${PKG_VER_2DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
sudo apt -qq update
|
||||
sudo apt -qq install tree
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
echo " Runner .............. ${{ runner.name }}"
|
||||
echo " Workflow ............ ${{ github.workflow }} (#${{ github.workflow_ref }})"
|
||||
echo " Run Number .......... ${{ github.run_number }}"
|
||||
echo " Ref ................. ${{ github.ref }}"
|
||||
echo " Ref Name ............ ${{ github.ref_name }}"
|
||||
echo " Event Name .......... ${{ github.event_name }}"
|
||||
echo " Repo ................ ${{ github.repository }}"
|
||||
echo " Repo Owner .......... ${{ github.repository_owner }}"
|
||||
echo " Run ID .............. https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
echo " Triggered By ........ ${{ github.actor }}"
|
||||
echo " SHA 1 (GITHUB_SHA) .. ${GITHUB_SHA}"
|
||||
echo " SHA 2 (github.sha) .. ${{ github.sha }}"
|
||||
echo " SHA 3 (env.SHA1) .... ${SHA1}"
|
||||
echo " SHA 4 (env.SHA1_GH) . ${SHA1_GH}"
|
||||
echo " Workspace ........... ${{ github.workspace }}"
|
||||
echo " PWD ................. ${PWD}"
|
||||
echo " Job Name ............ ${{ steps.context.outputs.job_name }}"
|
||||
echo " Job ID .............. ${{ steps.context.outputs.job_id }}"
|
||||
echo " Job URL ............. ${{ steps.context.outputs.job_url }}"
|
||||
echo " Run ID .............. ${{ steps.context.outputs.run_id }}"
|
||||
echo " Run Attempt ......... ${{ steps.context.outputs.run_attempt }}"
|
||||
echo " Run Number .......... ${{ steps.context.outputs.run_number }}"
|
||||
echo " Run URL ............. ${{ steps.context.outputs.run_url }}"
|
||||
echo " Run Env ............. ${{ steps.context.outputs.environment }}"
|
||||
echo " Run Env URL ......... ${{ steps.context.outputs.environment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Deployment URL .. ${{ steps.context.outputs.deployment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Runner Name ..... ${{ steps.context.outputs.runner_name }}"
|
||||
echo " Run Runner ID ....... ${{ steps.context.outputs.runner_id }}"
|
||||
echo " Year ................ ${YEAR}"
|
||||
echo " Now ................. ${NOW}"
|
||||
echo " Now (Short) ......... ${NOW_SHORT}"
|
||||
echo " Now (Long) .......... ${NOW_LONG}"
|
||||
echo " Now (Docker) ........ ${NOW_DOCKER}"
|
||||
echo " Now (Docker TS) ..... ${NOW_DOCKER_TS}"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
tree -I node_modules -I .git
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# #
|
||||
# Labels › Assign › Check
|
||||
#
|
||||
# Check if repo has labels to use
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🎫 Labels › Check
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.ADMINSERV_TOKEN_CL }}
|
||||
github-token: ${{ secrets.ADMINSERV_TOKEN_CL || github.token }}
|
||||
script: |
|
||||
|
||||
/*
|
||||
@@ -278,19 +503,18 @@ jobs:
|
||||
|
||||
const dateTimeformat = ( date ) =>
|
||||
{
|
||||
let month = date.getMonth( ) + 1;
|
||||
month = month.toString( ).padStart( 2, '0' );
|
||||
let day = date.getDate( ).toString( ).padStart( 2, '0' );
|
||||
let year = date.getFullYear( ).toString( ).padStart( 2, '0' );
|
||||
let month = date.getMonth( ) + 1;
|
||||
month = month.toString( ).padStart( 2, '0' );
|
||||
let day = date.getDate( ).toString( ).padStart( 2, '0' );
|
||||
let year = date.getFullYear( ).toString( ).padStart( 2, '0' );
|
||||
|
||||
let hours = date.getHours();
|
||||
let minutes = date.getMinutes();
|
||||
let x = hours >= 12 ? 'PM' : 'AM';
|
||||
hours = hours % 12;
|
||||
hours = hours ? hours : 12;
|
||||
minutes = minutes.toString( ).padStart( 2, '0' );
|
||||
|
||||
let mergeTime = month + '.' + day + '.' + year + ' ' + hours + ':' + minutes + ' ' + x;
|
||||
let hours = date.getHours();
|
||||
let minutes = date.getMinutes();
|
||||
let x = hours >= 12 ? 'PM' : 'AM';
|
||||
hours = hours % 12;
|
||||
hours = hours ? hours : 12;
|
||||
minutes = minutes.toString( ).padStart( 2, '0' );
|
||||
let mergeTime = month + '.' + day + '.' + year + ' ' + hours + ':' + minutes + ' ' + x;
|
||||
|
||||
return mergeTime;
|
||||
}
|
||||
@@ -315,7 +539,7 @@ jobs:
|
||||
let date_UpdateHuman = dateTimeformat( date_UpdateDate ) + " UTC"; // 03.26.2024 4:40 PM UTC
|
||||
const time_UpdateMs = new Date( issue.updated_at ).getTime( ); // 1711471241000
|
||||
|
||||
//if ( curtime < time_UpdateMs + expireAfterMs ) continue;
|
||||
// if ( curtime < time_UpdateMs + expireAfterMs ) continue;
|
||||
|
||||
/*
|
||||
Anything past this point is stale / to be closed
|
||||
@@ -336,8 +560,8 @@ jobs:
|
||||
let iss_body = `${ issue.body }`;
|
||||
const iss_body_lc = iss_body.toLowerCase( );
|
||||
|
||||
console.log( ` └── 📁 ` + iss_title );
|
||||
console.log( ` └── 📄 Issue #${ issue.number } last updated on ${ date_UpdateHuman }` );
|
||||
console.log( ` └── 📁 ` + iss_title + ` #${ issue.number }`);
|
||||
console.log( ` └── 📄 last updated on ${ date_UpdateHuman }` );
|
||||
console.log( ` └── 📄 ${add_labels}` );
|
||||
console.log( `\n\n` )
|
||||
|
||||
@@ -345,8 +569,8 @@ jobs:
|
||||
Keywords
|
||||
*/
|
||||
|
||||
const bug_words = [ "bug", "broke", "issue", "fail" ];
|
||||
const feat_words = [ "feature", "request", "add support" ];
|
||||
const bug_words = [ "bug", "broke", "issue", "fail", "wont work" ];
|
||||
const feat_words = [ "feature", "request", "add", "addition", "enhance", "create" ];
|
||||
const urgn_words = [ "urgent", "urgency", "emergency", "important", "critical" ];
|
||||
const road_words = [ "roadmap", "road map", "planned" ];
|
||||
|
||||
@@ -365,17 +589,14 @@ jobs:
|
||||
|
||||
/*
|
||||
Label > Bugs
|
||||
*/
|
||||
|
||||
const bug_bIncWordT = bug_words.some( s => s.includes( iss_title_lc ) || iss_title_lc.includes( s ) );
|
||||
|
||||
/*
|
||||
Find regex based phrases
|
||||
|
||||
Regex:
|
||||
https://regex101.com/r/Z99Gnq/2
|
||||
*/
|
||||
|
||||
const bug_bIncWordT = bug_words.some( s => s.includes( iss_title_lc ) || iss_title_lc.includes( s ) );
|
||||
const bug_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 bug_bFoundMatchTitle = Boolean( bug_findWordList.test( iss_title ) );
|
||||
const bug_bFoundMatchBody = Boolean( bug_findWordList.test( iss_body ) );
|
||||
@@ -403,16 +624,49 @@ jobs:
|
||||
if ( author === `${{ env.BOT_NAME_DEPENDABOT }}` )
|
||||
core.info( `Skipping: Detected ${ author }` )
|
||||
|
||||
// Rename title to contain Bug:
|
||||
if ( author === `${{ env.BOT_NAME_RENOVATE }}` )
|
||||
core.info( `Skipping: Detected ${ author }` )
|
||||
|
||||
/*
|
||||
Rename title to contain Bug:
|
||||
if bug title or body contains keyword hinting at the issue being about a bug; change the title of the issue
|
||||
|
||||
@ref https://jsfiddle.net/aetherinox/wj17x8mp/2/
|
||||
*/
|
||||
|
||||
if ( 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( ) ) )
|
||||
{
|
||||
const title = issue.title;
|
||||
|
||||
/*
|
||||
If a user creates an issue starting with our tag; strip it and add ours with the emoji instead
|
||||
original: Bug: CMD windows opens then closes, can't run the script.
|
||||
new: 🐛 Bug: CMD windows opens then closes, can't run the script.
|
||||
*/
|
||||
|
||||
const removeBeginning1 = bug_tag.substring(3); // "Bug:"
|
||||
let removeBeginning2 = bug_tag.substring(0); // "🐛 Bug:"
|
||||
removeBeginning2 = removeBeginning2.replace(/\s/g, '') // "Bug:"
|
||||
|
||||
if ( iss_title.startsWith(removeBeginning1) )
|
||||
{
|
||||
iss_title = iss_title.slice(removeBeginning1.length);
|
||||
iss_title = iss_title.trim();
|
||||
}
|
||||
else if ( iss_title.startsWith(removeBeginning2) )
|
||||
{
|
||||
iss_title = iss_title.slice(removeBeginning2.length);
|
||||
iss_title = iss_title.trim();
|
||||
}
|
||||
|
||||
const title = iss_title;
|
||||
let title_new = title.replace( /^\s?bug\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?fail\s*(.*?)\b/gi, '' );
|
||||
title_new = title.replace( /^\s?issue\s*(.*?)\b/gi, '' );
|
||||
iss_title = `${ bug_tag } ${ title_new }`;
|
||||
}
|
||||
|
||||
console.log( `New Title: ...................... ${ iss_title }` )
|
||||
|
||||
await github.rest.issues.update(
|
||||
{
|
||||
owner: context.repo.owner, repo: context.repo.repo, issue_number: issue.number,
|
||||
@@ -433,7 +687,7 @@ jobs:
|
||||
https://regex101.com/r/fR1Hm6/1
|
||||
*/
|
||||
|
||||
const feat_findWordList = /^(?:(?:request|include|see)\s*(?:an?|the?)\s*(?:feature|addon|addition|plugin))|(?:(?:add|see|get)\s*support\s*(?:for|with|of))|(?:can\s*we\s*get\s*(?:the|a)\s*(?:ability|feature))|(?:💡 Feature:)$/igm;
|
||||
const feat_findWordList = /(?:(?:add|enjoy|would|like|can|request|include|see|could|have)\s*?(?:the|liked?|i|we|an?|the|you?)\s*?(?:to|have|an|get|ability|request|add|feature|functionality|addon|addition|plugin|create))|(?:(?:add|see|get)\s*?support\s*?(?:for|with|of))|(?:can\s*we\s*get\s*?(?:the|a)\s*?(?:ability|feature))|(?:💡 Feature:)$/igm;
|
||||
const feat_bFoundMatchTitle = Boolean( feat_findWordList.test( iss_title ) );
|
||||
const feat_bFoundMatchBody = Boolean( feat_findWordList.test( iss_body ) );
|
||||
|
||||
@@ -460,17 +714,49 @@ jobs:
|
||||
if ( author === `${{ env.BOT_NAME_DEPENDABOT }}` )
|
||||
core.info( `Skipping: Detected ${ author }` )
|
||||
|
||||
// Rename title to contain Feature:
|
||||
if ( author === `${{ env.BOT_NAME_RENOVATE }}` )
|
||||
core.info( `Skipping: Detected ${ author }` )
|
||||
|
||||
/*
|
||||
Rename title to contain Feature:
|
||||
if feature title or body contains keyword hinting at the issue being about a feature; change the title of the issue
|
||||
|
||||
@ref https://jsfiddle.net/aetherinox/wj17x8mp/2/
|
||||
*/
|
||||
if ( 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( ) ) )
|
||||
{
|
||||
const title = issue.title;
|
||||
|
||||
/*
|
||||
If a user creates an issue starting with our tag; strip it and add ours with the emoji instead
|
||||
original: Feature: CMD windows opens then closes, can't run the script.
|
||||
new: 💡 Feature: CMD windows opens then closes, can't run the script.
|
||||
*/
|
||||
|
||||
const removeBeginning1 = feat_tag.substring(3); // "Feature:"
|
||||
let removeBeginning2 = feat_tag.substring(0); // "💡 Feature:"
|
||||
removeBeginning2 = removeBeginning2.replace(/\s/g, '') // "Feature:"
|
||||
|
||||
if ( iss_title.startsWith(removeBeginning1) )
|
||||
{
|
||||
iss_title = iss_title.slice(removeBeginning1.length);
|
||||
iss_title = iss_title.trim();
|
||||
}
|
||||
else if ( iss_title.startsWith(removeBeginning2) )
|
||||
{
|
||||
iss_title = iss_title.slice(removeBeginning2.length);
|
||||
iss_title = iss_title.trim();
|
||||
}
|
||||
|
||||
const title = iss_title;
|
||||
let title_new = title.replace( /^\s?feature\s*(.*?)\b/gi, '' );
|
||||
title_new = title.replace( /^\s?request\s*(.*?)\b/gi, '' );
|
||||
title_new = title.replace( /^\s?add(.*?)\s?feature\s*(.*?)\b/gi, '' );
|
||||
title_new = title.replace( /^\s?add(.*?)\s?support\s*(.*?)\b/gi, '' );
|
||||
iss_title = `${ feat_tag } ${ title_new }`;
|
||||
iss_title = `${ feat_tag } ${ title_new }`; // change TAG per category
|
||||
}
|
||||
|
||||
console.log( `New Title: ...................... ${ iss_title }` )
|
||||
|
||||
await github.rest.issues.update(
|
||||
{
|
||||
owner: context.repo.owner, repo: context.repo.repo, issue_number: issue.number,
|
||||
@@ -518,10 +804,40 @@ jobs:
|
||||
if ( author === `${{ env.BOT_NAME_DEPENDABOT }}` )
|
||||
core.info( `Skipping: Detected ${ author }` )
|
||||
|
||||
// Rename title to contain Urgent:
|
||||
if ( author === `${{ env.BOT_NAME_RENOVATE }}` )
|
||||
core.info( `Skipping: Detected ${ author }` )
|
||||
|
||||
/*
|
||||
Rename title to contain Urgent:
|
||||
if urgent title or body contains keyword hinting at the issue being about urgent; change the title of the issue
|
||||
|
||||
@ref https://jsfiddle.net/aetherinox/wj17x8mp/2/
|
||||
*/
|
||||
if ( 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( ) ) )
|
||||
{
|
||||
const title = issue.title;
|
||||
|
||||
/*
|
||||
If a user creates an issue starting with our tag; strip it and add ours with the emoji instead
|
||||
original: Urgent: CMD windows opens then closes, can't run the script.
|
||||
new: ⚠ Urgent: CMD windows opens then closes, can't run the script.
|
||||
*/
|
||||
|
||||
const removeBeginning1 = urgn_tag.substring(3); // "Urgent:"
|
||||
let removeBeginning2 = urgn_tag.substring(0); // "⚠ Urgent:"
|
||||
removeBeginning2 = removeBeginning2.replace(/\s/g, '') // "Urgent:"
|
||||
|
||||
if ( iss_title.startsWith(removeBeginning1) )
|
||||
{
|
||||
iss_title = iss_title.slice(removeBeginning1.length);
|
||||
iss_title = iss_title.trim();
|
||||
}
|
||||
else if ( iss_title.startsWith(removeBeginning2) )
|
||||
{
|
||||
iss_title = iss_title.slice(removeBeginning2.length);
|
||||
iss_title = iss_title.trim();
|
||||
}
|
||||
|
||||
const title = iss_title;
|
||||
let title_new = title.replace( /^\s?emergency\s*(.*?)\b/gi, '' );
|
||||
title_new = title.replace( /^\s?urgent\s*(.*?)\b/gi, '' );
|
||||
title_new = title.replace( /^\s?urgency\s*(.*?)\b/gi, '' );
|
||||
@@ -530,6 +846,8 @@ jobs:
|
||||
iss_title = `${ urgn_tag } ${ title_new }`;
|
||||
}
|
||||
|
||||
console.log( `New Title: ...................... ${ iss_title }` )
|
||||
|
||||
await github.rest.issues.update(
|
||||
{
|
||||
owner: context.repo.owner, repo: context.repo.repo, issue_number: issue.number,
|
||||
@@ -552,8 +870,8 @@ jobs:
|
||||
*/
|
||||
|
||||
const road_findWordList = /#\s*Summary[\S\s]+#\s*(?:Proposal|Objective)[^\]]+/igm;
|
||||
const road_bFoundMatchTitle = Boolean( road_findWordList.test( iss_title ) );
|
||||
const road_bFoundMatchBody = Boolean( road_findWordList.test( iss_body ) );
|
||||
const road_bFoundMatchTitle = Boolean( road_findWordList.test( iss_title ) );
|
||||
const road_bFoundMatchBody = Boolean( road_findWordList.test( iss_body ) );
|
||||
|
||||
/*
|
||||
Do not change a title if the item starts with a PR: #
|
||||
@@ -562,8 +880,8 @@ jobs:
|
||||
https://regex101.com/r/JOrqbN/1
|
||||
*/
|
||||
|
||||
const road_findPRTitle = /^PR\s?#?(?:[0-9]*:)/igm;
|
||||
const road_bFoundPRTitle = Boolean( road_findPRTitle.test( iss_title ) );
|
||||
const road_findPRTitle = /^PR\s?#?(?:[0-9]*:)/igm;
|
||||
const road_bFoundPRTitle = Boolean( road_findPRTitle.test( iss_title ) );
|
||||
|
||||
/*
|
||||
- Check if issue title matches the issue label "Roadmap:"
|
||||
@@ -578,18 +896,48 @@ jobs:
|
||||
if ( author === `${{ env.BOT_NAME_DEPENDABOT }}` )
|
||||
core.info( `Skipping: Detected ${ author }` )
|
||||
|
||||
// Rename title to contain Roadmap:
|
||||
if ( author === `${{ env.BOT_NAME_RENOVATE }}` )
|
||||
core.info( `Skipping: Detected ${ author }` )
|
||||
|
||||
/*
|
||||
Rename title to contain Roadmap:
|
||||
if roadmap title or body contains keyword hinting at the issue being about roadmap; change the title of the issue
|
||||
|
||||
@ref https://jsfiddle.net/aetherinox/wj17x8mp/2/
|
||||
*/
|
||||
if ( 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( ) ) )
|
||||
{
|
||||
const title = issue.title;
|
||||
let title_new = title.replace( /^\s?emergency\s*(.*?)\b/gi, '' );
|
||||
title_new = title.replace( /^\s?urgent\s*(.*?)\b/gi, '' );
|
||||
title_new = title.replace( /^\s?urgency\s*(.*?)\b/gi, '' );
|
||||
title_new = title.replace( /^\s?important\s*(.*?)\b/gi, '' );
|
||||
title_new = title.replace( /^\s?critical\s*(.*?)\b/gi, '' );
|
||||
iss_title = `${ road_tag } ${ title_new }`;
|
||||
|
||||
/*
|
||||
If a user creates an issue starting with our tag; strip it and add ours with the emoji instead
|
||||
original: Roadmap: CMD windows opens then closes, can't run the script.
|
||||
new: 🗺️ Roadmap: CMD windows opens then closes, can't run the script.
|
||||
*/
|
||||
|
||||
const removeBeginning1 = road_tag.substring(3); // "Roadmap:"
|
||||
let removeBeginning2 = road_tag.substring(0); // "🗺️ Roadmap:"
|
||||
removeBeginning2 = removeBeginning2.replace(/\s/g, '') // "Roadmap:"
|
||||
|
||||
if ( iss_title.startsWith(removeBeginning1) )
|
||||
{
|
||||
iss_title = iss_title.slice(removeBeginning1.length);
|
||||
iss_title = iss_title.trim();
|
||||
}
|
||||
else if ( iss_title.startsWith(removeBeginning2) )
|
||||
{
|
||||
iss_title = iss_title.slice(removeBeginning2.length);
|
||||
iss_title = iss_title.trim();
|
||||
}
|
||||
|
||||
const title = iss_title;
|
||||
let title_new = title.replace( /^\s?broad(.*?)\s?map\s*(.*?)\b/gi, '' );
|
||||
title_new = title.replace( /^\s?planned\s*(.*?)\b/gi, '' );
|
||||
title_new = title.replace( /^\s?broadmap\s*(.*?)\b/gi, '' );
|
||||
iss_title = `${ road_tag } ${ title_new }`; // change TAG per category
|
||||
}
|
||||
|
||||
console.log( `New Title: ...................... ${ iss_title }` )
|
||||
|
||||
await github.rest.issues.update(
|
||||
{
|
||||
owner: context.repo.owner, repo: context.repo.repo, issue_number: issue.number,
|
||||
@@ -607,14 +955,15 @@ jobs:
|
||||
}
|
||||
|
||||
# #
|
||||
# Job [ Stale Issues ]
|
||||
# Issues (Stale) › Stale
|
||||
# #
|
||||
|
||||
job-issues-stale:
|
||||
name: >-
|
||||
💤 Check › Stale
|
||||
💤 Scan › Check Stale
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 4
|
||||
# runs-on: apollo-x64
|
||||
timeout-minutes: 5
|
||||
needs:
|
||||
- job-labels-create
|
||||
- job-issues-nolabel
|
||||
@@ -625,56 +974,57 @@ jobs:
|
||||
steps:
|
||||
|
||||
# #
|
||||
# [ Stale Issues ] Check Condition
|
||||
# Labels › Stale › Check
|
||||
# #
|
||||
|
||||
- name: "💤 Stale › Check Condition"
|
||||
uses: actions/stale@v9
|
||||
id: task_issues_stale_run
|
||||
with:
|
||||
repo-token: ${{ secrets.ADMINSERV_TOKEN_CL }}
|
||||
stale-issue-message: |
|
||||
⚠️ It looks like there hasn't been any recent updates on this issue. If you created this issue and no longer consider it open, then please login to github and close the issue.
|
||||
- name: >-
|
||||
💤 Stale › Check Condition
|
||||
uses: actions/stale@v9
|
||||
with:
|
||||
repo-token: ${{ secrets.ADMINSERV_TOKEN_CL || github.token }}
|
||||
stale-issue-message: |
|
||||
⚠️ It looks like there hasn't been any recent updates on this issue. If you created this issue and no longer consider it open, then please login to github and close the issue.
|
||||
|
||||
If there is no further activity on this issue, it will be automatically closed in the next week.
|
||||
If there is no further activity on this issue, it will be automatically closed in the next week.
|
||||
|
||||
---
|
||||
---
|
||||
|
||||
<sub>I am a bot reaching out to you with an automated response.</sub>
|
||||
stale-issue-label: 'Status 𐄂 Stale'
|
||||
close-issue-label: 'Status 𐄂 Autoclosed'
|
||||
exempt-issue-labels: 'Status 𐄂 Accepted,Status 𐄂 Review,Status 𐄂 Pending,Type ◦ Bug,Type ◦ Dependency,Type ◦ Docs,Type ◦ Feature,Type ◦ Git Action,Type ◦ Pull Request,Type ◦ Roadmap'
|
||||
days-before-stale: 60
|
||||
days-before-close: 7
|
||||
days-before-pr-stale: -1
|
||||
days-before-pr-close: -1
|
||||
<sub>I am a bot reaching out to you with an automated response.</sub>
|
||||
stale-issue-label: '${{ env.LABEL_STALE }}'
|
||||
close-issue-label: '${{ env.LABEL_AUTOCLOSE }}'
|
||||
exempt-issue-labels: '${{ env.LABEL_ACCEPTED }},${{ env.LABEL_REVIEW }},${{ env.LABEL_PENDING }},${{ env.LABEL_BUG }},${{ env.LABEL_DEPENDENCY }},${{ env.LABEL_DOCS }},${{ env.LABEL_FEATURE }},${{ env.LABEL_GIT }},${{ env.LABEL_PR }},${{ env.LABEL_ROADMAP }}'
|
||||
days-before-stale: 120
|
||||
days-before-close: 7
|
||||
days-before-pr-stale: -1
|
||||
days-before-pr-close: -1
|
||||
|
||||
# #
|
||||
# Job [ Lock Issues ]
|
||||
# Issues (Stale) › Lock
|
||||
# #
|
||||
|
||||
job-issues-lock:
|
||||
name: >-
|
||||
🔒 Check › Inactive
|
||||
🔒 Scan › Lock Inactive
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 4
|
||||
# runs-on: apollo-x64
|
||||
timeout-minutes: 5
|
||||
needs:
|
||||
- job-labels-create
|
||||
- job-issues-nolabel
|
||||
steps:
|
||||
|
||||
# #
|
||||
# [ Lock Issues ] Look for inactives
|
||||
# Labels › Inactive › Lock
|
||||
# #
|
||||
|
||||
- name: "🔒 Lock › Inactives"
|
||||
- name: >-
|
||||
🔒 Inactive › Lock
|
||||
uses: dessant/lock-threads@v5
|
||||
id: task_issues_lock_run
|
||||
with:
|
||||
github-token: ${{ secrets.ADMINSERV_TOKEN_CL }}
|
||||
exclude-any-issue-labels: 'AC › Review Required,Status 𐄂 Accepted,Status 𐄂 Review,Status 𐄂 Pending,Type ◦ Bug,Type ◦ Dependency,Type ◦ Docs,Type ◦ Feature,Type ◦ Git Action,Type ◦ Roadmap,Type ◦ Internal'
|
||||
add-issue-labels: 'Status 𐄂 Locked'
|
||||
issue-inactive-days: '60'
|
||||
github-token: ${{ secrets.ADMINSERV_TOKEN_CL || github.token }}
|
||||
exclude-any-issue-labels: '${{ env.LABEL_AC_REVIEW }},${{ env.LABEL_ACCEPTED }},${{ env.LABEL_REVIEW }},${{ env.LABEL_PENDING }},${{ env.LABEL_BUG }},${{ env.LABEL_DEPENDENCY }},${{ env.LABEL_DOCS }},${{ env.LABEL_FEATURE }},${{ env.LABEL_GIT }},${{ env.LABEL_ROADMAP }},${{ env.LABEL_INTERNAL }}'
|
||||
add-issue-labels: '${{ env.LABEL_LOCKED }}'
|
||||
issue-inactive-days: '120'
|
||||
issue-lock-reason: 'resolved'
|
||||
issue-comment: >
|
||||
⚠️ This **issue** has been automatically locked since there has not been any recent activity after it was closed.
|
||||
@@ -684,8 +1034,8 @@ jobs:
|
||||
---
|
||||
|
||||
<sub>I am a bot reaching out to you with an automated response.</sub>
|
||||
exclude-any-pr-labels: 'AC › Review Required,Status 𐄂 Accepted,Status 𐄂 Review,Status 𐄂 Pending,Type ◦ Bug,Type ◦ Dependency,Type ◦ Docs,Type ◦ Feature,Type ◦ Git Action,Type ◦ Roadmap,Type ◦ Internal'
|
||||
add-pr-labels: 'Status 𐄂 Locked'
|
||||
exclude-any-pr-labels: '${{ env.LABEL_AC_REVIEW }},${{ env.LABEL_ACCEPTED }},${{ env.LABEL_REVIEW }},${{ env.LABEL_PENDING }},${{ env.LABEL_BUG }},${{ env.LABEL_DEPENDENCY }},${{ env.LABEL_DOCS }},${{ env.LABEL_FEATURE }},${{ env.LABEL_GIT }},${{ env.LABEL_ROADMAP }},${{ env.LABEL_INTERNAL }}'
|
||||
add-pr-labels: '${{ env.LABEL_LOCKED }}'
|
||||
pr-inactive-days: '365'
|
||||
pr-lock-reason: 'resolved'
|
||||
pr-comment: >
|
||||
|
||||
322
.github/workflows/labels-clean.yml
vendored
322
.github/workflows/labels-clean.yml
vendored
@@ -13,15 +13,20 @@
|
||||
# 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
|
||||
# secrets.CODECOV_TOKEN codecov upload token for nodejs projects
|
||||
# secrets.MAXMIND_GELITE_TOKEN maxmind API token
|
||||
# secrets.CF_ACCOUNT_ID cloudflare account id
|
||||
# secrets.CF_ACCOUNT_TOKEN cloudflare account token
|
||||
# secrets.ORG_TOKEN org github personal access token (fine-grained)
|
||||
# secrets.ORG_TOKEN_CL org github personal access token (classic)
|
||||
# secrets.ORG_DOCKERHUB_TOKEN org dockerhub secret
|
||||
# secrets.ORG_GITEA_TOKEN org gitea personal access token (classic) with package:write permission
|
||||
# secrets.BOT_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
|
||||
# secrets.BOT_GPG_KEY_B64 bot gpg private key (binary) converted to base64
|
||||
# secrets.BOT_GPG_PASSPHRASE bot gpg private key passphrase
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_RELEASES discord webhook to report release notifications from github to discord
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_WORKFLOWS discord webhook to report workflow notifications from github to discord
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_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
|
||||
@@ -33,8 +38,8 @@
|
||||
# act -W .github/workflows/labels-clean.yml -s TOKEN_CL=XXXXXXXXXX --pull=false
|
||||
# #
|
||||
|
||||
name: "🎫 Labels › Remove"
|
||||
run-name: "🎫 Labels › Remove"
|
||||
name: '🧹 Labels › Clean'
|
||||
run-name: '🧹 Labels › Clean'
|
||||
|
||||
# #
|
||||
# triggers
|
||||
@@ -65,40 +70,41 @@ env:
|
||||
{ "name": "invalid", "color": "8F1784", "description": "Default github label" },
|
||||
{ "name": "question", "color": "8F1784", "description": "Default github label" },
|
||||
{ "name": "wontfix", "color": "8F1784", "description": "Default github label" },
|
||||
{ "name": "AC › Changes Made", "color": "8F1784", "description": "Requested changes have been made and are pending a re-scan" },
|
||||
{ "name": "AC › Changes Required", "color": "8F1784", "description": "Requires changes to be made to the package before being accepted" },
|
||||
{ "name": "AC › Failed", "color": "a61f2d", "description": "Autocheck failed to run through a complete cycle, requires investigation" },
|
||||
{ "name": "AC › Needs Rebase", "color": "8F1784", "description": "Due to the permissions on the requesting repo, this pull request must be rebased by the author" },
|
||||
{ "name": "AC › Passed", "color": "146b4a", "description": "Ready to be reviewed" },
|
||||
{ "name": "AC › Review Required", "color": "8F1784", "description": "PR needs to be reviewed by another person, after the requested changes have been made" },
|
||||
{ "name": "AC › Security Warning", "color": "761620", "description": "Does not conform to developer policies, or includes potentially dangerous code" },
|
||||
{ "name": "AC › Skipped Scan", "color": "8F1784", "description": "Author has skipped code scan" },
|
||||
{ "name": "Status 𐄂 Duplicate", "color": "75536b", "description": "Issue or pull request already exists" },
|
||||
{ "name": "Status 𐄂 Accepted", "color": "2e7539", "description": "This pull request has been accepted" },
|
||||
{ "name": "Status 𐄂 Autoclosed", "color": "3E0915", "description": "Originally stale and was autoclosed for no activity" },
|
||||
{ "name": "Status 𐄂 Denied", "color": "ba4058", "description": "Pull request has been denied" },
|
||||
{ "name": "Status 𐄂 Locked", "color": "550F45", "description": "Automatically locked by AdminServ for a prolonged period of inactivity" },
|
||||
{ "name": "Status 𐄂 Need Info", "color": "2E3C4C", "description": "Not enough information to resolve" },
|
||||
{ "name": "Status 𐄂 No Action", "color": "030406", "description": "Closed without any action being taken" },
|
||||
{ "name": "Status 𐄂 Pending", "color": "984b12", "description": "Pending pull request" },
|
||||
{ "name": "Status 𐄂 Released", "color": "1b6626", "description": "Issues or PR has been implemented and is now live" },
|
||||
{ "name": "Status 𐄂 Reopened", "color": "8a6f14", "description": "A previously closed PR which has been re-opened" },
|
||||
{ "name": "Status 𐄂 Review", "color": "9e1451", "description": "Currently pending review" },
|
||||
{ "name": "Status 𐄂 Stale", "color": "928282", "description": "Has not had any activity in over 30 days" },
|
||||
{ "name": "Type ◦ Bug", "color": "9a2c2c", "description": "Something isn't working" },
|
||||
{ "name": "Type ◦ Dependency", "color": "243759", "description": "Item is associated to dependency" },
|
||||
{ "name": "Type ◦ Docs", "color": "0e588d", "description": "Improvements or modifications to docs" },
|
||||
{ "name": "Type ◦ Feature", "color": "3c4e93", "description": "Feature request" },
|
||||
{ "name": "Type ◦ Git Action", "color": "030406", "description": "GitHub Action / workflow" },
|
||||
{ "name": "Type ◦ Pull Request", "color": "8F1784", "description": "Normal pull request" },
|
||||
{ "name": "Type ◦ Roadmap", "color": "8F1784", "description": "Feature or bug currently planned for implementation" },
|
||||
{ "name": "Type ◦ Internal", "color": "A51994", "description": "Assigned items are for internal developer use" },
|
||||
{ "name": "Build ◦ Desktop", "color": "c7ca4a", "description": "Specific to desktop" },
|
||||
{ "name": "Build ◦ Linux", "color": "c7ca4a", "description": "Specific to Linux" },
|
||||
{ "name": "Build ◦ MacOS", "color": "c7ca4a", "description": "Specific to MacOS" },
|
||||
{ "name": "Build ◦ Mobile", "color": "c7ca4a", "description": "Specific to mobile" },
|
||||
{ "name": "Build ◦ Web", "color": "c7ca4a", "description": "Specific to web" },
|
||||
{ "name": "Build ◦ Windows", "color": "c7ca4a", "description": "Specific to Windows" },
|
||||
{ "name": "AC › Changes Made", "color": "8F1784", "description": "Requested changes have been made and are pending a re-scan" },
|
||||
{ "name": "AC › Changes Required", "color": "8F1784", "description": "Requires changes to be made to the package before being accepted" },
|
||||
{ "name": "AC › Failed", "color": "a61f2d", "description": "Autocheck failed to run through a complete cycle, requires investigation" },
|
||||
{ "name": "AC › Needs Rebase", "color": "8F1784", "description": "Due to the permissions on the requesting repo, this pull request must be rebased by the author" },
|
||||
{ "name": "AC › Passed", "color": "146b4a", "description": "Ready to be reviewed" },
|
||||
{ "name": "AC › Review Required", "color": "8F1784", "description": "PR needs to be reviewed by another person, after the requested changes have been made" },
|
||||
{ "name": "AC › Security Warning", "color": "761620", "description": "Does not conform to developer policies, or includes potentially dangerous code" },
|
||||
{ "name": "AC › Skipped Scan", "color": "8F1784", "description": "Author has skipped code scan" },
|
||||
{ "name": "Status › Duplicate", "color": "75536b", "description": "Issue or pull request already exists" },
|
||||
{ "name": "Status › Accepted", "color": "2e7539", "description": "This pull request has been accepted" },
|
||||
{ "name": "Status › Autoclosed", "color": "3E0915", "description": "Originally stale and was autoclosed for no activity" },
|
||||
{ "name": "Status › Denied", "color": "ba4058", "description": "Pull request has been denied" },
|
||||
{ "name": "Status › Locked", "color": "550F45", "description": "Automatically locked by AdminServ for a prolonged period of inactivity" },
|
||||
{ "name": "Status › Need Info", "color": "2E3C4C", "description": "Not enough information to resolve" },
|
||||
{ "name": "Status › No Action", "color": "030406", "description": "Closed without any action being taken" },
|
||||
{ "name": "Status › Pending", "color": "984b12", "description": "Pending pull request" },
|
||||
{ "name": "Status › Released", "color": "1b6626", "description": "Issues or PR has been implemented and is now live" },
|
||||
{ "name": "Status › Reopened", "color": "8a6f14", "description": "A previously closed PR which has been re-opened" },
|
||||
{ "name": "Status › Review", "color": "9e1451", "description": "Currently pending review" },
|
||||
{ "name": "Status › Stale", "color": "928282", "description": "Has not had any activity in over 30 days" },
|
||||
{ "name": "Type › Bug", "color": "9a2c2c", "description": "Something isn't working" },
|
||||
{ "name": "Type › Dependency", "color": "243759", "description": "Item is associated to dependency" },
|
||||
{ "name": "Type › Lock Maintenance", "color": "FBCA04", "description": "Sync package-lock.json" },
|
||||
{ "name": "Type › Docs", "color": "0e588d", "description": "Improvements or modifications to docs" },
|
||||
{ "name": "Type › Feature", "color": "3c4e93", "description": "Feature request" },
|
||||
{ "name": "Type › Git Action", "color": "030406", "description": "GitHub Action / workflow" },
|
||||
{ "name": "Type › Pull Request", "color": "8F1784", "description": "Normal pull request" },
|
||||
{ "name": "Type › Roadmap", "color": "8F1784", "description": "Feature or bug currently planned for implementation" },
|
||||
{ "name": "Type › Internal", "color": "A51994", "description": "Assigned items are for internal developer use" },
|
||||
{ "name": "Build › Desktop", "color": "c7ca4a", "description": "Specific to desktop" },
|
||||
{ "name": "Build › Linux", "color": "c7ca4a", "description": "Specific to Linux" },
|
||||
{ "name": "Build › MacOS", "color": "c7ca4a", "description": "Specific to MacOS" },
|
||||
{ "name": "Build › Mobile", "color": "c7ca4a", "description": "Specific to mobile" },
|
||||
{ "name": "Build › Web", "color": "c7ca4a", "description": "Specific to web" },
|
||||
{ "name": "Build › Windows", "color": "c7ca4a", "description": "Specific to Windows" },
|
||||
{ "name": "› API", "color": "F99B50", "description": "Plugin API, CLI, browser JS API" },
|
||||
{ "name": "› Auto-type", "color": "9141E0", "description": "Auto-type functionality in desktop apps" },
|
||||
{ "name": "› Browser", "color": "9141E0", "description": "Browser plugins and passing data to <=> from app" },
|
||||
@@ -137,12 +143,12 @@ jobs:
|
||||
# This job removes all existing labels
|
||||
# #
|
||||
|
||||
issues-labels-remove:
|
||||
issues-labels-clean:
|
||||
name: >-
|
||||
🎫 Labels › Remove
|
||||
# runs-on: ubuntu-latest
|
||||
runs-on: apollo-x64
|
||||
timeout-minutes: 4
|
||||
🧹 Labels › Clean
|
||||
runs-on: ubuntu-latest
|
||||
# runs-on: apollo-x64
|
||||
timeout-minutes: 3
|
||||
permissions:
|
||||
contents: 'read'
|
||||
id-token: 'write'
|
||||
@@ -150,49 +156,132 @@ jobs:
|
||||
steps:
|
||||
|
||||
# #
|
||||
# Labels › Start
|
||||
# Labels › Clean › Checkout
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
✅ Start
|
||||
id: task_label_remove_start
|
||||
run: |
|
||||
echo "Starting workflow"
|
||||
|
||||
# #
|
||||
# Labels › Set Env Variables
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🕛 Get Timestamp
|
||||
id: task_label_set_timestamp
|
||||
run: |
|
||||
echo "NOW=$(date +'%m-%d-%Y %H:%M:%S')" >> $GITHUB_ENV
|
||||
echo "NOW_SHORT=$(date +'%m-%d-%Y')" >> $GITHUB_ENV
|
||||
echo "NOW_LONG=$(date +'%m-%d-%Y %H:%M')" >> $GITHUB_ENV
|
||||
echo "NOW_DOCKER_LABEL=$(date +'%Y%m%d')" >> $GITHUB_ENV
|
||||
|
||||
# #
|
||||
# Labels › Checkout
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
☑️ Checkout
|
||||
id: task_label_remove_checkout
|
||||
- name: '☑️ Checkout'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# #
|
||||
# Labels › Start
|
||||
# Labels › Clean › Job Information
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🔄 Load Job
|
||||
uses: qoomon/actions--context@v4
|
||||
id: 'context'
|
||||
|
||||
# #
|
||||
# Labels › Clean › Start
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
✅ Start
|
||||
run: |
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo " Starting Job ${{ steps.context.outputs.job_name }}"
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
|
||||
YEAR="$(date +'%Y')"
|
||||
echo "YEAR=${YEAR}" >> $GITHUB_ENV
|
||||
|
||||
NOW="$(date +'%m-%d-%Y %H:%M:%S')" # 02-25-2025 12:49:48
|
||||
echo "NOW=${NOW}" >> $GITHUB_ENV
|
||||
|
||||
NOW_SHORT="$(date +'%m-%d-%Y')" # 02-25-2025
|
||||
echo "NOW_SHORT=${NOW_SHORT}" >> $GITHUB_ENV
|
||||
|
||||
NOW_LONG="$(date +'%m-%d-%Y %H:%M')" # 02-25-2025 12:49
|
||||
echo "NOW_LONG=${NOW_LONG}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER="$(date +'%Y%m%d')" # 20250225
|
||||
echo "NOW_DOCKER=${NOW_DOCKER}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER_TS="$(date -u +'%FT%T.%3NZ')" # 2025-02-25T12:50:11.569Z
|
||||
echo "NOW_DOCKER_TS=${NOW_DOCKER_TS}" >> $GITHUB_ENV
|
||||
|
||||
SHA1="$(git rev-parse HEAD)" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1=${SHA1}" >> $GITHUB_ENV
|
||||
|
||||
SHA1_GH="$(echo ${GITHUB_SHA})" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1_GH=${SHA1_GH}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_1DIGIT="$(echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-1)" # 3.22 > 3
|
||||
echo "PKG_VER_1DIGIT=${PKG_VER_1DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_2DIGIT="$(echo ${{ env.IMAGE_VERSION }} | cut -f2 -d ":" | cut -c1-3)" # 3.22 > 3.2
|
||||
echo "PKG_VER_2DIGIT=${PKG_VER_2DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
sudo apt -qq update
|
||||
sudo apt -qq install tree
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
echo " Runner .............. ${{ runner.name }}"
|
||||
echo " Workflow ............ ${{ github.workflow }} (#${{ github.workflow_ref }})"
|
||||
echo " Run Number .......... ${{ github.run_number }}"
|
||||
echo " Ref ................. ${{ github.ref }}"
|
||||
echo " Ref Name ............ ${{ github.ref_name }}"
|
||||
echo " Event Name .......... ${{ github.event_name }}"
|
||||
echo " Repo ................ ${{ github.repository }}"
|
||||
echo " Repo Owner .......... ${{ github.repository_owner }}"
|
||||
echo " Run ID .............. https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
echo " Triggered By ........ ${{ github.actor }}"
|
||||
echo " SHA 1 (GITHUB_SHA) .. ${GITHUB_SHA}"
|
||||
echo " SHA 2 (github.sha) .. ${{ github.sha }}"
|
||||
echo " SHA 3 (env.SHA1) .... ${SHA1}"
|
||||
echo " SHA 4 (env.SHA1_GH) . ${SHA1_GH}"
|
||||
echo " Workspace ........... ${{ github.workspace }}"
|
||||
echo " PWD ................. ${PWD}"
|
||||
echo " Job Name ............ ${{ steps.context.outputs.job_name }}"
|
||||
echo " Job ID .............. ${{ steps.context.outputs.job_id }}"
|
||||
echo " Job URL ............. ${{ steps.context.outputs.job_url }}"
|
||||
echo " Run ID .............. ${{ steps.context.outputs.run_id }}"
|
||||
echo " Run Attempt ......... ${{ steps.context.outputs.run_attempt }}"
|
||||
echo " Run Number .......... ${{ steps.context.outputs.run_number }}"
|
||||
echo " Run URL ............. ${{ steps.context.outputs.run_url }}"
|
||||
echo " Run Env ............. ${{ steps.context.outputs.environment }}"
|
||||
echo " Run Env URL ......... ${{ steps.context.outputs.environment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Deployment URL .. ${{ steps.context.outputs.deployment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Runner Name ..... ${{ steps.context.outputs.runner_name }}"
|
||||
echo " Run Runner ID ....... ${{ steps.context.outputs.runner_id }}"
|
||||
echo " Year ................ ${YEAR}"
|
||||
echo " Now ................. ${NOW}"
|
||||
echo " Now (Short) ......... ${NOW_SHORT}"
|
||||
echo " Now (Long) .......... ${NOW_LONG}"
|
||||
echo " Now (Docker) ........ ${NOW_DOCKER}"
|
||||
echo " Now (Docker TS) ..... ${NOW_DOCKER_TS}"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
tree -I node_modules -I .git
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# #
|
||||
# Labels › Clean › Delete Existing Labels
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🏷️ Delete Existing Labels
|
||||
id: task_label_remove_run
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.ADMINSERV_TOKEN_CL }}
|
||||
github-token: ${{ secrets.ADMINSERV_TOKEN_CL || github.token }}
|
||||
script: |
|
||||
const targetOwner = context.repo.owner;
|
||||
const targetRepo = context.repo.repo;
|
||||
@@ -239,83 +328,12 @@ jobs:
|
||||
return result
|
||||
|
||||
# #
|
||||
# Labels › Get Weekly Commits
|
||||
# Labels › Clean › Get Weekly Commits
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🕛 Get Weekly Commit List
|
||||
id: task_label_set_weekly_commit_list
|
||||
run: |
|
||||
echo 'WEEKLY_COMMITS<<EOF' >> $GITHUB_ENV
|
||||
git log --format="[\`%h\`](${{ github.server_url }}/${{ github.repository }}/commit/%H) %s - %an" --since=7.days >> $GITHUB_ENV
|
||||
echo 'EOF' >> $GITHUB_ENV
|
||||
|
||||
# #
|
||||
# Labels › Notify Github › Success
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🔔 Send Discord Webhook Message (Success)
|
||||
id: task_label_notify_discord_success
|
||||
uses: tsickert/discord-webhook@v7.0.0
|
||||
if: success()
|
||||
with:
|
||||
username: 'Io'
|
||||
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
|
||||
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_TVAPP2_WORKFLOWS }}
|
||||
embed-title: "⚙️ ${{ github.workflow_ref }}"
|
||||
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg'
|
||||
embed-description: |
|
||||
## 🎫 Labels › Clean ${{ job.status == 'success' && '✅' || '❌' }}
|
||||
|
||||
A **successful** workflow has been ran to wipe all labels from your repository.
|
||||
|
||||
**${{ steps.task_label_remove_run.outputs.result }}** labels have been removed.
|
||||
|
||||
- Labels: `${{ steps.task_label_remove_run.outputs.result }} created`
|
||||
- Workflow: `${{ github.workflow }} (#${{github.run_number}})`
|
||||
- Runner: `${{ runner.name }}`
|
||||
- Triggered By: `${{ github.actor }}`
|
||||
- Status: `${{ job.status == 'success' && '✅ Successful' || '❌ Failed' }}`
|
||||
|
||||
embed-color: ${{ job.status == 'success' && '5763719' || '15418782' }}
|
||||
embed-footer-text: "Completed at ${{ env.NOW }} UTC"
|
||||
embed-timestamp: "${{ env.NOW_LONG }}"
|
||||
embed-author-name: "${{ github.repository_owner }}"
|
||||
embed-author-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
embed-author-icon-url: "https://avatars.githubusercontent.com/u/200161462"
|
||||
|
||||
# #
|
||||
# Labels › Notify Github › Failure
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🔔 Send Discord Webhook Message (Failure)
|
||||
id: task_label_notify_discord_failure
|
||||
uses: tsickert/discord-webhook@v7.0.0
|
||||
if: failure()
|
||||
with:
|
||||
username: 'Io'
|
||||
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
|
||||
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_TVAPP2_WORKFLOWS }}
|
||||
embed-title: "⚙️ ${{ github.workflow_ref }}"
|
||||
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg'
|
||||
embed-description: |
|
||||
## 🎫 Labels › Clean ${{ job.status == 'success' && '✅' || '❌' }}
|
||||
|
||||
A **failed** attempt was made to run this workflow. No new labels have been added to your repository.
|
||||
|
||||
- Labels: `${{ steps.task_label_remove_run.outputs.result }} created`
|
||||
- Workflow: `${{ github.workflow }} (#${{github.run_number}})`
|
||||
- Runner: `${{ runner.name }}`
|
||||
- Triggered By: `${{ github.actor }}`
|
||||
- Status: `${{ job.status == 'success' && '✅ Successful' || '❌ Failed' }}`
|
||||
|
||||
embed-color: ${{ job.status == 'success' && '5763719' || '15418782' }}
|
||||
embed-footer-text: "Completed at ${{ env.NOW }} UTC"
|
||||
embed-timestamp: "${{ env.NOW_LONG }}"
|
||||
embed-author-name: "${{ github.repository_owner }}"
|
||||
embed-author-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
embed-author-icon-url: "https://avatars.githubusercontent.com/u/200161462"
|
||||
|
||||
350
.github/workflows/labels-create.yml
vendored
350
.github/workflows/labels-create.yml
vendored
@@ -4,34 +4,26 @@
|
||||
# @url https://github.com/Aetherinox
|
||||
# @usage manually activated workflow to create issue labels
|
||||
#
|
||||
# @notes This Github action must be activated manually. This workflow script will do the following:
|
||||
#
|
||||
# - Scan issues / pull requests and make sure they have properly assigned labels:
|
||||
# - `Bug`
|
||||
# - `Feature`
|
||||
# - `Urgent`
|
||||
# - `Roadmap`
|
||||
#
|
||||
# - Workflow script will then scan each pr or issue and mark them as `Stale`
|
||||
# if they haven't had any replies in 30 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
|
||||
# secrets.CODECOV_TOKEN codecov upload token for nodejs projects
|
||||
# secrets.MAXMIND_GELITE_TOKEN maxmind API token
|
||||
# secrets.CF_ACCOUNT_ID cloudflare account id
|
||||
# secrets.CF_ACCOUNT_TOKEN cloudflare account token
|
||||
# secrets.ORG_TOKEN org github personal access token (fine-grained)
|
||||
# secrets.ORG_TOKEN_CL org github personal access token (classic)
|
||||
# secrets.ORG_DOCKERHUB_TOKEN org dockerhub secret
|
||||
# secrets.ORG_GITEA_TOKEN org gitea personal access token (classic) with package:write permission
|
||||
# secrets.BOT_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
|
||||
# secrets.BOT_GPG_KEY_B64 bot gpg private key (binary) converted to base64
|
||||
# secrets.BOT_GPG_PASSPHRASE bot gpg private key passphrase
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_RELEASES discord webhook to report release notifications from github to discord
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_WORKFLOWS discord webhook to report workflow notifications from github to discord
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_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
|
||||
@@ -43,63 +35,122 @@
|
||||
# act -W .github/workflows/labels-create.yml -s TOKEN_CL=XXXXXXXXXX --pull=false
|
||||
# #
|
||||
|
||||
name: "🎫 Labels › Create"
|
||||
run-name: "🎫 Labels › Create"
|
||||
name: '🎫 Labels › Create'
|
||||
run-name: '🎫 Labels › Create'
|
||||
|
||||
# #
|
||||
# triggers
|
||||
# #
|
||||
|
||||
on:
|
||||
|
||||
# #
|
||||
# Trigger > Workflow Dispatch
|
||||
# #
|
||||
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
|
||||
# #
|
||||
# Discord Bot › Name
|
||||
#
|
||||
# The discord bot name
|
||||
# #
|
||||
|
||||
DISCORD_BOT_NAME:
|
||||
description: '🤖 Bot Name'
|
||||
required: true
|
||||
default: 'Europa'
|
||||
type: string
|
||||
|
||||
# #
|
||||
# Discord Bot › Avatar
|
||||
#
|
||||
# The discord bot avatar to show; let's use some weird picture
|
||||
# #
|
||||
|
||||
DISCORD_BOT_AVATAR:
|
||||
description: '🤖 Avatar URL'
|
||||
required: true
|
||||
default: 'https://i.imgur.com/UqwMom1.jpeg'
|
||||
type: string
|
||||
|
||||
# #
|
||||
# Discord Bot › Author Icon URL
|
||||
#
|
||||
# A small picture shown to the top-right of each post
|
||||
# #
|
||||
|
||||
DISCORD_BOT_EMBED_AUTHOR_ICON:
|
||||
description: '🤖 Embed Author Icon'
|
||||
required: true
|
||||
default: 'https://avatars.githubusercontent.com/u/200161462'
|
||||
type: string
|
||||
|
||||
# #
|
||||
# Discord Bot › Thumbnail URL
|
||||
#
|
||||
# A small picture shown to the top-right of each post
|
||||
# #
|
||||
|
||||
DISCORD_BOT_EMBED_THUMBNAIL:
|
||||
description: '🤖 Embed Thumbnail URL'
|
||||
required: true
|
||||
default: 'https://avatars.githubusercontent.com/u/200161462'
|
||||
type: string
|
||||
|
||||
# #
|
||||
# environment variables
|
||||
# #
|
||||
|
||||
env:
|
||||
ASSIGN_USER: Aetherinox
|
||||
BOT_NAME_1: EuropaServ
|
||||
BOT_NAME_2: BinaryServ
|
||||
BOT_NAME_DEPENDABOT: dependabot[bot]
|
||||
BOT_NAME_RENOVATE: renovate[bot]
|
||||
DISCORD_BOT_NAME: ${{ github.event.inputs.DISCORD_BOT_NAME || 'Europa' }}
|
||||
DISCORD_BOT_AVATAR: ${{ github.event.inputs.DISCORD_BOT_AVATAR || 'https://i.imgur.com/UqwMom1.jpeg' }}
|
||||
DISCORD_BOT_EMBED_AUTHOR_ICON: ${{ github.event.inputs.DISCORD_BOT_EMBED_AUTHOR_ICON || 'https://avatars.githubusercontent.com/u/200161462' }}
|
||||
DISCORD_BOT_EMBED_THUMBNAIL: ${{ github.event.inputs.DISCORD_BOT_EMBED_THUMBNAIL || 'https://avatars.githubusercontent.com/u/200161462' }}
|
||||
ASSIGN_USER: Aetherinox
|
||||
BOT_NAME_1: EuropaServ
|
||||
BOT_NAME_2: BinaryServ
|
||||
BOT_NAME_DEPENDABOT: dependabot[bot]
|
||||
BOT_NAME_RENOVATE: renovate[bot]
|
||||
|
||||
LABELS_JSON: |
|
||||
[
|
||||
{ "name": "AC › Changes Made", "color": "8F1784", "description": "Requested changes have been made and are pending a re-scan" },
|
||||
{ "name": "AC › Changes Required", "color": "8F1784", "description": "Requires changes to be made to the package before being accepted" },
|
||||
{ "name": "AC › Failed", "color": "a61f2d", "description": "Autocheck failed to run through a complete cycle, requires investigation" },
|
||||
{ "name": "AC › Needs Rebase", "color": "8F1784", "description": "Due to the permissions on the requesting repo, this pull request must be rebased by the author" },
|
||||
{ "name": "AC › Passed", "color": "146b4a", "description": "Ready to be reviewed" },
|
||||
{ "name": "AC › Review Required", "color": "8F1784", "description": "PR needs to be reviewed by another person, after the requested changes have been made" },
|
||||
{ "name": "AC › Security Warning", "color": "761620", "description": "Does not conform to developer policies, or includes potentially dangerous code" },
|
||||
{ "name": "AC › Skipped Scan", "color": "8F1784", "description": "Author has skipped code scan" },
|
||||
{ "name": "Status 𐄂 Duplicate", "color": "75536b", "description": "Issue or pull request already exists" },
|
||||
{ "name": "Status 𐄂 Accepted", "color": "2e7539", "description": "This pull request has been accepted" },
|
||||
{ "name": "Status 𐄂 Autoclosed", "color": "3E0915", "description": "Originally stale and was autoclosed for no activity" },
|
||||
{ "name": "Status 𐄂 Denied", "color": "ba4058", "description": "Pull request has been denied" },
|
||||
{ "name": "Status 𐄂 Locked", "color": "550F45", "description": "Automatically locked by AdminServ for a prolonged period of inactivity" },
|
||||
{ "name": "Status 𐄂 Need Info", "color": "2E3C4C", "description": "Not enough information to resolve" },
|
||||
{ "name": "Status 𐄂 No Action", "color": "030406", "description": "Closed without any action being taken" },
|
||||
{ "name": "Status 𐄂 Pending", "color": "984b12", "description": "Pending pull request" },
|
||||
{ "name": "Status 𐄂 Released", "color": "1b6626", "description": "Issues or PR has been implemented and is now live" },
|
||||
{ "name": "Status 𐄂 Reopened", "color": "8a6f14", "description": "A previously closed PR which has been re-opened" },
|
||||
{ "name": "Status 𐄂 Review", "color": "9e1451", "description": "Currently pending review" },
|
||||
{ "name": "Status 𐄂 Stale", "color": "928282", "description": "Has not had any activity in over 30 days" },
|
||||
{ "name": "Type ◦ Bug", "color": "9a2c2c", "description": "Something isn't working" },
|
||||
{ "name": "Type ◦ Dependency", "color": "243759", "description": "Item is associated to dependency" },
|
||||
{ "name": "Type ◦ Docs", "color": "0e588d", "description": "Improvements or modifications to docs" },
|
||||
{ "name": "Type ◦ Feature", "color": "3c4e93", "description": "Feature request" },
|
||||
{ "name": "Type ◦ Git Action", "color": "030406", "description": "GitHub Action / workflow" },
|
||||
{ "name": "Type ◦ Pull Request", "color": "8F1784", "description": "Normal pull request" },
|
||||
{ "name": "Type ◦ Roadmap", "color": "8F1784", "description": "Feature or bug currently planned for implementation" },
|
||||
{ "name": "Type ◦ Internal", "color": "A51994", "description": "Assigned items are for internal developer use" },
|
||||
{ "name": "Build ◦ Desktop", "color": "c7ca4a", "description": "Specific to desktop" },
|
||||
{ "name": "Build ◦ Linux", "color": "c7ca4a", "description": "Specific to Linux" },
|
||||
{ "name": "Build ◦ MacOS", "color": "c7ca4a", "description": "Specific to MacOS" },
|
||||
{ "name": "Build ◦ Mobile", "color": "c7ca4a", "description": "Specific to mobile" },
|
||||
{ "name": "Build ◦ Web", "color": "c7ca4a", "description": "Specific to web" },
|
||||
{ "name": "Build ◦ Windows", "color": "c7ca4a", "description": "Specific to Windows" },
|
||||
{ "name": "AC › Changes Made", "color": "8F1784", "description": "Requested changes have been made and are pending a re-scan" },
|
||||
{ "name": "AC › Changes Required", "color": "8F1784", "description": "Requires changes to be made to the package before being accepted" },
|
||||
{ "name": "AC › Failed", "color": "a61f2d", "description": "Autocheck failed to run through a complete cycle, requires investigation" },
|
||||
{ "name": "AC › Needs Rebase", "color": "8F1784", "description": "Due to the permissions on the requesting repo, this pull request must be rebased by the author" },
|
||||
{ "name": "AC › Passed", "color": "146b4a", "description": "Ready to be reviewed" },
|
||||
{ "name": "AC › Review Required", "color": "8F1784", "description": "PR needs to be reviewed by another person, after the requested changes have been made" },
|
||||
{ "name": "AC › Security Warning", "color": "761620", "description": "Does not conform to developer policies, or includes potentially dangerous code" },
|
||||
{ "name": "AC › Skipped Scan", "color": "8F1784", "description": "Author has skipped code scan" },
|
||||
{ "name": "Status › Duplicate", "color": "75536b", "description": "Issue or pull request already exists" },
|
||||
{ "name": "Status › Accepted", "color": "2e7539", "description": "This pull request has been accepted" },
|
||||
{ "name": "Status › Autoclosed", "color": "3E0915", "description": "Originally stale and was autoclosed for no activity" },
|
||||
{ "name": "Status › Denied", "color": "ba4058", "description": "Pull request has been denied" },
|
||||
{ "name": "Status › Locked", "color": "550F45", "description": "Automatically locked by AdminServ for a prolonged period of inactivity" },
|
||||
{ "name": "Status › Need Info", "color": "2E3C4C", "description": "Not enough information to resolve" },
|
||||
{ "name": "Status › No Action", "color": "030406", "description": "Closed without any action being taken" },
|
||||
{ "name": "Status › Pending", "color": "984b12", "description": "Pending pull request" },
|
||||
{ "name": "Status › Released", "color": "1b6626", "description": "Issues or PR has been implemented and is now live" },
|
||||
{ "name": "Status › Reopened", "color": "8a6f14", "description": "A previously closed PR which has been re-opened" },
|
||||
{ "name": "Status › Review", "color": "9e1451", "description": "Currently pending review" },
|
||||
{ "name": "Status › Stale", "color": "928282", "description": "Has not had any activity in over 30 days" },
|
||||
{ "name": "Type › Bug", "color": "9a2c2c", "description": "Something isn't working" },
|
||||
{ "name": "Type › Dependency", "color": "243759", "description": "Item is associated to dependency" },
|
||||
{ "name": "Type › Lock Maintenance", "color": "FBCA04", "description": "Sync package-lock.json" },
|
||||
{ "name": "Type › Docs", "color": "0e588d", "description": "Improvements or modifications to docs" },
|
||||
{ "name": "Type › Feature", "color": "3c4e93", "description": "Feature request" },
|
||||
{ "name": "Type › Git Action", "color": "030406", "description": "GitHub Action / workflow" },
|
||||
{ "name": "Type › Pull Request", "color": "8F1784", "description": "Normal pull request" },
|
||||
{ "name": "Type › Roadmap", "color": "8F1784", "description": "Feature or bug currently planned for implementation" },
|
||||
{ "name": "Type › Internal", "color": "A51994", "description": "Assigned items are for internal developer use" },
|
||||
{ "name": "Build › Desktop", "color": "c7ca4a", "description": "Specific to desktop" },
|
||||
{ "name": "Build › Linux", "color": "c7ca4a", "description": "Specific to Linux" },
|
||||
{ "name": "Build › MacOS", "color": "c7ca4a", "description": "Specific to MacOS" },
|
||||
{ "name": "Build › Mobile", "color": "c7ca4a", "description": "Specific to mobile" },
|
||||
{ "name": "Build › Web", "color": "c7ca4a", "description": "Specific to web" },
|
||||
{ "name": "Build › Windows", "color": "c7ca4a", "description": "Specific to Windows" },
|
||||
{ "name": "› API", "color": "F99B50", "description": "Plugin API, CLI, browser JS API" },
|
||||
{ "name": "› Auto-type", "color": "9141E0", "description": "Auto-type functionality in desktop apps" },
|
||||
{ "name": "› Browser", "color": "9141E0", "description": "Browser plugins and passing data to <=> from app" },
|
||||
@@ -143,6 +194,8 @@ jobs:
|
||||
name: >-
|
||||
🎫 Labels › Create
|
||||
runs-on: ubuntu-latest
|
||||
# runs-on: apollo-x64
|
||||
timeout-minutes: 3
|
||||
permissions:
|
||||
contents: 'read'
|
||||
id-token: 'write'
|
||||
@@ -150,41 +203,125 @@ jobs:
|
||||
steps:
|
||||
|
||||
# #
|
||||
# [ Create Labels ] Start
|
||||
# Labels › Create › Checkout
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
✅ Start
|
||||
id: task_label_create_start
|
||||
run: |
|
||||
echo "Assigning labels and assignees"
|
||||
|
||||
# #
|
||||
# Create Labels › Set Env Variables
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🕛 Get Timestamp
|
||||
id: task_label_set_timestamp
|
||||
run: |
|
||||
echo "NOW=$(date +'%m-%d-%Y %H:%M:%S')" >> $GITHUB_ENV
|
||||
echo "NOW_SHORT=$(date +'%m-%d-%Y')" >> $GITHUB_ENV
|
||||
echo "NOW_LONG=$(date +'%m-%d-%Y %H:%M')" >> $GITHUB_ENV
|
||||
echo "NOW_DOCKER_LABEL=$(date +'%Y%m%d')" >> $GITHUB_ENV
|
||||
|
||||
# #
|
||||
# [ Create Labels ] Checkout
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
☑️ Checkout
|
||||
id: task_label_create_checkout
|
||||
- name: '☑️ Checkout'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# #
|
||||
# [ Create Labels ] Verify Existing Labels
|
||||
# Labels › Create › Job Information
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🔄 Load Job
|
||||
uses: qoomon/actions--context@v4
|
||||
id: 'context'
|
||||
|
||||
# #
|
||||
# Labels › Create › Start
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
✅ Start
|
||||
run: |
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo " Starting Job ${{ steps.context.outputs.job_name }}"
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
|
||||
YEAR="$(date +'%Y')"
|
||||
echo "YEAR=${YEAR}" >> $GITHUB_ENV
|
||||
|
||||
NOW="$(date +'%m-%d-%Y %H:%M:%S')" # 02-25-2025 12:49:48
|
||||
echo "NOW=${NOW}" >> $GITHUB_ENV
|
||||
|
||||
NOW_SHORT="$(date +'%m-%d-%Y')" # 02-25-2025
|
||||
echo "NOW_SHORT=${NOW_SHORT}" >> $GITHUB_ENV
|
||||
|
||||
NOW_LONG="$(date +'%m-%d-%Y %H:%M')" # 02-25-2025 12:49
|
||||
echo "NOW_LONG=${NOW_LONG}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER="$(date +'%Y%m%d')" # 20250225
|
||||
echo "NOW_DOCKER=${NOW_DOCKER}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER_TS="$(date -u +'%FT%T.%3NZ')" # 2025-02-25T12:50:11.569Z
|
||||
echo "NOW_DOCKER_TS=${NOW_DOCKER_TS}" >> $GITHUB_ENV
|
||||
|
||||
SHA1="$(git rev-parse HEAD)" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1=${SHA1}" >> $GITHUB_ENV
|
||||
|
||||
SHA1_GH="$(echo ${GITHUB_SHA})" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1_GH=${SHA1_GH}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_1DIGIT="$(echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-1)" # 3.22 > 3
|
||||
echo "PKG_VER_1DIGIT=${PKG_VER_1DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_2DIGIT="$(echo ${{ env.IMAGE_VERSION }} | cut -f2 -d ":" | cut -c1-3)" # 3.22 > 3.2
|
||||
echo "PKG_VER_2DIGIT=${PKG_VER_2DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
sudo apt -qq update
|
||||
sudo apt -qq install tree
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
echo " Runner .............. ${{ runner.name }}"
|
||||
echo " Workflow ............ ${{ github.workflow }} (#${{ github.workflow_ref }})"
|
||||
echo " Run Number .......... ${{ github.run_number }}"
|
||||
echo " Ref ................. ${{ github.ref }}"
|
||||
echo " Ref Name ............ ${{ github.ref_name }}"
|
||||
echo " Event Name .......... ${{ github.event_name }}"
|
||||
echo " Repo ................ ${{ github.repository }}"
|
||||
echo " Repo Owner .......... ${{ github.repository_owner }}"
|
||||
echo " Run ID .............. https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
echo " Triggered By ........ ${{ github.actor }}"
|
||||
echo " SHA 1 (GITHUB_SHA) .. ${GITHUB_SHA}"
|
||||
echo " SHA 2 (github.sha) .. ${{ github.sha }}"
|
||||
echo " SHA 3 (env.SHA1) .... ${SHA1}"
|
||||
echo " SHA 4 (env.SHA1_GH) . ${SHA1_GH}"
|
||||
echo " Workspace ........... ${{ github.workspace }}"
|
||||
echo " PWD ................. ${PWD}"
|
||||
echo " Job Name ............ ${{ steps.context.outputs.job_name }}"
|
||||
echo " Job ID .............. ${{ steps.context.outputs.job_id }}"
|
||||
echo " Job URL ............. ${{ steps.context.outputs.job_url }}"
|
||||
echo " Run ID .............. ${{ steps.context.outputs.run_id }}"
|
||||
echo " Run Attempt ......... ${{ steps.context.outputs.run_attempt }}"
|
||||
echo " Run Number .......... ${{ steps.context.outputs.run_number }}"
|
||||
echo " Run URL ............. ${{ steps.context.outputs.run_url }}"
|
||||
echo " Run Env ............. ${{ steps.context.outputs.environment }}"
|
||||
echo " Run Env URL ......... ${{ steps.context.outputs.environment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Deployment URL .. ${{ steps.context.outputs.deployment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Runner Name ..... ${{ steps.context.outputs.runner_name }}"
|
||||
echo " Run Runner ID ....... ${{ steps.context.outputs.runner_id }}"
|
||||
echo " Year ................ ${YEAR}"
|
||||
echo " Now ................. ${NOW}"
|
||||
echo " Now (Short) ......... ${NOW_SHORT}"
|
||||
echo " Now (Long) .......... ${NOW_LONG}"
|
||||
echo " Now (Docker) ........ ${NOW_DOCKER}"
|
||||
echo " Now (Docker TS) ..... ${NOW_DOCKER_TS}"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
tree -I node_modules -I .git
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# #
|
||||
# Labels › Create › Verify Existing Labels
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
@@ -192,7 +329,7 @@ jobs:
|
||||
id: task_label_verify_existing
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.ADMINSERV_TOKEN_CL }}
|
||||
github-token: ${{ secrets.ADMINSERV_TOKEN_CL || github.token }}
|
||||
script: |
|
||||
const labels = JSON.parse( process.env.LABELS_JSON );
|
||||
let result = Object.keys(labels).length;
|
||||
@@ -227,7 +364,7 @@ jobs:
|
||||
return result
|
||||
|
||||
# #
|
||||
# Cleanup › Get Weekly Commits
|
||||
# Labels › Create › Get Weekly Commits
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
@@ -243,17 +380,16 @@ jobs:
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🔔 Send Discord Webhook Message (Success)
|
||||
id: task_label_notify_discord_success
|
||||
🔔 Send Discord Webhook Message (Success)
|
||||
uses: tsickert/discord-webhook@v7.0.0
|
||||
if: success()
|
||||
with:
|
||||
username: 'Io'
|
||||
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
|
||||
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_TVAPP2_WORKFLOWS }}
|
||||
username: ${{ env.DISCORD_BOT_NAME }}
|
||||
avatar-url: ${{ env.DISCORD_BOT_AVATAR }}
|
||||
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKfLOWS }}
|
||||
embed-title: "⚙️ ${{ github.workflow_ref }}"
|
||||
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg'
|
||||
embed-thumbnail-url: ${{ env.DISCORD_BOT_EMBED_THUMBNAIL }}
|
||||
embed-description: |
|
||||
## 🎫 Labels › Create ${{ job.status == 'success' && '✅' || '❌' }}
|
||||
|
||||
@@ -272,24 +408,23 @@ jobs:
|
||||
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"
|
||||
embed-author-icon-url: ${{ env.DISCORD_BOT_EMBED_AUTHOR_ICON }}
|
||||
|
||||
# #
|
||||
# Cleanup › Notify Github › Failure
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🔔 Send Discord Webhook Message (Failure)
|
||||
id: task_label_notify_discord_failure
|
||||
🔔 Send Discord Webhook Message (Failure)
|
||||
uses: tsickert/discord-webhook@v7.0.0
|
||||
if: failure()
|
||||
with:
|
||||
username: 'Io'
|
||||
avatar-url: 'https://i.imgur.com/8BVDkla.jpg'
|
||||
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_TVAPP2_WORKFLOWS }}
|
||||
username: ${{ env.DISCORD_BOT_NAME }}
|
||||
avatar-url: ${{ env.DISCORD_BOT_AVATAR }}
|
||||
webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKfLOWS }}
|
||||
embed-title: "⚙️ ${{ github.workflow_ref }}"
|
||||
embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg'
|
||||
embed-thumbnail-url: ${{ env.DISCORD_BOT_EMBED_THUMBNAIL }}
|
||||
embed-description: |
|
||||
## 🎫 Labels › Create ${{ job.status == 'success' && '✅' || '❌' }}
|
||||
|
||||
@@ -306,5 +441,4 @@ jobs:
|
||||
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"
|
||||
|
||||
embed-author-icon-url: ${{ env.DISCORD_BOT_EMBED_AUTHOR_ICON }}
|
||||
|
||||
323
.github/workflows/ping-developer.yml
vendored
Normal file
323
.github/workflows/ping-developer.yml
vendored
Normal file
@@ -0,0 +1,323 @@
|
||||
# #
|
||||
# @type github workflow
|
||||
# @author Aetherinox
|
||||
# @url https://github.com/Aetherinox
|
||||
# @usage pings the developer when an issue comment is made
|
||||
#
|
||||
# @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.CODECOV_TOKEN codecov upload token for nodejs projects
|
||||
# secrets.MAXMIND_GELITE_TOKEN maxmind API token
|
||||
# secrets.CF_ACCOUNT_ID cloudflare account id
|
||||
# secrets.CF_ACCOUNT_TOKEN cloudflare account token
|
||||
# secrets.ORG_TOKEN org github personal access token (fine-grained)
|
||||
# secrets.ORG_TOKEN_CL org github personal access token (classic)
|
||||
# secrets.ORG_DOCKERHUB_TOKEN org dockerhub secret
|
||||
# secrets.ORG_GITEA_TOKEN org gitea personal access token (classic) with package:write permission
|
||||
# secrets.BOT_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
|
||||
# secrets.BOT_GPG_KEY_B64 bot gpg private key (binary) converted to base64
|
||||
# secrets.BOT_GPG_PASSPHRASE bot gpg private key passphrase
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_RELEASES discord webhook to report release notifications from github to discord
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_WORKFLOWS discord webhook to report workflow notifications from github to discord
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_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/ping-developer.yml -P ubuntu-latest=catthehacker/ubuntu:full-22.04
|
||||
# act -W .github/workflows/ping-developer.yml -s TOKEN_CL=XXXXXXXXXX --pull=false
|
||||
# #
|
||||
|
||||
name: '💬 Ping › Developer'
|
||||
run-name: '💬 Ping › Developer'
|
||||
|
||||
# #
|
||||
# triggers
|
||||
# #
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
# #
|
||||
# environment variables
|
||||
# #
|
||||
|
||||
env:
|
||||
DEPLOYMENT_ENV: ${{ github.event.inputs.DEPLOYMENT_ENV || 'orion' }}
|
||||
BOT_NAME_1: EuropaServ
|
||||
BOT_NAME_2: BinaryServ
|
||||
BOT_NAME_DEPENDABOT: dependabot[bot]
|
||||
BOT_NAME_RENOVATE: renovate[bot]
|
||||
|
||||
# #
|
||||
# jobs
|
||||
#
|
||||
# env not available for job.if
|
||||
# #
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: >-
|
||||
💬 Issue › Accept
|
||||
runs-on: ubuntu-latest
|
||||
# runs-on: apollo-x64
|
||||
timeout-minutes: 5
|
||||
if: |
|
||||
contains(github.event.comment.body, '/ping')
|
||||
steps:
|
||||
|
||||
# #
|
||||
# Ping › Checkout
|
||||
# #
|
||||
|
||||
- name: '☑️ Checkout'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# #
|
||||
# Ping › Job Information
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🔄 Load Job
|
||||
uses: qoomon/actions--context@v4
|
||||
id: 'context'
|
||||
|
||||
# #
|
||||
# Ping › Start
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
✅ Start
|
||||
run: |
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo " Starting Job ${{ steps.context.outputs.job_name }}"
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
|
||||
YEAR="$(date +'%Y')"
|
||||
echo "YEAR=${YEAR}" >> $GITHUB_ENV
|
||||
|
||||
NOW="$(date +'%m-%d-%Y %H:%M:%S')" # 02-25-2025 12:49:48
|
||||
echo "NOW=${NOW}" >> $GITHUB_ENV
|
||||
|
||||
NOW_SHORT="$(date +'%m-%d-%Y')" # 02-25-2025
|
||||
echo "NOW_SHORT=${NOW_SHORT}" >> $GITHUB_ENV
|
||||
|
||||
NOW_LONG="$(date +'%m-%d-%Y %H:%M')" # 02-25-2025 12:49
|
||||
echo "NOW_LONG=${NOW_LONG}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER="$(date +'%Y%m%d')" # 20250225
|
||||
echo "NOW_DOCKER=${NOW_DOCKER}" >> $GITHUB_ENV
|
||||
|
||||
NOW_DOCKER_TS="$(date -u +'%FT%T.%3NZ')" # 2025-02-25T12:50:11.569Z
|
||||
echo "NOW_DOCKER_TS=${NOW_DOCKER_TS}" >> $GITHUB_ENV
|
||||
|
||||
SHA1="$(git rev-parse HEAD)" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1=${SHA1}" >> $GITHUB_ENV
|
||||
|
||||
SHA1_GH="$(echo ${GITHUB_SHA})" # 71fad013cfce9116ec62779e4a7e627fe4c33627
|
||||
echo "SHA1_GH=${SHA1_GH}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_1DIGIT="$(echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-1)" # 3.22 > 3
|
||||
echo "PKG_VER_1DIGIT=${PKG_VER_1DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
PKG_VER_2DIGIT="$(echo ${{ env.IMAGE_VERSION }} | cut -f2 -d ":" | cut -c1-3)" # 3.22 > 3.2
|
||||
echo "PKG_VER_2DIGIT=${PKG_VER_2DIGIT}" >> $GITHUB_ENV
|
||||
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
sudo apt -qq update
|
||||
sudo apt -qq install tree
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
echo " Runner .............. ${{ runner.name }}"
|
||||
echo " Workflow ............ ${{ github.workflow }} (#${{ github.workflow_ref }})"
|
||||
echo " Run Number .......... ${{ github.run_number }}"
|
||||
echo " Ref ................. ${{ github.ref }}"
|
||||
echo " Ref Name ............ ${{ github.ref_name }}"
|
||||
echo " Event Name .......... ${{ github.event_name }}"
|
||||
echo " Repo ................ ${{ github.repository }}"
|
||||
echo " Repo Owner .......... ${{ github.repository_owner }}"
|
||||
echo " Run ID .............. https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
echo " Triggered By ........ ${{ github.actor }}"
|
||||
echo " SHA 1 (GITHUB_SHA) .. ${GITHUB_SHA}"
|
||||
echo " SHA 2 (github.sha) .. ${{ github.sha }}"
|
||||
echo " SHA 3 (env.SHA1) .... ${SHA1}"
|
||||
echo " SHA 4 (env.SHA1_GH) . ${SHA1_GH}"
|
||||
echo " Workspace ........... ${{ github.workspace }}"
|
||||
echo " PWD ................. ${PWD}"
|
||||
echo " Job Name ............ ${{ steps.context.outputs.job_name }}"
|
||||
echo " Job ID .............. ${{ steps.context.outputs.job_id }}"
|
||||
echo " Job URL ............. ${{ steps.context.outputs.job_url }}"
|
||||
echo " Run ID .............. ${{ steps.context.outputs.run_id }}"
|
||||
echo " Run Attempt ......... ${{ steps.context.outputs.run_attempt }}"
|
||||
echo " Run Number .......... ${{ steps.context.outputs.run_number }}"
|
||||
echo " Run URL ............. ${{ steps.context.outputs.run_url }}"
|
||||
echo " Run Env ............. ${{ steps.context.outputs.environment }}"
|
||||
echo " Run Env URL ......... ${{ steps.context.outputs.environment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Deployment URL .. ${{ steps.context.outputs.deployment_url }}"
|
||||
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
|
||||
echo " Run Runner Name ..... ${{ steps.context.outputs.runner_name }}"
|
||||
echo " Run Runner ID ....... ${{ steps.context.outputs.runner_id }}"
|
||||
echo " Year ................ ${YEAR}"
|
||||
echo " Now ................. ${NOW}"
|
||||
echo " Now (Short) ......... ${NOW_SHORT}"
|
||||
echo " Now (Long) .......... ${NOW_LONG}"
|
||||
echo " Now (Docker) ........ ${NOW_DOCKER}"
|
||||
echo " Now (Docker TS) ..... ${NOW_DOCKER_TS}"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
tree -I node_modules -I .git
|
||||
echo ""
|
||||
echo ""
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# #
|
||||
# Ping › Developer › Send Mail
|
||||
#
|
||||
# Add Label to accepted PR
|
||||
#
|
||||
# port 465
|
||||
# server_port: 465
|
||||
# secure: true
|
||||
# ignore_cert: false
|
||||
#
|
||||
# port 587
|
||||
# server_port: 587
|
||||
# secure: false
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
📨 Send mail
|
||||
id: task_ping_developer_mail
|
||||
uses: dawidd6/action-send-mail@v5
|
||||
with:
|
||||
server_address: ${{ secrets.EMAIL_SMTP }}
|
||||
server_port: 465
|
||||
secure: true
|
||||
username: ${{ secrets.EMAIL_FROM }}
|
||||
password: ${{ secrets.EMAIL_KEY }}
|
||||
subject: "Github: Ping notification from ${{ github.repository }}"
|
||||
to: ${{ secrets.EMAIL_TO }}
|
||||
from: ${{ secrets.EMAIL_FROM }}
|
||||
html_body: |
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Title</title>
|
||||
|
||||
<style>
|
||||
body {
|
||||
background: url('https://images.unsplash.com/photo-1541422348463-9bc715520974?fm=jpg&q=60&w=3000&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8M3x8ZGFyayUyMG1vdW50YWlufGVufDB8fDB8fHww');
|
||||
font-size:9pt;
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
.background-overlay {
|
||||
background-color: #1111119f;
|
||||
}
|
||||
.background-header {
|
||||
background: url('https://process.fs.teachablecdn.com/ADNupMnWyR7kCWRvm76Laz/resize=width:705/https://cdn.filestackcontent.com/MipxnobQRRS5h7raz9aM');
|
||||
background-size: cover;
|
||||
background-size: 100%;
|
||||
background-color:#1b1b1b;
|
||||
padding:5px;
|
||||
height:100px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="background-overlay">
|
||||
<center>
|
||||
<div class="background-header">
|
||||
<a href="https://github.com/${{ github.repository }}"><img style="height:80px;padding-top:10px;" src="https://cdn0.iconfinder.com/data/icons/shift-logotypes/32/Github-512.png"></a>
|
||||
</div>
|
||||
</center>
|
||||
|
||||
<div style="font-size:9pt;padding: 20px;color:#FFF;">
|
||||
<h3><span style="font-size:9pt;color:#cc6613;">[Github]</span> <span style="font-size:9pt;color:#FFF;">Dear ${{github.repository_owner}},</span></h3>
|
||||
<p style="font-size:9pt;color:#FFF;"><br />You have received a ping notification from <a href="https://github.com/${{ github.repository }}">${{ github.repository }}</a> by <a href="https://github.com/${{ github.event.comment.user.login }}">${{ github.event.comment.user.login }}</a>.</p>
|
||||
<br>
|
||||
<br>
|
||||
<center>
|
||||
<table cellspacing="0" cellpadding="0" width="40%" class="center">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td
|
||||
style="font-size:9pt;background-color:#8a2138;color:#FFF;padding:6px;padding-left:10px;"><b>Repository</b></td>
|
||||
<td style="font-size:9pt;padding-left:5px;color:#b3b3b3;background-color:#1b1b1b;padding-left:10px;">${{ github.repository }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td
|
||||
style="font-size:9pt;background-color:#8a2138;color:#FFF;padding:6px;padding-left:10px;"><b>Date</b></td>
|
||||
<td style="font-size:9pt;padding-left:5px;color:#b3b3b3;background-color:#0f0f0f;padding-left:10px;">${{ env.NOW }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td
|
||||
style="font-size:9pt;background-color:#8a2138;color:#FFF;padding:6px;padding-left:10px;"><b>Commenter</b></td>
|
||||
<td style="font-size:9pt;padding-left:5px;color:#b3b3b3;background-color:#1b1b1b;padding-left:10px;">${{ github.event.comment.user.login }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td
|
||||
style="font-size:9pt;background-color:#8a2138;color:#FFF;padding:6px;padding-left:10px;"><b>Issue #</b></td>
|
||||
<td style="font-size:9pt;padding-left:5px;color:#b3b3b3;background-color:#0f0f0f;padding-left:10px;">${{ github.event.issue.number }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td
|
||||
style="font-size:9pt;background-color:#8a2138;color:#FFF;padding:6px;padding-left:10px;"><b>Action</b></td>
|
||||
<td style="font-size:9pt;padding-left:5px;color:#b3b3b3;background-color:#1b1b1b;padding-left:10px;">Notification</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<br><br>
|
||||
|
||||
<center>
|
||||
<div style="font-family:Consolas;">
|
||||
|
||||
<textarea readonly=true style="font-size:9pt;width:60%;background-color:#363636;color:#FFF;padding:15px;border:1px solid #5a5a5a;" id="w3review" name="w3review" rows="20" cols="100">
|
||||
${{ github.event.comment.body }}
|
||||
</textarea>
|
||||
|
||||
</div>
|
||||
</center>
|
||||
|
||||
<p> </p>
|
||||
<p style="color:#FFF;"><br /> ~ Github
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<br /><br />
|
||||
|
||||
<div style="background-color:#1b1b1b;padding:5px;line-height:70px;height:70px;text-align:center;">
|
||||
<span style="color:#FFF;font-size:8pt;">Copyright © ${{ env.YEAR }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
ignore_cert: true
|
||||
convert_markdown: true
|
||||
priority: normal
|
||||
336
.github/workflows/release.yml
vendored
336
.github/workflows/release.yml
vendored
@@ -53,8 +53,8 @@ on:
|
||||
type: string
|
||||
|
||||
# #
|
||||
# ENABLE: the changelog generated in releases tab will only display single commits.
|
||||
# DISABLE: the changelog shows pull requests completed based on their labels
|
||||
# true the changelog generated in releases tab will only display single commits.
|
||||
# false the changelog shows pull requests completed based on their labels
|
||||
# #
|
||||
|
||||
CHANGELOG_MODE_COMMIT:
|
||||
@@ -64,10 +64,10 @@ on:
|
||||
type: boolean
|
||||
|
||||
# #
|
||||
# ENABLE: Will show all types of commits, including uncategorized
|
||||
# DISABLE: WIll only show actions that have been categorized using the format
|
||||
# type(scope): description
|
||||
# type: description
|
||||
# true Will show all types of commits, including uncategorized
|
||||
# false WIll only show actions that have been categorized using the format
|
||||
# type(scope): description
|
||||
# type: description
|
||||
# #
|
||||
|
||||
SHOW_UNCATEGORIZED:
|
||||
@@ -77,23 +77,23 @@ on:
|
||||
type: boolean
|
||||
|
||||
# #
|
||||
# ENABLE: released version will be marked as pre-release
|
||||
# DISABLE: release version will be marked as stable / normal release
|
||||
# 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
|
||||
# #
|
||||
|
||||
PRERELEASE:
|
||||
RC_RELEASE:
|
||||
description: '🧪 Build RC (Pre-release)'
|
||||
required: true
|
||||
default: false
|
||||
type: boolean
|
||||
|
||||
# #
|
||||
# Release Candidate version number
|
||||
# this will be added to the end of your released app in the releases page.
|
||||
# e.g: tvapp2-v1.0.0-rc.1
|
||||
# only needed if env variable `RC_ONLY` = true
|
||||
# sets the version number for the release candidate
|
||||
# e.g: noxenv-v1.0.0-rc.1
|
||||
# #
|
||||
|
||||
VERSION_RC:
|
||||
RC_VERSION:
|
||||
description: '🧪 RC (Pre-release) Ver (tvapp2-rc.v1)'
|
||||
required: false
|
||||
type: string
|
||||
@@ -105,15 +105,17 @@ on:
|
||||
|
||||
env:
|
||||
PROJECT_NAME: ${{ github.event.inputs.PROJECT_NAME || 'tvapp2' }}
|
||||
CHANGELOG_MODE_COMMIT: true
|
||||
SHOW_UNCATEGORIZED: false
|
||||
PRERELEASE: false
|
||||
VERSION_RC: '1'
|
||||
CHANGELOG_MODE_COMMIT: ${{ github.event.inputs.CHANGELOG_MODE_COMMIT || true }}
|
||||
SHOW_UNCATEGORIZED: ${{ github.event.inputs.SHOW_UNCATEGORIZED || false }}
|
||||
RC_RELEASE: ${{ github.event.inputs.RC_RELEASE || false }}
|
||||
RC_VERSION: ${{ github.event.inputs.RC_VERSION || '1' }}
|
||||
ASSIGN_USER: Aetherinox
|
||||
BOT_NAME_1: EuropaServ
|
||||
BOT_NAME_2: BinaryServ
|
||||
BOT_NAME_DEPENDABOT: dependabot[bot]
|
||||
BOT_NAME_RENOVATE: renovate[bot]
|
||||
GPG_KEY_BASE64: ${{ secrets.ADMINSERV_GPG_KEY_B64 }}
|
||||
GPG_KEY_PASSPHRASE: ${{ secrets.ADMINSERV_GPG_PASSPHRASE }}
|
||||
|
||||
# #
|
||||
# Jobs
|
||||
@@ -207,6 +209,20 @@ jobs:
|
||||
packages: write
|
||||
steps:
|
||||
|
||||
# #
|
||||
# Release › Set Env Variables
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🕛 Get Timestamp
|
||||
id: task_release_label_set_timestamp
|
||||
run: |
|
||||
echo "YEAR=$(date +'%Y')" >> $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 › Checkout
|
||||
# #
|
||||
@@ -218,24 +234,28 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
# #
|
||||
# Release › Set Env Variables
|
||||
# Release › Start
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
🕛 Get Timestamp
|
||||
id: task_release_label_set_timestamp
|
||||
✅ Start
|
||||
id: task_release_start
|
||||
run: |
|
||||
echo "NOW=$(date +'%m-%d-%Y %H:%M:%S')" >> $GITHUB_ENV
|
||||
echo "NOW_SHORT=$(date +'%m-%d-%Y')" >> $GITHUB_ENV
|
||||
echo "NOW_LONG=$(date +'%m-%d-%Y %H:%M')" >> $GITHUB_ENV
|
||||
echo "NOW_DOCKER_LABEL=$(date +'%Y%m%d')" >> $GITHUB_ENV
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
echo " Starting Documentation Build script"
|
||||
echo " Runner .............. ${{ runner.name }}"
|
||||
echo " Workflow ............ ${{ github.workflow }} (#${{ github.workflow_ref }})"
|
||||
echo " Run Number .......... #${{ github.run_number }}"
|
||||
echo " Run ID .............. https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
echo " Triggered By ........ ${{ github.actor }}"
|
||||
echo " Time ................ ${{ env.NOW_LONG }}"
|
||||
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||||
|
||||
# #
|
||||
# Release › Print Version Debug
|
||||
# #
|
||||
|
||||
- name: '🪪 Test Next Job Version'
|
||||
id: task_release_debug_print_ver
|
||||
run: |
|
||||
echo "VERSION: ${{ env.PACKAGE_VERSION }}"
|
||||
|
||||
@@ -244,7 +264,6 @@ jobs:
|
||||
# #
|
||||
|
||||
- name: '🪪 NPM › Install & Lint'
|
||||
id: task_release_npm_install
|
||||
working-directory: ./tvapp2
|
||||
run: |
|
||||
npm ci
|
||||
@@ -257,7 +276,6 @@ jobs:
|
||||
# #
|
||||
|
||||
- name: '🪪 Generate IDs'
|
||||
id: task_release_npm_env_generate
|
||||
working-directory: ./tvapp2
|
||||
run: |
|
||||
npm run root:generate
|
||||
@@ -279,7 +297,6 @@ jobs:
|
||||
# #
|
||||
|
||||
- name: '🪪 .ENV › Read'
|
||||
id: task_dotenv_debug_print
|
||||
run: |
|
||||
echo "GUID: ${{ steps.task_release_dotenv_get.outputs.GUID }}"
|
||||
echo "UUID: ${{ steps.task_release_dotenv_get.outputs.UUID }}"
|
||||
@@ -288,15 +305,17 @@ jobs:
|
||||
# Release › Build › Stable
|
||||
# #
|
||||
|
||||
- name: '🔨 Build › Stable ( ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip )'
|
||||
id: task_release_build_st
|
||||
if: ${{ startsWith( inputs.PRERELEASE, false ) }}
|
||||
- name: '🔨 Build › Stable › ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip'
|
||||
if: |
|
||||
startsWith( inputs.RC_RELEASE, false ) ||
|
||||
startsWith( env.RC_RELEASE, false )
|
||||
run: |
|
||||
echo Building STABLE Package ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip
|
||||
zip -r ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip Dockerfile Dockerfile.aarch64 docker-compose.yml docker-entrypoint.sh root/ tvapp2/package.json README.md LICENSE
|
||||
|
||||
echo Building STABLE Package ${{ env.PROJECT_NAME }}-v${{ env.PACKAGE_VERSION }}-docker-compose.zip
|
||||
zip -r ${{ env.PROJECT_NAME }}-v${{ env.PACKAGE_VERSION }}-docker-compose.zip docker-compose.yml README.md LICENSE
|
||||
echo Building STABLE Package ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-docker-compose.zip
|
||||
zip -r ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-docker-compose.zip docker-compose.yml README.md LICENSE
|
||||
ls
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.ADMINSERV_TOKEN_CL }}
|
||||
|
||||
@@ -304,15 +323,17 @@ jobs:
|
||||
# Release › Build › Release Candidate
|
||||
# #
|
||||
|
||||
- name: '🔨 Build › RC ( ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}.zip )'
|
||||
- name: '🔨 Build › Release Candidate › ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.RC_VERSION }}.zip'
|
||||
id: task_release_build_rc
|
||||
if: ${{ startsWith( inputs.PRERELEASE, true ) }}
|
||||
if: |
|
||||
startsWith( inputs.RC_RELEASE, true ) ||
|
||||
startsWith( env.RC_RELEASE, true )
|
||||
run: |
|
||||
echo Building PRE-RELEASE Package ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}.zip
|
||||
zip -r ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}.zip Dockerfile Dockerfile.aarch64 docker-compose.yml docker-entrypoint.sh root/ tvapp2/package.json README.md LICENSE
|
||||
echo Building PRE-RELEASE Package ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.RC_VERSION }}.zip
|
||||
zip -r ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.RC_VERSION }}.zip Dockerfile Dockerfile.aarch64 docker-compose.yml docker-entrypoint.sh root/ tvapp2/package.json README.md LICENSE
|
||||
|
||||
echo Building PRE-RELEASE Package ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}-docker-compose.zip
|
||||
zip -r ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}-docker-compose.zip docker-compose.yml README.md LICENSE
|
||||
echo Building PRE-RELEASE Package ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.RC_VERSION }}-docker-compose.zip
|
||||
zip -r ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.RC_VERSION }}-docker-compose.zip docker-compose.yml README.md LICENSE
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.ADMINSERV_TOKEN_CL }}
|
||||
|
||||
@@ -341,62 +362,118 @@ jobs:
|
||||
# #
|
||||
|
||||
- name: '🔖 Tag › Confirm ${{ env.PACKAGE_VERSION }}'
|
||||
id: task_release_tag_get
|
||||
run: |
|
||||
echo "Tag already present: ${{ env.TAG_EXISTS }}"
|
||||
echo "Tag already present: ${{ steps.task_release_tag_create.outputs.tag_exists }}"
|
||||
|
||||
# #
|
||||
# Release › GPG › Import Key (No Passphrase)
|
||||
#
|
||||
# requires your GPG private key, converted to base64 binary .gpg (not armored .asc)
|
||||
# #
|
||||
|
||||
- name: '🪪 GPG › Import Signing Key › W/o Passphrase'
|
||||
if: env.GPG_KEY_BASE64 != '' && env.GPG_KEY_PASSPHRASE == ''
|
||||
run: |
|
||||
echo $GPG_KEY_BASE64 | base64 -di | gpg --import
|
||||
|
||||
# #
|
||||
# Release › GPG › Import Key (With Passphrase)
|
||||
#
|
||||
# requires your GPG private key, converted to base64 binary .gpg (not armored .asc)
|
||||
# #
|
||||
|
||||
- name: '🪪 GPG › Import Signing Key › w/ Passphrase'
|
||||
if: env.GPG_KEY_BASE64 != '' && env.GPG_KEY_PASSPHRASE != ''
|
||||
run: |
|
||||
echo "$GPG_KEY_BASE64" | base64 -di > /tmp/signing-key.gpg
|
||||
echo "$GPG_KEY_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg
|
||||
(echo "$GPG_KEY_PASSPHRASE"; echo; echo) | gpg --command-fd 0 --pinentry-mode loopback --change-passphrase $(gpg --list-secret-keys --with-colons 2> /dev/null | grep '^sec:' | cut --delimiter ':' --fields 5 | tail -n 1)
|
||||
|
||||
# #
|
||||
# Release › Checksum › Stable
|
||||
# #
|
||||
|
||||
- name: '🆔 Checksum › Stable'
|
||||
id: task_release_checksum_st_set
|
||||
if: ${{ startsWith( inputs.PRERELEASE, false ) }}
|
||||
if: |
|
||||
startsWith( inputs.RC_RELEASE, false ) ||
|
||||
startsWith( env.RC_RELEASE, false )
|
||||
run: |
|
||||
filename_zip="${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip"
|
||||
sha256="$(shasum --algorithm 256 ${filename_zip} | awk '{ print $1 }')"
|
||||
shasum --algorithm 256 ${filename_zip} > SHA256SUMS.txt
|
||||
|
||||
# get sha1 and sha256 for .zip and .gz files
|
||||
find . -maxdepth 1 \( -name '*.zip' -o -name '*.gz' \) -printf '%P\n' | xargs -r sha1sum | gpg --digest-algo sha256 --clearsign > sha1sum.txt.asc
|
||||
find . -maxdepth 1 \( -name '*.zip' -o -name '*.gz' \) -printf '%P\n' | xargs -r sha256sum | gpg --digest-algo sha256 --clearsign > sha256sum.txt.asc
|
||||
|
||||
# get sha1sum; assign to variable
|
||||
sha1sum="$(shasum --algorithm 1 ${filename_zip} | awk '{ print $1 }')"
|
||||
echo "SHA1SUM=${sha1sum}" >> $GITHUB_ENV
|
||||
|
||||
# get sha256sum; assign to variable
|
||||
sha256sum="$(shasum --algorithm 256 ${filename_zip} | awk '{ print $1 }')"
|
||||
echo "SHA256SUM=${sha256sum}" >> $GITHUB_ENV
|
||||
|
||||
# no longer needed, replaced by find . command
|
||||
# shasum --algorithm 256 ${filename_zip} > SHA256SUMS.txt
|
||||
echo "FILE_ZIP=${filename_zip}" >> $GITHUB_ENV
|
||||
echo "SHA256SUM=${sha256}" >> $GITHUB_ENV
|
||||
|
||||
filename_compose_zip="${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-docker-compose.zip"
|
||||
sha256_compose="$(shasum --algorithm 256 ${filename_compose_zip} | awk '{ print $1 }')"
|
||||
sha256sum_compose="$(shasum --algorithm 256 ${filename_compose_zip} | awk '{ print $1 }')"
|
||||
echo "FILE_COMPOSE_ZIP=${filename_compose_zip}" >> $GITHUB_ENV
|
||||
|
||||
gpg --batch --yes --quiet --armor --detach-sig --sign --output sha256sum.sig sha256sum.txt.asc
|
||||
gpg --batch --yes --quiet --armor --detach-sig --sign --output sha1sum.sig sha1sum.txt.asc
|
||||
|
||||
# #
|
||||
# Release › Checksum › Release Candidate
|
||||
# #
|
||||
|
||||
- name: '🆔 Checksum › RC'
|
||||
- name: '🆔 Checksum › Release Candidate'
|
||||
id: task_release_checksum_rc_set
|
||||
if: ${{ startsWith( inputs.PRERELEASE, true ) }}
|
||||
if: |
|
||||
startsWith( inputs.RC_RELEASE, true ) ||
|
||||
startsWith( env.RC_RELEASE, true )
|
||||
run: |
|
||||
filename_zip="${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}.zip"
|
||||
sha256="$(shasum --algorithm 256 ${filename_zip} | awk '{ print $1 }')"
|
||||
shasum --algorithm 256 ${filename_zip} > SHA256SUMS.txt
|
||||
echo "FILE_ZIP=${filename_zip}" >> $GITHUB_ENV
|
||||
echo "SHA256SUM=${sha256}" >> $GITHUB_ENV
|
||||
filename_zip="${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.RC_VERSION }}.zip"
|
||||
|
||||
filename_compose_zip="${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}-docker-compose.zip"
|
||||
# get sha1 and sha256 for .zip and .gz files
|
||||
find . -maxdepth 1 \( -name '*.zip' -o -name '*.gz' \) -printf '%P\n' | xargs -r sha1sum | gpg --digest-algo sha256 --clearsign > sha1sum.txt.asc
|
||||
find . -maxdepth 1 \( -name '*.zip' -o -name '*.gz' \) -printf '%P\n' | xargs -r sha256sum | gpg --digest-algo sha256 --clearsign > sha256sum.txt.asc
|
||||
|
||||
# get sha1sum; assign to variable
|
||||
sha1sum="$(shasum --algorithm 1 ${filename_zip} | awk '{ print $1 }')"
|
||||
echo "SHA1SUM=${sha1sum}" >> $GITHUB_ENV
|
||||
|
||||
# get sha256sum; assign to variable
|
||||
sha256sum="$(shasum --algorithm 256 ${filename_zip} | awk '{ print $1 }')"
|
||||
echo "SHA256SUM=${sha256sum}" >> $GITHUB_ENV
|
||||
|
||||
# no longer needed, replaced by find . command
|
||||
# shasum --algorithm 256 ${filename_zip} > SHA256SUMS.txt
|
||||
echo "FILE_ZIP=${filename_zip}" >> $GITHUB_ENV
|
||||
|
||||
filename_compose_zip="${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.RC_VERSION }}-docker-compose.zip"
|
||||
sha256_compose="$(shasum --algorithm 256 ${filename_compose_zip} | awk '{ print $1 }')"
|
||||
echo "FILE_COMPOSE_ZIP=${filename_compose_zip}" >> $GITHUB_ENV
|
||||
|
||||
gpg --batch --yes --quiet --armor --detach-sig --sign --output sha256sum.sig sha256sum.txt.asc
|
||||
gpg --batch --yes --quiet --armor --detach-sig --sign --output sha1sum.sig sha1sum.txt.asc
|
||||
|
||||
# #
|
||||
# Release › Checksum › Print
|
||||
# #
|
||||
|
||||
- name: '🆔 Checksum › Print'
|
||||
id: task_release_checksum_st_get
|
||||
run: |
|
||||
echo "${{ env.SHA256SUM }}"
|
||||
echo SHA1SUM ............... ${{ env.SHA1SUM }}
|
||||
echo SHA256SUM ............. ${{ env.SHA256SUM }}
|
||||
|
||||
# #
|
||||
# Release › Contributor Images
|
||||
# #
|
||||
|
||||
- name: '🥸 Contributors › Generate'
|
||||
id: task_release_contribs_generate
|
||||
uses: jaywcjlove/github-action-contributors@main
|
||||
with:
|
||||
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
|
||||
@@ -404,35 +481,16 @@ jobs:
|
||||
avatarSize: 42
|
||||
|
||||
# #
|
||||
# Release › Checksum › Add (Stable)
|
||||
# #
|
||||
|
||||
- name: '📦 Zip › Add Checksum › Stable'
|
||||
id: task_release_zip_st
|
||||
if: ${{ startsWith( inputs.PRERELEASE, false ) }}
|
||||
run: |
|
||||
echo Zipping STABLE Package .zip ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip
|
||||
zip -jr ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip SHA256SUMS.txt
|
||||
ls
|
||||
|
||||
# #
|
||||
# Release › Checksum › Add (Release Candidate)
|
||||
# #
|
||||
|
||||
- name: '📦 Zip › Add Checksum › RC'
|
||||
id: task_release_zip_rc
|
||||
if: ${{ startsWith( inputs.PRERELEASE, true ) }}
|
||||
run: |
|
||||
echo Zipping PRE-RELEASE Package .zip ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}.zip
|
||||
zip -jr ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}.zip SHA256SUMS.txt
|
||||
ls
|
||||
|
||||
# #
|
||||
# Release › Generate Tags
|
||||
# Release › Changelog › Generate Tags
|
||||
#
|
||||
# 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.changelog.outputs.changelog }}
|
||||
# #
|
||||
|
||||
- name: '📝 Changelog › Pre Setup (Categorized Commits)'
|
||||
id: task_release_changelog_categorized_sha_set
|
||||
run: |
|
||||
echo "TAG_LAST=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
||||
echo "COMMIT_LAST=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
||||
@@ -543,14 +601,56 @@ jobs:
|
||||
echo "$CHANGELOG_UNCATEGORIZED"
|
||||
|
||||
# #
|
||||
# Release › List Tree
|
||||
# Release › Verbose › List Tree
|
||||
# #
|
||||
|
||||
- name: '⚙️ Debug › Tree Listing'
|
||||
id: task_release_debug_tree
|
||||
- name: '⚙️ Verbose › Tree Listing'
|
||||
id: task_release_verbose_tree
|
||||
run: |
|
||||
tree
|
||||
|
||||
# #
|
||||
# Release › Verbose › Changelog › Print Categorized
|
||||
# #
|
||||
|
||||
- name: '⚙️ Verbose › Changelog › Categorized'
|
||||
id: task_release_changelog_verbose_categorized
|
||||
if: |
|
||||
startsWith( inputs.SHOW_UNCATEGORIZED, false ) ||
|
||||
startsWith( env.SHOW_UNCATEGORIZED, false )
|
||||
env:
|
||||
CHANGELOG_CATEGORIZED: ${{ steps.task_release_changelog_categorized.outputs.changelog }}
|
||||
CHANGELOG_UNCATEGORIZED: ${{ steps.task_release_changelog_categorized.outputs.changelog }}
|
||||
run: |
|
||||
echo
|
||||
echo "---- CHANGELOG [ Categorized ] -----------------------------------------------"
|
||||
echo
|
||||
echo "$CHANGELOG_CATEGORIZED"
|
||||
echo
|
||||
echo "---- CHANGELOG ---------------------------------------------------------------"
|
||||
echo
|
||||
|
||||
# #
|
||||
# Release › Verbose › Changelog › Print Uncategorized
|
||||
# #
|
||||
|
||||
- name: '⚙️ Verbose › Changelog › Uncategorized'
|
||||
id: task_release_changelog_verbose_uncategorized
|
||||
if: |
|
||||
startsWith( inputs.SHOW_UNCATEGORIZED, true ) ||
|
||||
startsWith( env.SHOW_UNCATEGORIZED, true )
|
||||
env:
|
||||
CHANGELOG_CATEGORIZED: ${{ steps.task_release_changelog_categorized.outputs.changelog }}
|
||||
CHANGELOG_UNCATEGORIZED: ${{ steps.task_release_changelog_categorized.outputs.changelog }}
|
||||
run: |
|
||||
echo
|
||||
echo "---- CHANGELOG [ Uncategorized ] ---------------------------------------------"
|
||||
echo
|
||||
echo "$CHANGELOG_UNCATEGORIZED"
|
||||
echo
|
||||
echo "---- CHANGELOG ---------------------------------------------------------------"
|
||||
echo
|
||||
|
||||
# #
|
||||
# Release › Post Release (Stable)
|
||||
#
|
||||
@@ -563,10 +663,12 @@ jobs:
|
||||
- name: '🏳️ Post › Stable'
|
||||
id: task_release_bundle_st
|
||||
if: |
|
||||
startsWith( inputs.PRERELEASE, false ) ||
|
||||
startsWith( env.PRERELEASE, false )
|
||||
startsWith( inputs.RC_RELEASE, false ) ||
|
||||
startsWith( env.RC_RELEASE, false )
|
||||
uses: softprops/action-gh-release@v2
|
||||
env:
|
||||
CHANGELOG_CATEGORIZED: ${{ steps.task_release_changelog_categorized.outputs.changelog }}
|
||||
CHANGELOG_UNCATEGORIZED: ${{ steps.task_release_changelog_categorized.outputs.changelog }}
|
||||
GITHUB_TOKEN: ${{ secrets.ADMINSERV_TOKEN_CL }}
|
||||
with:
|
||||
token: ${{ secrets.ADMINSERV_TOKEN_CL }}
|
||||
@@ -576,9 +678,12 @@ jobs:
|
||||
draft: false
|
||||
generate_release_notes: false
|
||||
files: |
|
||||
${{ env.PROJECT_NAME }}-v${{ env.PACKAGE_VERSION }}-docker-compose.zip
|
||||
${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-docker-compose.zip
|
||||
${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip
|
||||
SHA256SUMS.txt
|
||||
sha1sum.txt.asc
|
||||
sha256sum.txt.asc
|
||||
sha256sum.sig
|
||||
sha1sum.sig
|
||||
prerelease: false
|
||||
body: |
|
||||
${{ steps.task_release_changelog_categorized.outputs.changelog }}
|
||||
@@ -593,14 +698,16 @@ jobs:
|
||||
# ${{ steps.task_release_bundle_st.outputs.id
|
||||
# #
|
||||
|
||||
- name: "🏳️ Post › Release Candidate"
|
||||
- name: '🏳️ Post › Release Candidate'
|
||||
id: task_release_bundle_rc
|
||||
if: |
|
||||
startsWith( inputs.PRERELEASE, true ) ||
|
||||
startsWith( env.PRERELEASE, true )
|
||||
startsWith( inputs.RC_RELEASE, true ) ||
|
||||
startsWith( env.RC_RELEASE, true )
|
||||
uses: softprops/action-gh-release@v2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.ADMINSERV_TOKEN }}
|
||||
CHANGELOG_CATEGORIZED: ${{ steps.task_release_changelog_categorized.outputs.changelog }}
|
||||
CHANGELOG_UNCATEGORIZED: ${{ steps.task_release_changelog_categorized.outputs.changelog }}
|
||||
GITHUB_TOKEN: ${{ secrets.ADMINSERV_TOKEN_CL }}
|
||||
with:
|
||||
token: ${{ secrets.ADMINSERV_TOKEN }}
|
||||
name: v${{ env.PACKAGE_VERSION }}
|
||||
@@ -609,9 +716,12 @@ jobs:
|
||||
draft: false
|
||||
generate_release_notes: false
|
||||
files: |
|
||||
${{ env.PROJECT_NAME }}-v${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}-docker-compose.zip
|
||||
${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}.zip
|
||||
SHA256SUMS.txt
|
||||
${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.RC_VERSION }}-docker-compose.zip
|
||||
${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.RC_VERSION }}.zip
|
||||
sha1sum.txt.asc
|
||||
sha256sum.txt.asc
|
||||
sha256sum.sig
|
||||
sha1sum.sig
|
||||
prerelease: false
|
||||
body: |
|
||||
> [!WARNING]
|
||||
@@ -655,26 +765,44 @@ jobs:
|
||||
echo "---- CHANGELOG ---------------------------------------------------------------"
|
||||
|
||||
# #
|
||||
# Release › Upload Artifacts › Release Files
|
||||
# Release › Upload Artifacts › Release Files › Stable
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
📋 Upload Artifacts › ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip
|
||||
id: task_release_artifact
|
||||
📋 Upload Artifacts › Stable › ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip
|
||||
id: task_release_artifact_stable
|
||||
uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
if: |
|
||||
startsWith( inputs.RC_RELEASE, false ) ||
|
||||
startsWith( env.RC_RELEASE, false )
|
||||
with:
|
||||
name: "${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}"
|
||||
path: ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip
|
||||
retention-days: 30
|
||||
|
||||
# #
|
||||
# Release › Upload Artifacts › Release Files › Release Candidate
|
||||
# #
|
||||
|
||||
- name: >-
|
||||
📋 Upload Artifacts › RC › ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip
|
||||
id: task_release_artifact_rc
|
||||
uses: actions/upload-artifact@v4
|
||||
if: |
|
||||
startsWith( inputs.RC_RELEASE, true ) ||
|
||||
startsWith( env.RC_RELEASE, true )
|
||||
with:
|
||||
name: "${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.RC_VERSION }}"
|
||||
path: ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.RC_VERSION }}.zip
|
||||
retention-days: 30
|
||||
|
||||
# #
|
||||
# Job › Complete
|
||||
# #
|
||||
|
||||
job-complete:
|
||||
name: >-
|
||||
🆗 Successful Deployment
|
||||
🆗 Successful Deployment
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ job-initialize, job-release ]
|
||||
env:
|
||||
@@ -735,7 +863,7 @@ jobs:
|
||||
echo "This is the main release. It contains all required docker files, and the TVApp2 `package.json`" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| File | Result |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| ------------------------------- | ----------------------- |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| 🏷️ **SHA256** | ${{ env.SHA_STABLE }} |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| 🏷️ **GUID** | ${{ env.GUID }} |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| 🏷️ **UUID** | ${{ env.UUID }} |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| 🏷️ **SHA256** | ${{ env.SHA_STABLE }} |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| 🏷️ **GUID** | ${{ env.GUID }} |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| 🏷️ **UUID** | ${{ env.UUID }} |" >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
|
||||
336
.gitignore
vendored
336
.gitignore
vendored
@@ -1,322 +1,94 @@
|
||||
# #
|
||||
# Dependency directories
|
||||
# #
|
||||
|
||||
node_modules/
|
||||
tvapp2/node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# #
|
||||
# Snowpack dependency directory (https://snowpack.dev/)
|
||||
# #
|
||||
|
||||
web_modules/
|
||||
|
||||
# #
|
||||
# TypeScript cache
|
||||
# #
|
||||
|
||||
\*.tsbuildinfo
|
||||
|
||||
# #
|
||||
# Optional npm cache directory
|
||||
# #
|
||||
|
||||
.npm
|
||||
|
||||
# #
|
||||
# npm files
|
||||
# #
|
||||
|
||||
.npmrc
|
||||
|
||||
# #
|
||||
# Optional eslint cache
|
||||
# #
|
||||
|
||||
.eslintcache
|
||||
|
||||
# #
|
||||
# Optional stylelint cache
|
||||
# #
|
||||
|
||||
.stylelintcache
|
||||
|
||||
# #
|
||||
# Microbundle cache
|
||||
# #
|
||||
|
||||
.rpt2_cache/
|
||||
.rts2_cache_cjs/
|
||||
.rts2_cache_es/
|
||||
.rts2_cache_umd/
|
||||
|
||||
# #
|
||||
# Optional REPL history
|
||||
# #
|
||||
|
||||
.node_repl_history
|
||||
|
||||
# #
|
||||
# Output of 'npm pack'
|
||||
# #
|
||||
|
||||
\*.tgz
|
||||
|
||||
# #
|
||||
# Yarn Integrity file
|
||||
# #
|
||||
|
||||
.yarn-integrity
|
||||
|
||||
# #
|
||||
# Binaries
|
||||
# #
|
||||
|
||||
*.exe
|
||||
*.exe~
|
||||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
|
||||
# #
|
||||
# TVApp2 Specific
|
||||
# #
|
||||
|
||||
*.dat
|
||||
*.xml
|
||||
*.txt
|
||||
|
||||
# #
|
||||
# Test binary
|
||||
# build with `go test -c`
|
||||
# #
|
||||
|
||||
*.test
|
||||
|
||||
# #
|
||||
# Coverage directory used by tools like istanbul
|
||||
# #
|
||||
|
||||
coverage
|
||||
\*.lcov
|
||||
*.out
|
||||
|
||||
# #
|
||||
# nyc test coverage
|
||||
# #
|
||||
|
||||
.nyc_output
|
||||
|
||||
# #
|
||||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||
# #
|
||||
|
||||
.grunt
|
||||
|
||||
# #
|
||||
# Bower dependency directory (https://bower.io/)
|
||||
# #
|
||||
|
||||
bower_components
|
||||
|
||||
# #
|
||||
# node-waf configuration
|
||||
# #
|
||||
|
||||
.lock-wscript
|
||||
|
||||
# #
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
# #
|
||||
|
||||
build/Release
|
||||
|
||||
# #
|
||||
# Dependency directories (remove the comment below to include it)
|
||||
# vendor/
|
||||
# #
|
||||
|
||||
# #
|
||||
# Go workspace file
|
||||
# #
|
||||
|
||||
go.work
|
||||
|
||||
# #
|
||||
# Mac
|
||||
# #
|
||||
|
||||
.DS_STORE
|
||||
|
||||
# #
|
||||
# Visual Studio Code
|
||||
# #
|
||||
|
||||
.vscode/
|
||||
|
||||
# #
|
||||
# Temp folders
|
||||
# #
|
||||
|
||||
.temp/
|
||||
temp/
|
||||
work/
|
||||
|
||||
# #
|
||||
# Python Cache
|
||||
# #
|
||||
|
||||
__pycache__/
|
||||
|
||||
# #
|
||||
# Logs
|
||||
# #
|
||||
|
||||
logs
|
||||
_.log
|
||||
coverage
|
||||
npm-debug.log_
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
lerna-debug.log*
|
||||
temp/
|
||||
work/
|
||||
logs
|
||||
keys
|
||||
tmp
|
||||
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
|
||||
pids
|
||||
lib-cov
|
||||
|
||||
|
||||
_.log
|
||||
_.pid
|
||||
_.seed
|
||||
__pycache__/
|
||||
|
||||
|
||||
\*.tsbuildinfo
|
||||
\*.tgz
|
||||
\*.lcov
|
||||
\*.pid.lock
|
||||
|
||||
|
||||
.npm
|
||||
.npmrc
|
||||
.eslintcache
|
||||
.stylelintcache
|
||||
.rpt2_cache/
|
||||
.rts2_cache_cjs/
|
||||
.rts2_cache_es/
|
||||
.rts2_cache_umd/
|
||||
.node_repl_history
|
||||
.yarn-integrity
|
||||
.DS_STORE
|
||||
|
||||
|
||||
.vscode/
|
||||
.temp/
|
||||
.nyc_output
|
||||
.grunt
|
||||
.lock-wscript
|
||||
.pnpm-debug.log*
|
||||
|
||||
# #
|
||||
# yarn v2
|
||||
# #
|
||||
|
||||
.yarn/cache
|
||||
.yarn/unplugged
|
||||
.yarn/build-state.yml
|
||||
.yarn/install-state.gz
|
||||
.pnp.\*
|
||||
|
||||
# #
|
||||
# wrangler project
|
||||
# #
|
||||
|
||||
.dev.vars
|
||||
.wrangler/
|
||||
|
||||
# #
|
||||
# sources
|
||||
# #
|
||||
|
||||
.src
|
||||
|
||||
# #
|
||||
# dist
|
||||
# #
|
||||
|
||||
.dist
|
||||
|
||||
# #
|
||||
# Private Files
|
||||
# #
|
||||
|
||||
.dev
|
||||
keys
|
||||
|
||||
# #
|
||||
# dotenv environment variable files
|
||||
# #
|
||||
|
||||
.env
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
.env.local
|
||||
|
||||
# #
|
||||
# parcel-bundler cache (https://parceljs.org/)
|
||||
# #
|
||||
|
||||
.cache
|
||||
.parcel-cache
|
||||
|
||||
# #
|
||||
# Next.js build output
|
||||
# #
|
||||
|
||||
.next
|
||||
|
||||
# #
|
||||
# Nuxt.js build / generate output
|
||||
# #
|
||||
|
||||
.nuxt
|
||||
|
||||
# #
|
||||
# vuepress build output
|
||||
# #
|
||||
|
||||
.vuepress/dist
|
||||
|
||||
# #
|
||||
# Docusaurus cache and generated files
|
||||
# #
|
||||
|
||||
.docusaurus
|
||||
|
||||
# #
|
||||
# Serverless directories
|
||||
# #
|
||||
|
||||
.serverless/
|
||||
|
||||
# #
|
||||
# FuseBox cache
|
||||
# #
|
||||
|
||||
.fusebox/
|
||||
|
||||
# #
|
||||
# DynamoDB Local files
|
||||
# #
|
||||
|
||||
.dynamodb/
|
||||
|
||||
# #
|
||||
# TernJS port file
|
||||
# #
|
||||
|
||||
.tern-port
|
||||
|
||||
# #
|
||||
# Gatsby files
|
||||
# #
|
||||
|
||||
.cache/
|
||||
|
||||
# #
|
||||
# Misc
|
||||
# #
|
||||
|
||||
tmp
|
||||
*.user
|
||||
|
||||
# #
|
||||
# Python files
|
||||
# #
|
||||
|
||||
.opt-*
|
||||
|
||||
# #
|
||||
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||
# #
|
||||
|
||||
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
|
||||
|
||||
# #
|
||||
# Runtime data
|
||||
# #
|
||||
|
||||
pids
|
||||
_.pid
|
||||
_.seed
|
||||
\*.pid.lock
|
||||
|
||||
# #
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
# #
|
||||
|
||||
lib-cov
|
||||
*.user
|
||||
*.exe
|
||||
*.exe~
|
||||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
*c*de*
|
||||
*.dat
|
||||
*.xml
|
||||
*.txt
|
||||
*.test
|
||||
*.out
|
||||
|
||||
@@ -169,17 +169,17 @@ Our repositories make use of the following commit tags:
|
||||
|
||||
| Type | Description |
|
||||
| --- | --- |
|
||||
| `feat` | <sup><sub>Introduce new feature</sub></sup> |
|
||||
| `fix` | <sup><sub>Bug fix</sub></sup> |
|
||||
| `chore` | <sup><sub>Includes technical or preventative maintenance task that is necessary for managing the app or repo, such as updating grunt tasks, but is not tied to any specific feature. Usually done for maintenance purposes.<br/>E.g: Edit .gitignore, .prettierrc, .prettierignore, .gitignore, eslint.config.js file</sub></sup> |
|
||||
| `revert` | <sup><sub>Revert a previous commit</sub></sup> |
|
||||
| `style` | <sup><sub>Update / reformat style of source code. Does not change the way app is implemented. Changes that do not affect the meaning of the code<br />E.g: white-space, formatting, missing semi-colons, change tabs to spaces, etc)</sub></sup> |
|
||||
| `docs` | <sup><sub>Change website or markdown documents. Does not mean changes to the documentation generator script itself, only the documents created from the generator. <br/>E.g: documentation, readme.md or markdown |
|
||||
| `build` | <sup><sub>Changes to the build / compilation / packaging process or auxiliary tools such as doc generation<br />E.g: create new build tasks, update release script, etc.</sub></sup> |
|
||||
| `refactor` | <sup><sub>Change to production code that leads to no behavior difference,<br/>E.g: split files, rename variables, rename package, improve code style, etc.</sub></sup> |
|
||||
| `test` | <sup><sub>Add or refactor tests, no production code change. Changes the suite of automated tests for the app.</sub></sup> |
|
||||
| `ci` | <sup><sub>Changes related to Continuous Integration (usually `yml` and other configuration files).</sub></sup> |
|
||||
| `perf` | <sup><sub>Performance improvement of algorithms or execution time of the app. Does not change an existing feature.</sub></sup> |
|
||||
| `feat` | Introduce new feature |
|
||||
| `fix` | Bug fix |
|
||||
| `chore` | Includes technical or preventative maintenance task that is necessary for managing the app or repo, such as updating grunt tasks, but is not tied to any specific feature. Usually done for maintenance purposes.<br/>E.g: Edit .gitignore, .prettierrc, .prettierignore, .gitignore, eslint.config.js file |
|
||||
| `revert` | Revert a previous commit |
|
||||
| `style` | Update / reformat style of source code. Does not change the way app is implemented. Changes that do not affect the meaning of the code<br />E.g: white-space, formatting, missing semi-colons, change tabs to spaces, etc) |
|
||||
| `docs` | Change website or markdown documents. Does not mean changes to the documentation generator script itself, only the documents created from the generator. <br/>E.g: documentation, readme.md or markdown |
|
||||
| `build` | Changes to the build / compilation / packaging process or auxiliary tools such as doc generation<br />E.g: create new build tasks, update release script, etc. |
|
||||
| `refactor` | Change to production code that leads to no behavior difference,<br/>E.g: split files, rename variables, rename package, improve code style, etc. |
|
||||
| `test` | Add or refactor tests, no production code change. Changes the suite of automated tests for the app. |
|
||||
| `ci` | Changes related to Continuous Integration (usually `yml` and other configuration files). |
|
||||
| `perf` | Performance improvement of algorithms or execution time of the app. Does not change an existing feature. |
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
134
Dockerfile
134
Dockerfile
@@ -1,134 +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
|
||||
# @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
|
||||
# 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
|
||||
# #
|
||||
|
||||
ARG ARCH=amd64
|
||||
ARG BUILDDATE
|
||||
ARG VERSION
|
||||
|
||||
# #
|
||||
# Set Labels
|
||||
# #
|
||||
|
||||
LABEL org.opencontainers.image.authors="Aetherinox, iFlip721, Optx"
|
||||
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://thebinaryninja.github.io/tvapp2"
|
||||
LABEL org.opencontainers.image.url="https://github.com/thebinaryninja/tvapp2/pkgs/container/tvapp2"
|
||||
LABEL org.opencontainers.image.licenses="MIT"
|
||||
LABEL org.opencontainers.image.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
|
||||
# #
|
||||
|
||||
ENV NODE_VERSION=22.8.0
|
||||
ENV YARN_VERSION=1.22.22
|
||||
ENV DIR_BUILD=/usr/src/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_URL="urls.txt"
|
||||
ENV FILE_M3U="playlist.m3u8"
|
||||
ENV FILE_EPG="xmltv.xml"
|
||||
ENV FILE_TAR="xmltv.xml.gz"
|
||||
ENV LOG_LEVEL=4
|
||||
ENV TZ="Etc/UTC"
|
||||
|
||||
# #
|
||||
# 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"]
|
||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025 BinaryNinja
|
||||
Copyright (c) 2025-2026 BinaryNinja
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
498
README.md
498
README.md
@@ -7,7 +7,7 @@
|
||||
|
||||
<div align="center">
|
||||
|
||||
<img src="docs/img/screenshots/01.png" height="320">
|
||||
<img src="docs/img/screenshots/01.gif" height="450">
|
||||
|
||||
<br />
|
||||
<br />
|
||||
@@ -69,6 +69,11 @@
|
||||
- [Docker Compose](#docker-compose-1)
|
||||
- [Environment Variables](#environment-variables-1)
|
||||
- [Mountable Volumes](#mountable-volumes-1)
|
||||
- [Docker health check](#docker-health-check)
|
||||
- [Logging](#logging)
|
||||
- [Trace (7)](#trace-7)
|
||||
- [Verbose (6)](#verbose-6)
|
||||
- [Debug (5)](#debug-5)
|
||||
- [Traefik Integration](#traefik-integration)
|
||||
- [Labels](#labels)
|
||||
- [Dynamic.yml](#dynamicyml)
|
||||
@@ -81,9 +86,11 @@
|
||||
- [Labels](#labels-1)
|
||||
- [Dynamic.yml](#dynamicyml-1)
|
||||
- [Troubleshooting](#troubleshooting)
|
||||
- [Run Error: `Error serving playlist: ENOENT: no such file or directory, open /usr/src/app/xmltv.1.xml`](#run-error-error-serving-playlist-enoent-no-such-file-or-directory-open-usrsrcappxmltv1xml)
|
||||
- [Build Error: `s6-rc-compile: fatal: invalid /etc/s6-overlay/s6-rc.d/certsync/type: must be oneshot, longrun, or bundle`](#build-error-s6-rc-compile-fatal-invalid-etcs6-overlays6-rcdcertsynctype-must-be-oneshot-longrun-or-bundle)
|
||||
- [Build Error: `unable to exec /etc/s6-overlay/s6-rc.d/init-envfile/run: Permission denied`](#build-error-unable-to-exec-etcs6-overlays6-rcdinit-envfilerun-permission-denied)
|
||||
- [Run Error: `Warning: Step size 60 higher than possible maximum of 59`](#run-error-warning-step-size-60-higher-than-possible-maximum-of-59)
|
||||
- [Run Error: `Error serving playlist: ENOENT: no such file or directory, open /usr/src/app/xmltv.1.xml`](#run-error-error-serving-playlist-enoent-no-such-file-or-directory-open-usrsrcappxmltv1xml)
|
||||
- [Build Error: `s6-rc-compile: fatal: invalid /etc/s6-overlay/s6-rc.d/certsync/type: must be oneshot, longrun, or bundle`](#build-error-s6-rc-compile-fatal-invalid-etcs6-overlays6-rcdcertsynctype-must-be-oneshot-longrun-or-bundle)
|
||||
- [Build Error: `unable to exec /etc/s6-overlay/s6-rc.d/init-envfile/run: Permission denied`](#build-error-unable-to-exec-etcs6-overlays6-rcdinit-envfilerun-permission-denied)
|
||||
- [Build Error: `[ERR] [27] Jellyfin.LiveTv.Guide.GuideManager: Error getting programs for channel XXXXXXXXXXXXXXX (Source 2) System.Xml.XmlException: '', hexadecimal value 0x1F, is an invalid character. Line 1, position 1.`](#build-error-err-27-jellyfinlivetvguideguidemanager-error-getting-programs-for-channel-xxxxxxxxxxxxxxx-source-2-systemxmlxmlexception--hexadecimal-value-0x1f-is-an-invalid-character-line-1-position-1)
|
||||
- [Extra Notes](#extra-notes)
|
||||
- [Accessing Container Shell](#accessing-container-shell)
|
||||
- [ash](#ash)
|
||||
@@ -112,6 +119,7 @@
|
||||
|
||||
This project contains several repositories which all share the same code; use them as backups:
|
||||
|
||||
- [🔀 dockerhub:thebinaryninja/tvapp2](https://hub.docker.com/r/thebinaryninja/tvapp2)
|
||||
- [🔀 github:thebinaryninja/tvapp2](https://github.com/thebinaryninja/tvapp2)
|
||||
- [🔀 gitea:git.binaryninja.net/binaryninja/tvapp2](https://git.binaryninja.net/binaryninja/tvapp2)
|
||||
|
||||
@@ -147,20 +155,47 @@ For the [environment variables](#environment-variables), you may specify these i
|
||||
|
||||
#### Environment Variables
|
||||
|
||||
The following is a list of environment variables you can declare within your `docker-compose.yml` or docker run command:
|
||||
|
||||
<br />
|
||||
|
||||
> [!CAUTION]
|
||||
> Do **not** add `"` quotation marks to environment variables.
|
||||
>
|
||||
> ✔️ Correct
|
||||
> ```yml
|
||||
> environment:
|
||||
> - TASK_CRON_SYNC=*/60 * * * *
|
||||
> ```
|
||||
>
|
||||
> ❌ Incorrect
|
||||
> ```yml
|
||||
> environment:
|
||||
> - TASK_CRON_SYNC="*/60 * * * *"
|
||||
> ```
|
||||
|
||||
<br />
|
||||
|
||||
| Env Var | Default | Description |
|
||||
| --- | --- | --- |
|
||||
| `TZ` | `Etc/UTC` | Timezone for error / log reporting |
|
||||
| `WEB_IP` | `0.0.0.0` | IP to use for webserver |
|
||||
| `WEB_PORT` | `4124` | Port to use for webserver |
|
||||
| `WEB_FOLDER` | `www` | Internal container folder to keep TVApp2 web files in. <br /><br /> <sup>⚠️ This should not be used unless you know what you're doing</sup> |
|
||||
| `WEB_ENCODING` | `deflate, br` | Defines the HTTP `Accept-Encoding` request and response header. This value specifies what content encoding the sender can understand<br /><br />Gzip compression can be enabled by specifying `'gzip, deflate, br'`, however, [it may break Jellyfin users](#build-error-err-27-jellyfinlivetvguideguidemanager-error-getting-programs-for-channel-xxxxxxxxxxxxxxx-source-2-systemxmlxmlexception--hexadecimal-value-0x1f-is-an-invalid-character-line-1-position-1). |
|
||||
| `WEB_PROXY_HEADER` | `x-forwarded-for` | Defines the header to look for when finding a client's IP address. Used to get a client's IP when behind a reverse proxy or Cloudflare |
|
||||
| `HDHR_PORT` | `6077` | HDHomeRun server default listening port |
|
||||
| `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_URL` | `urls.txt` | Filename for url cache file |
|
||||
| `FILE_URL` | `urls.txt` | Filename for `urls.txt` cache file |
|
||||
| `FILE_M3U` | `playlist.m3u8` | Filename for M3U playlist file |
|
||||
| `FILE_EPG` | `xmltv.xml` | Filename for XML guide data file |
|
||||
| `FILE_GZIP` | `xmltv.xml.gz` | Filename for XML compressed as gzip .gz |
|
||||
| `FILE_GZP` | `xmltv.xml.gz` | Filename for XML compressed as gzip .gz |
|
||||
| `STREAM_QUALITY` | `hd` | Stream quality<br />Can be either `hd` or `sd` |
|
||||
| `TASK_CRON_SYNC` | `0 0 */3 * *` | Defines how often to refresh the M3U and XML IPTV data |
|
||||
| `HEALTH_TIMER` | `600000` | How often (in milliseconds) to run a health check |
|
||||
| `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> |
|
||||
| `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> |
|
||||
| `LOG_LEVEL` | `4` | Level of logging to display in console<br/>`7` Trace <sup><sub>& below</sub></sup><br />`6` Verbose <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 />
|
||||
@@ -206,7 +241,7 @@ docker run -d --restart=unless-stopped \
|
||||
|
||||
If you want to use a `📄 docker-compose.yml` to bring TVApp2 up; you may use the following example:
|
||||
|
||||
```yml ignore
|
||||
```yml
|
||||
services:
|
||||
tvapp2:
|
||||
container_name: tvapp2
|
||||
@@ -309,7 +344,7 @@ subgraph GRAPH_TVAPP ["Build tvapp2:latest"]
|
||||
Dockerfile.aarch64**`"]
|
||||
obj_step12["`> docker build \
|
||||
--build-arg VERSION=1.0.0 \
|
||||
--build-arg BUILDDATE=20250225 \
|
||||
--build-arg BUILDDATE=20260812 \
|
||||
-t tvapp:latest \
|
||||
-t tvapp:1.0.0-amd64 \
|
||||
-f Dockerfile . \`"]
|
||||
@@ -331,7 +366,7 @@ direction TB
|
||||
Dockerfile.aarch64**`"]
|
||||
obj_step22["`> docker build \
|
||||
--build-arg VERSION=3.20 \
|
||||
--build-arg BUILDDATE=20250225 \
|
||||
--build-arg BUILDDATE=20260812 \
|
||||
-t docker-alpine-base:latest \
|
||||
-t docker-alpine-base:3.20-amd64 \
|
||||
-f Dockerfile . \`"]
|
||||
@@ -356,7 +391,7 @@ This repository offers two types of docker image; `stable` and `development`. Yo
|
||||
|
||||
| Build | Tags |
|
||||
| ------------------------- | ----------------------------------------------------------------------------- |
|
||||
| `Stable` | `🔖 tvapp2:latest` <br /> `🔖 tvapp2:1.1.0` <br /> `🔖 tvapp2:1.1` <br /> `🔖 tvapp2:1` |
|
||||
| `Stable` | `🔖 tvapp2:latest` <br /> `🔖 tvapp2:1.5.4` <br /> `🔖 tvapp2:1.5` <br /> `🔖 tvapp2:1` |
|
||||
| `Development` | `🔖 tvapp2:development` |
|
||||
|
||||
<br />
|
||||
@@ -370,7 +405,7 @@ Prior to building the docker image, you **must** ensure the sections below are
|
||||
|
||||
<br />
|
||||
|
||||
If the listed tasks above are not performed, your docker container will throw the following errors when started:
|
||||
If the listed tasks above are not performed, your docker container will throw the following errors when started:
|
||||
|
||||
- `Failed to open apk database: Permission denied`
|
||||
- `s6-rc: warning: unable to start service init-adduser: command exited 127`
|
||||
@@ -378,39 +413,87 @@ Prior to building the docker image, you **must** ensure the sections below are
|
||||
- `/etc/s6-overlay/s6-rc.d/init-adduser/run: line 34: aetherxown: command not found`
|
||||
- `/etc/s6-overlay/s6-rc.d/init-adduser/run: /usr/bin/aetherxown: cannot execute: required file not found`
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
#### LF over CRLF
|
||||
|
||||
You cannot utilize Windows' `Carriage Return Line Feed`. All files must be converted to Unix' `Line Feed`. This can be done with **[Visual Studio Code](https://code.visualstudio.com/)**. OR; you can run the Linux terminal command `🗔 dos2unix` to convert these files.
|
||||
|
||||
If you cloned the files from the official repository [🔆 gitea:binaryninja/tvapp2](https://git.binaryninja.net/binaryninja/tvapp2) and have not edited them, then you should not need to do this step.
|
||||
For the branches **[docker/alpine-base](https://github.com/Aetherinox/docker-base-alpine/tree/docker/alpine-base)** and your main app image, you can use the following recursive commands:
|
||||
|
||||
<br />
|
||||
|
||||
> [!CAUTION]
|
||||
> Be careful using the command to change **ALL** files. You should **NOT** change the files in your `📁 .git` folder, otherwise you will corrupt your git indexes.
|
||||
>
|
||||
> If you accidentally run `🗔 dos2unix` on your `📁 .git` folder, do NOT push anything to git. Pull a new copy from the repo.
|
||||
> If you accidentally run `🗔 dos2unix` on your `📁 .git` folder, do NOT push anything to git. Pull a new copy from the repo or reset your local files back to the remote:
|
||||
>
|
||||
> ```shell
|
||||
> git reset --hard origin/main
|
||||
> ```
|
||||
|
||||
<br />
|
||||
|
||||
```shell
|
||||
# Change ALL files
|
||||
find ./ -type f | grep -Ev '.git|*.jpg|*.jpeg|*.png' | xargs dos2unix --
|
||||
find ./ -type f | grep -Ev 'docs|node_modules|.git|*.jpg|*.jpeg|*.png' | xargs dos2unix --
|
||||
|
||||
# Change run / binaries
|
||||
find ./ -type f -name 'run' | xargs dos2unix --
|
||||
find ./ -type f -name 'run' -print | xargs dos2unix --
|
||||
```
|
||||
|
||||
<br />
|
||||
|
||||
#### Set `+x / 0755` Permissions
|
||||
|
||||
The files contained within this repo **MUST** have `chmod 755` / `+x` executable permissions.
|
||||
For the branch **[docker/core](https://github.com/Aetherinox/docker-base-alpine/tree/docker/core)**, you can use the following commands:
|
||||
|
||||
```shell
|
||||
find ./ -name 'run' -exec sudo chmod +x {} \;
|
||||
dos2unix docker-images.v3
|
||||
dos2unix aetherxown.v1
|
||||
dos2unix package-install.v1
|
||||
dos2unix with-contenv.v1
|
||||
```
|
||||
|
||||
<br />
|
||||
|
||||
If you do not have dos2unix; you may use `sed:
|
||||
|
||||
```shell
|
||||
sed -i 's/\r$//' /etc/s6-overlay/s6-rc.d/ci-service-check/file
|
||||
```
|
||||
|
||||
<br />
|
||||
|
||||
You may pre-check if a file is using Windows CRLF or Linux LF by running the command `file <filename>` on the file:
|
||||
|
||||
```shell
|
||||
$ file ./root//etc/s6-overlay/s6-rc.d/ci-service-check/type
|
||||
./root//etc/s6-overlay/s6-rc.d/ci-service-check/type: ASCII text
|
||||
```
|
||||
|
||||
<br />
|
||||
|
||||
You will get one of three messages listed below:
|
||||
|
||||
1. ASCII text, with CRLF, LF line terminators
|
||||
2. ASCII text, with CRLF line terminators
|
||||
3. ASCII text
|
||||
|
||||
<br />
|
||||
|
||||
If you get messages `1` or `2`, then you need to run `dos2unix` on the file; otherwise when you bring the container up, you will get errors.
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
#### Set `+x / 0755` Permissions
|
||||
|
||||
The files contained within this repo **MUST** have `chmod 755` / `+x` executable permissions. If you are using our Github workflow sample **[deploy-docker-github.yml](https://github.com/Aetherinox/docker-base-alpine/blob/workflows/samples/deploy-docker-github.yml)**, this is done automatically. If you are building the images manually; you need to do this. Ensure those files have the correct permissions prior to building the Alpine base docker image.
|
||||
|
||||
If you are building the **[docker/alpine-base](https://github.com/Aetherinox/docker-base-alpine/tree/docker/alpine-base)** or your main application images, you must ensure the files in those branches have the proper permissions. All of the executable files are named `run`:
|
||||
|
||||
```shell
|
||||
find ./ -name 'run' -print -exec sudo chmod +x {} \;
|
||||
```
|
||||
|
||||
<br />
|
||||
@@ -428,22 +511,38 @@ sudo chmod +x ./root/etc/s6-overlay/s6-rc.d/init-adduser/run \
|
||||
./root/etc/s6-overlay/s6-rc.d/init-permissions/run \
|
||||
./root/etc/s6-overlay/s6-rc.d/init-samples/run \
|
||||
./root/etc/s6-overlay/s6-rc.d/init-version-checks/run \
|
||||
./root/etc/s6-overlay/s6-rc.d/svc-cron/run
|
||||
./root/etc/s6-overlay/s6-rc.d/svc-cron/run \
|
||||
./root/etc/s6-overlay/s6-rc.d/svc-php-fpm/run \
|
||||
./root/etc/s6-overlay/s6-rc.d/svc-nginx/run \
|
||||
./root/etc/s6-overlay/s6-rc.d/init-php/run \
|
||||
./root/etc/s6-overlay/s6-rc.d/init-nginx/run
|
||||
```
|
||||
|
||||
<br />
|
||||
|
||||
For the branch **[docker/core](https://github.com/Aetherinox/docker-base-alpine/tree/docker/core)**, there are a few files to change. The ending version number may change, but the commands to change the permissions are as follows:
|
||||
|
||||
```shell
|
||||
sudo chmod +x docker-images.v3 \
|
||||
chmod +x aetherxown.v1 \
|
||||
chmod +x package-install.v1 \
|
||||
chmod +x with-contenv.v1
|
||||
```
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
### Build Images
|
||||
|
||||
After completing the steps above; we will now build the [🔆 gitea:binaryninja/tvapp2](https://git.binaryninja.net/binaryninja/tvapp2) image.
|
||||
|
||||
<br />
|
||||
|
||||
Before you build the TVApp2 image; open the `📄 Dockerfile` and ensure you are pulling the correct Alpine base image. This instruction is located near the top of the `📄 Dockerfile`:
|
||||
Open the `📄 Dockerfile` and ensure you are pulling the correct Alpine base image. This code is located near the top of the `📄 Dockerfile`:
|
||||
|
||||
```dockerfile
|
||||
ARG ARCH=amd64
|
||||
FROM --platform=linux/${ARCH} ghcr.io/aetherinox/alpine-base:3.21
|
||||
FROM --platform=linux/${ARCH} ghcr.io/aetherinox/alpine-base:3.22
|
||||
```
|
||||
|
||||
<br />
|
||||
@@ -472,7 +571,7 @@ All of the needed Docker files already exist in the repository. To get started,
|
||||
mkdir tvapp2 && cd tvapp2
|
||||
|
||||
# to clone from our gitea website
|
||||
git clone https://git.binaryninja.net/binarynina/tvapp2.git ./
|
||||
git clone https://git.binaryninja.net/binaryninja/tvapp2.git ./
|
||||
|
||||
# to clone from our github website
|
||||
git clone https://github.com/thebinaryninja/tvapp2.git ./
|
||||
@@ -535,7 +634,7 @@ Waiting for authentication in the browser…
|
||||
|
||||
<br />
|
||||
|
||||
Once you are finished in your browser, you can return to your Linux terminal, and it should bring you back to where you can type a command. You can now verify again if you are signed in:
|
||||
Once finished in your browser, return to your Linux terminal, and it should bring you back to where you can type a command. You can now verify again if you are signed in:
|
||||
|
||||
```shell
|
||||
docker info | grep Username
|
||||
@@ -563,17 +662,20 @@ Creates the TVApp2 `amd64` docker image:
|
||||
# Build tvapp2 amd64
|
||||
docker buildx build \
|
||||
--build-arg ARCH=amd64 \
|
||||
--build-arg VERSION=1.1.0 \
|
||||
--build-arg BUILDDATE=20250325 \
|
||||
--tag ghcr.io/thebinaryninja/tvapp2:1.1.0 \
|
||||
--tag ghcr.io/thebinaryninja/tvapp2:1.1 \
|
||||
--build-arg VERSION=1.5.4 \
|
||||
--build-arg BUILDDATE=20260812 \
|
||||
--build-arg RELEASE=stable \
|
||||
--build-arg ALPINE_VERSION=3.22 \
|
||||
--tag ghcr.io/thebinaryninja/tvapp2:1.5.4 \
|
||||
--tag ghcr.io/thebinaryninja/tvapp2:1.5 \
|
||||
--tag ghcr.io/thebinaryninja/tvapp2:1 \
|
||||
--tag ghcr.io/thebinaryninja/tvapp2:latest \
|
||||
--attest type=provenance,disabled=true \
|
||||
--attest type=sbom,disabled=true \
|
||||
--output type=docker \
|
||||
--builder default \
|
||||
--file Dockerfile \
|
||||
--platform linux/amd64 \
|
||||
--output type=docker \
|
||||
--allow network.host \
|
||||
--network host \
|
||||
--no-cache \
|
||||
@@ -591,17 +693,20 @@ Creates the TVApp2 `arm64` docker image:
|
||||
# Build tvapp2 arm64
|
||||
docker buildx build \
|
||||
--build-arg ARCH=arm64 \
|
||||
--build-arg VERSION=1.1.0 \
|
||||
--build-arg BUILDDATE=20250325 \
|
||||
--tag ghcr.io/thebinaryninja/tvapp2:1.1.0 \
|
||||
--tag ghcr.io/thebinaryninja/tvapp2:1.1 \
|
||||
--build-arg VERSION=1.5.4 \
|
||||
--build-arg BUILDDATE=20260812 \
|
||||
--build-arg RELEASE=stable \
|
||||
--build-arg ALPINE_VERSION=3.22 \
|
||||
--tag ghcr.io/thebinaryninja/tvapp2:1.5.4 \
|
||||
--tag ghcr.io/thebinaryninja/tvapp2:1.5 \
|
||||
--tag ghcr.io/thebinaryninja/tvapp2:1 \
|
||||
--tag ghcr.io/thebinaryninja/tvapp2:latest \
|
||||
--attest type=provenance,disabled=true \
|
||||
--attest type=sbom,disabled=true \
|
||||
--output type=docker \
|
||||
--builder default \
|
||||
--file Dockerfile \
|
||||
--platform linux/arm64 \
|
||||
--output type=docker \
|
||||
--allow network.host \
|
||||
--network host \
|
||||
--no-cache \
|
||||
@@ -634,7 +739,7 @@ All of the needed Docker files already exist in the repository. To get started,
|
||||
mkdir tvapp2 && cd tvapp2
|
||||
|
||||
# to clone from our gitea website
|
||||
git clone https://git.binaryninja.net/binarynina/tvapp2.git ./
|
||||
git clone https://git.binaryninja.net/binaryninja/tvapp2.git ./
|
||||
|
||||
# to clone from our github website
|
||||
git clone https://github.com/thebinaryninja/tvapp2.git ./
|
||||
@@ -713,7 +818,7 @@ You should see your name:
|
||||
|
||||
<br />
|
||||
|
||||
Next, in order to build the `amd64` and `arm64` images on the same machine; you must install **QEMU** using:
|
||||
Next, in order to build the `amd64` and `arm64` images on the same machine; you must install **QEMU** which is an emulator. Open your terminal and run the following command:
|
||||
|
||||
```shell
|
||||
docker run --privileged --rm tonistiigi/binfmt --install all
|
||||
@@ -721,10 +826,20 @@ docker run --privileged --rm tonistiigi/binfmt --install all
|
||||
|
||||
<br />
|
||||
|
||||
If you are building these docker images using Github workflow, you will also need to use `QEMU` with the following action:
|
||||
|
||||
```yml
|
||||
- name: '⚙️ Set up QEMU'
|
||||
id: task_release_gh_qemu
|
||||
uses: docker/setup-qemu-action@v3
|
||||
```
|
||||
|
||||
<br />
|
||||
|
||||
Once the emulator is installed; we will now build two images. When building these two images; we will ensure the `--tag` value is different for each one, by adding the architecture to the end. This ensures we don't overwrite one image with the newer one. We need to have two seperate docker images with two different tags.
|
||||
|
||||
- `--tag ghcr.io/thebinaryninja/tvapp2:1.1.0-amd64`
|
||||
- `--tag ghcr.io/thebinaryninja/tvapp2:1.1.0-arm64`
|
||||
- `--tag ghcr.io/thebinaryninja/tvapp2:1.5.4-amd64`
|
||||
- `--tag ghcr.io/thebinaryninja/tvapp2:1.5.4-arm64`
|
||||
|
||||
<br />
|
||||
|
||||
@@ -735,14 +850,14 @@ Once the emulator is installed; we will now build two images. When building thes
|
||||
>
|
||||
> | Registry | Tag |
|
||||
> | --- | --- |
|
||||
> | Dockerhub | `--tag thebinaryninja/tvapp2:1.1.0-amd64`<br>`--tag thebinaryninja/tvapp2:1.1.0-arm64` |
|
||||
> | Github (GHCR) | `--tag ghcr.io/thebinaryninja/tvapp2:1.1.0-amd64`<br>`--tag ghcr.io/thebinaryninja/tvapp2:1.1.0-arm64` |
|
||||
> | Registry v2 | `--tag registry.domain.lan/thebinaryninja/tvapp2:1.1.0-amd64`<br>`--tag registry.domain.lan/thebinaryninja/tvapp2:1.1.0-arm64` |
|
||||
> | Gitea | `--tag git.binaryninja.net/binaryninja/tvapp2:1.1.0-amd64`<br>`--tag git.binaryninja.net/binaryninja/tvapp2:1.1.0-arm64` |
|
||||
> | Dockerhub | `--tag thebinaryninja/tvapp2:1.5.4-amd64`<br>`--tag thebinaryninja/tvapp2:1.5.4-arm64` |
|
||||
> | Github (GHCR) | `--tag ghcr.io/thebinaryninja/tvapp2:1.5.4-amd64`<br>`--tag ghcr.io/thebinaryninja/tvapp2:1.5.4-arm64` |
|
||||
> | Registry v2 | `--tag registry.domain.lan/thebinaryninja/tvapp2:1.5.4-amd64`<br>`--tag registry.domain.lan/thebinaryninja/tvapp2:1.5.4-arm64` |
|
||||
> | Gitea | `--tag git.binaryninja.net/binaryninja/tvapp2:1.5.4-amd64`<br>`--tag git.binaryninja.net/binaryninja/tvapp2:1.5.4-arm64` |
|
||||
|
||||
<br />
|
||||
|
||||
After we built these two images and push them to a registry online, we will merge them into a single docker image which contains both arcitectures.
|
||||
After we build these two images and push them to a registry online; merge them into a single docker image which contains both arcitectures.
|
||||
|
||||
<br />
|
||||
|
||||
@@ -759,14 +874,17 @@ Creates the TVApp2 **Stable** release `amd64` docker image:
|
||||
# Build Tvapp2 amd64 - (stable release)
|
||||
docker buildx build \
|
||||
--build-arg ARCH=amd64 \
|
||||
--build-arg VERSION=1.1.0 \
|
||||
--build-arg BUILDDATE=20250325 \
|
||||
--tag ghcr.io/thebinaryninja/tvapp2:1.1.0-amd64 \
|
||||
--build-arg VERSION=1.5.4 \
|
||||
--build-arg BUILDDATE=20260812 \
|
||||
--build-arg RELEASE=stable \
|
||||
--build-arg ALPINE_VERSION=3.22 \
|
||||
--tag ghcr.io/thebinaryninja/tvapp2:1.5.4-amd64 \
|
||||
--attest type=provenance,disabled=true \
|
||||
--attest type=sbom,disabled=true \
|
||||
--output type=docker \
|
||||
--builder default \
|
||||
--file Dockerfile \
|
||||
--platform linux/amd64 \
|
||||
--output type=docker \
|
||||
--allow network.host \
|
||||
--network host \
|
||||
--no-cache \
|
||||
@@ -785,14 +903,17 @@ Creates the TVApp2 **Stable** release `arm64` docker image:
|
||||
# Build Tvapp2 arm64 - (stable release)
|
||||
docker buildx build \
|
||||
--build-arg ARCH=arm64 \
|
||||
--build-arg VERSION=1.1.0 \
|
||||
--build-arg BUILDDATE=20250325 \
|
||||
--tag ghcr.io/thebinaryninja/tvapp2:1.1.0-arm64 \
|
||||
--build-arg VERSION=1.5.4 \
|
||||
--build-arg BUILDDATE=20260812 \
|
||||
--build-arg RELEASE=stable \
|
||||
--build-arg ALPINE_VERSION=3.22 \
|
||||
--tag ghcr.io/thebinaryninja/tvapp2:1.5.4-arm64 \
|
||||
--attest type=provenance,disabled=true \
|
||||
--attest type=sbom,disabled=true \
|
||||
--output type=docker \
|
||||
--builder default \
|
||||
--file Dockerfile \
|
||||
--platform linux/arm64 \
|
||||
--output type=docker \
|
||||
--allow network.host \
|
||||
--network host \
|
||||
--no-cache \
|
||||
@@ -811,14 +932,17 @@ Creates the TVApp2 **Development** release `amd64` docker image:
|
||||
# Build Tvapp2 amd64 - (development release)
|
||||
docker buildx build \
|
||||
--build-arg ARCH=amd64 \
|
||||
--build-arg VERSION=1.1.0 \
|
||||
--build-arg BUILDDATE=20250325 \
|
||||
--build-arg VERSION=1.5.4 \
|
||||
--build-arg BUILDDATE=20260812 \
|
||||
--build-arg RELEASE=development \
|
||||
--build-arg ALPINE_VERSION=3.22 \
|
||||
--tag ghcr.io/thebinaryninja/tvapp2:development-amd64 \
|
||||
--attest type=provenance,disabled=true \
|
||||
--attest type=sbom,disabled=true \
|
||||
--output type=docker \
|
||||
--builder default \
|
||||
--file Dockerfile \
|
||||
--platform linux/amd64 \
|
||||
--output type=docker \
|
||||
--allow network.host \
|
||||
--network host \
|
||||
--no-cache \
|
||||
@@ -837,14 +961,17 @@ Creates the TVApp2 **Development** release `arm64` docker image:
|
||||
# Build Tvapp2 arm64 - (development release)
|
||||
docker buildx build \
|
||||
--build-arg ARCH=arm64 \
|
||||
--build-arg VERSION=1.1.0 \
|
||||
--build-arg BUILDDATE=20250325 \
|
||||
--build-arg VERSION=1.5.4 \
|
||||
--build-arg BUILDDATE=20260812 \
|
||||
--build-arg RELEASE=development \
|
||||
--build-arg ALPINE_VERSION=3.22 \
|
||||
--tag ghcr.io/thebinaryninja/tvapp2:development-arm64 \
|
||||
--attest type=provenance,disabled=true \
|
||||
--attest type=sbom,disabled=true \
|
||||
--output type=docker \
|
||||
--builder default \
|
||||
--file Dockerfile \
|
||||
--platform linux/arm64 \
|
||||
--output type=docker \
|
||||
--allow network.host \
|
||||
--network host \
|
||||
--no-cache \
|
||||
@@ -857,14 +984,14 @@ docker buildx build \
|
||||
|
||||
After completing the `docker buildx` commands above; you should now have a few new images. Each image should have its own separate docker tags which do not conflict. If you decided to not build the **development** releases below; that is fine.
|
||||
|
||||
- `--tag ghcr.io/thebinaryninja/tvapp2:1.1.0-amd64`
|
||||
- `--tag ghcr.io/thebinaryninja/tvapp2:1.1.0-arm64`
|
||||
- `--tag ghcr.io/thebinaryninja/tvapp2:1.5.4-amd64`
|
||||
- `--tag ghcr.io/thebinaryninja/tvapp2:1.5.4-arm64`
|
||||
- `--tag ghcr.io/thebinaryninja/tvapp2:development-amd64`
|
||||
- `--tag ghcr.io/thebinaryninja/tvapp2:development-arm64`
|
||||
|
||||
<br />
|
||||
|
||||
Next, we need to take these two images, and merge them into one so that both architectures are available without having to push separate images. You need to obtain the SHA256 hash digest for the `amd64` and `arm64` images. You can go to the registry where you uploaded the images and then copy them. Or you can run the following commands:
|
||||
Next, we need to take these two images, and merge them into one so that both architectures are available without having to push separate images. You need to obtain the SHA256 hash digest for the `amd64` and `arm64` images. You can go to the registry where you uploaded the images and then copy them. Or you can run the commands specified below depending on which release type you want:
|
||||
|
||||
<br />
|
||||
<br />
|
||||
@@ -884,19 +1011,20 @@ You can also get the hash digests by running the commands:
|
||||
<br />
|
||||
|
||||
```shell
|
||||
$ docker buildx imagetools inspect ghcr.io/thebinaryninja/tvapp2:1.1.0-amd64
|
||||
$ docker buildx imagetools inspect ghcr.io/thebinaryninja/tvapp2:1.5.4-amd64
|
||||
|
||||
Name: ghcr.io/thebinaryninja/tvapp2:1.1.0-amd64
|
||||
Name: ghcr.io/thebinaryninja/tvapp2:1.5.4-amd64
|
||||
MediaType: application/vnd.docker.distribution.manifest.v2+json
|
||||
Digest: sha256:0abe1b1c119959b3b1ccc23c56a7ee2c4c908c6aaef290d4ab2993859d807a3b
|
||||
|
||||
$ docker buildx imagetools inspect ghcr.io/thebinaryninja/tvapp2:1.1.0-arm64
|
||||
$ docker buildx imagetools inspect ghcr.io/thebinaryninja/tvapp2:1.5.4-arm64
|
||||
|
||||
Name: ghcr.io/thebinaryninja/tvapp2:1.1.0-arm64
|
||||
Name: ghcr.io/thebinaryninja/tvapp2:1.5.4-arm64
|
||||
MediaType: application/vnd.docker.distribution.manifest.v2+json
|
||||
Digest: sha256:e68b9de8669eac64d4e4d2a8343c56705e05e9a907cf0b542343f9b536d9c473
|
||||
```
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
**Development Release**
|
||||
@@ -938,14 +1066,14 @@ Digest: sha256:c719ccb034946e3f0625003f25026d001768794e38a1ba8aafc9146291d548
|
||||
> ```shell
|
||||
> $ docker images --all --no-trunc | grep thebinaryninja
|
||||
>
|
||||
> ghcr.io/thebinaryninja/tvapp2 1.1.0-arm64 sha256:48520ca15fed6483d2d5b79993126c311f833002345b0e12b8eceb5bf9def966 42 minutes ago 46MB
|
||||
> ghcr.io/thebinaryninja/tvapp2 1.5.4-arm64 sha256:48520ca15fed6483d2d5b79993126c311f833002345b0e12b8eceb5bf9def966 42 minutes ago 46MB
|
||||
>
|
||||
> ghcr.io/thebinaryninja/tvapp2 1.1.0-amd64 sha256:54a9b7d390199532d5667fae67120d77e2f459bd6108b27ce94e0cfec8f3c41f 43 minutes ago 45MB
|
||||
> ghcr.io/thebinaryninja/tvapp2 1.5.4-amd64 sha256:54a9b7d390199532d5667fae67120d77e2f459bd6108b27ce94e0cfec8f3c41f 43 minutes ago 45MB
|
||||
> ```
|
||||
>
|
||||
> To get the correct sha256 digest, use:
|
||||
> - `docker buildx imagetools inspect ghcr.io/thebinaryninja/tvapp2:1.1.0-amd64`
|
||||
> - `docker buildx imagetools inspect ghcr.io/thebinaryninja/tvapp2:1.1.0-arm64`
|
||||
> - `docker buildx imagetools inspect ghcr.io/thebinaryninja/tvapp2:1.5.4-amd64`
|
||||
> - `docker buildx imagetools inspect ghcr.io/thebinaryninja/tvapp2:1.5.4-arm64`
|
||||
> - `docker buildx imagetools inspect ghcr.io/thebinaryninja/tvapp2:development-amd64`
|
||||
> - `docker buildx imagetools inspect ghcr.io/thebinaryninja/tvapp2:development-arm64`
|
||||
>
|
||||
@@ -965,8 +1093,8 @@ For the **stable** releases, use:
|
||||
# #
|
||||
|
||||
docker buildx imagetools create \
|
||||
--tag ghcr.io/thebinaryninja/tvapp2:1.1.0 \
|
||||
--tag ghcr.io/thebinaryninja/tvapp2:1.1 \
|
||||
--tag ghcr.io/thebinaryninja/tvapp2:1.5.4 \
|
||||
--tag ghcr.io/thebinaryninja/tvapp2:1.5 \
|
||||
--tag ghcr.io/thebinaryninja/tvapp2:1 \
|
||||
--tag ghcr.io/thebinaryninja/tvapp2:latest \
|
||||
sha256:0abe1b1c119959b3b1ccc23c56a7ee2c4c908c6aaef290d4ab2993859d807a3b \
|
||||
@@ -974,9 +1102,9 @@ docker buildx imagetools create \
|
||||
|
||||
[+] Building 0.2s (4/4) FINISHED
|
||||
=> [internal] pushing ghcr.io/thebinaryninja/tvapp2:latest 0.2s
|
||||
=> [internal] pushing ghcr.io/thebinaryninja/tvapp2:1.1 0.2s
|
||||
=> [internal] pushing ghcr.io/thebinaryninja/tvapp2:1 0.2s
|
||||
=> [internal] pushing ghcr.io/thebinaryninja/tvapp2:1.1.0 0.2s
|
||||
=> [internal] pushing ghcr.io/thebinaryninja/tvapp2:1.5 0.2s
|
||||
=> [internal] pushing ghcr.io/thebinaryninja/tvapp2:1.5.4 0.2s
|
||||
```
|
||||
|
||||
<br />
|
||||
@@ -1022,8 +1150,8 @@ In this example, we take the existing two files we created earlier, and merge th
|
||||
```shell
|
||||
# Example 1 (using tag)
|
||||
docker manifest create ghcr.io/thebinaryninja/tvapp2:latest \
|
||||
--amend ghcr.io/thebinaryninja/tvapp2:1.1.0-amd64 \
|
||||
--amend ghcr.io/thebinaryninja/tvapp2:1.1.0-arm64
|
||||
--amend ghcr.io/thebinaryninja/tvapp2:1.5.4-amd64 \
|
||||
--amend ghcr.io/thebinaryninja/tvapp2:1.5.4-arm64
|
||||
|
||||
# Example 2 (using sha256 hash)
|
||||
docker manifest create ghcr.io/thebinaryninja/tvapp2:latest \
|
||||
@@ -1064,7 +1192,7 @@ To build the project, `🗔 cd` into the project folder and run the build comman
|
||||
|
||||
```shell
|
||||
cd /home/docker/tvapp2/
|
||||
npm run docker:build:amd64 --VERSION=1.1.0 --BUILDDATE=20250325
|
||||
npm run docker:build:amd64 --VERSION=1.5.4 --BUILDDATE=20260812
|
||||
```
|
||||
|
||||
<br />
|
||||
@@ -1089,7 +1217,7 @@ The run command above has several variables you must specify:
|
||||
| Variable | Description |
|
||||
| --- | --- |
|
||||
| `--VERSION=1.X.X` | The version to assign to the docker image |
|
||||
| `--BUILDDATE=20250325` | The date to assign to the docker image. <br /> Date format: `YYYYMMDD` |
|
||||
| `--BUILDDATE=20260812` | The date to assign to the docker image. <br /> Date format: `YYYYMMDD` |
|
||||
| `--ARCH=amd64` | Architecture for image<br /> <sub><sup>Options:</sup></sub> `amd64`, `arm64` |
|
||||
|
||||
<br />
|
||||
@@ -1139,7 +1267,7 @@ sudo nano /home/docker/tvapp2/docker-compose.yml
|
||||
|
||||
Add the following to your `📄 docker-compose.yml`:
|
||||
|
||||
```yml ignore
|
||||
```yml
|
||||
services:
|
||||
tvapp2:
|
||||
container_name: tvapp2
|
||||
@@ -1188,15 +1316,21 @@ This docker container contains the following env variables:
|
||||
| `TZ` | `Etc/UTC` | Timezone for error / log reporting |
|
||||
| `WEB_IP` | `0.0.0.0` | IP to use for webserver |
|
||||
| `WEB_PORT` | `4124` | Port to use for webserver |
|
||||
| `WEB_FOLDER` | `www` | Internal container folder to keep TVApp2 web files in. <br /><br /> <sup>⚠️ This should not be used unless you know what you're doing</sup> |
|
||||
| `WEB_ENCODING` | `deflate, br` | Defines the HTTP `Accept-Encoding` request and response header. This value specifies what content encoding the sender can understand<br /><br />Gzip compression can be enabled by specifying `'gzip, deflate, br'`, however, [it may break Jellyfin users](#build-error-err-27-jellyfinlivetvguideguidemanager-error-getting-programs-for-channel-xxxxxxxxxxxxxxx-source-2-systemxmlxmlexception--hexadecimal-value-0x1f-is-an-invalid-character-line-1-position-1). |
|
||||
| `WEB_PROXY_HEADER` | `x-forwarded-for` | Defines the header to look for when finding a client's IP address. Used to get a client's IP when behind a reverse proxy or Cloudflare |
|
||||
| `HDHR_PORT` | `6077` | HDHomeRun server default listening port |
|
||||
| `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_URL` | `urls.txt` | Filename for `urls.txt` cache file |
|
||||
| `FILE_M3U` | `playlist.m3u8` | Filename for M3U playlist file |
|
||||
| `FILE_EPG` | `xmltv.xml` | Filename for XML guide data file |
|
||||
| `FILE_GZIP` | `xmltv.xml.gz` | Filename for XML compressed as gzip .gz |
|
||||
| `FILE_GZP` | `xmltv.xml.gz` | Filename for XML compressed as gzip .gz |
|
||||
| `STREAM_QUALITY` | `hd` | Stream quality<br />Can be either `hd` or `sd` |
|
||||
| `TASK_CRON_SYNC` | `0 0 */3 * *` | Defines how often to refresh the M3U and XML IPTV data |
|
||||
| `HEALTH_TIMER` | `600000` | How often (in milliseconds) to run a health check |
|
||||
| `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> |
|
||||
| `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> |
|
||||
| `LOG_LEVEL` | `4` | Level of logging to display in console<br/>`7` Trace <sup><sub>& below</sub></sup><br />`6` Verbose <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 />
|
||||
@@ -1211,6 +1345,137 @@ These paths can be mounted and shared between the TVApp2 docker container and yo
|
||||
| `📁 /config` | <sub>Where logs will be placed, as well as the web server generated SSH key and cert `🔑 cert.key` and `🪪 cert.crt`</sub> |
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
### Docker health check
|
||||
|
||||
This image includes a docker health check that you can define in your `📄 docker-compose.yml` file. You can view the health check status by opening your browser and going to your TVApp2 container's `health` path:
|
||||
|
||||
```
|
||||
http://container-ip:4124/api/health
|
||||
```
|
||||
|
||||
<br />
|
||||
|
||||
You should see something similar to the following response:
|
||||
|
||||
```json
|
||||
{
|
||||
"ip": "172.XX.XX.4",
|
||||
"gateway": "172.XX.XX.1",
|
||||
"uptime": 2703.316357306,
|
||||
"message": "Healthy",
|
||||
"timestamp": 1744152471451
|
||||
}
|
||||
```
|
||||
|
||||
<br />
|
||||
|
||||
To apply a health check, open your TVApp2 `docker-compose.yml` and add any of the following options:
|
||||
|
||||
```yml
|
||||
# Example 1 (Using curl)
|
||||
health check:
|
||||
test: "curl --fail --silent http://127.0.0.1:${JELLYFIN_SCRAPER_TVAPP2_PORT_MAIN:-4124}/api/health | grep -i healthy || exit 1"
|
||||
interval: 15s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
# Example 1 (Using wget)
|
||||
health check:
|
||||
test: "wget -qO- http://127.0.0.1:${JELLYFIN_SCRAPER_TVAPP2_PORT_MAIN:-4124}/api/health | grep -i healthy || exit 1"
|
||||
interval: 15s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
```
|
||||
|
||||
<br />
|
||||
|
||||
### Logging
|
||||
|
||||
This docker container includes numerous log levels you can switch between in order to see exactly what the docker container is doing during operations.
|
||||
|
||||
Out-of-box, the default value is set to `4`:
|
||||
|
||||
```yml
|
||||
environment:
|
||||
- TZ=Etc/UTC
|
||||
- LOG_LEVEL=4
|
||||
```
|
||||
|
||||
<br />
|
||||
|
||||
The default level of `info (4)` will give you all messages related to running your container. It should be enough for everyday users. This log level includes:
|
||||
|
||||
- All informative messages
|
||||
- All errors
|
||||
- All warnings
|
||||
- All notices
|
||||
|
||||
<br />
|
||||
|
||||
However, this container supports three levels with high verbosity:
|
||||
- **Trace**: 7
|
||||
- **Verbose**: 6
|
||||
- **Debug**: 5
|
||||
|
||||
<br />
|
||||
|
||||
#### Trace (7)
|
||||
|
||||
This **LOG_LEVEL** will output anything that you can see with **debug** `LOG_LEVEL=5`; but with the addition that each log output to your console will show a complete traceback of how the log was triggered.
|
||||
|
||||
<br />
|
||||
|
||||
> [!NOTE]
|
||||
> Users should be cautioned that using `LOG_LEVEL=7` will generate a large amount of logs to your console, especially when you initiate watching an IPTV channel.
|
||||
|
||||
<br />
|
||||
|
||||
```shell
|
||||
Trace: tvapp2 → .gzp [requests] ⚙️ <msg> Requesting to create compressed gzip from uncompressed XML data <src> /usr/bin/app/www/xmltv.xml <dest> /usr/bin/app/www/xmltv.xml.gz
|
||||
at Log.debug (file:///usr/bin/app/index.js:182:21)
|
||||
at getGzip (file:///usr/bin/app/index.js:658:13)
|
||||
at initialize (file:///usr/bin/app/index.js:1840:15)
|
||||
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
|
||||
at async file:///usr/bin/app/index.js:2288:5
|
||||
```
|
||||
|
||||
<br />
|
||||
|
||||
#### Verbose (6)
|
||||
|
||||
This **LOG_LEVEL** will output anything that you can see with **debug** `LOG_LEVEL=5`; as well as even deeper logs; such as every environment variable your TVApp2 container has assigned. You should not need to use this log level unless you are troubleshooting an issue or if instructed to do so by the developers.
|
||||
|
||||
```shell
|
||||
tvapp2 → .env [assigner] 📣 <name> npm_config_user_agent <value> npm/10.9.1 node/v22.13.1 linux x64 workspaces/false
|
||||
tvapp2 → .env [assigner] 📣 <name> HOSTNAME <value> tvapp2
|
||||
tvapp2 → .env [assigner] 📣 <name> SHLVL <value> 4
|
||||
tvapp2 → .env [assigner] 📣 <name> HOME <value> /root
|
||||
tvapp2 → .env [assigner] 📣 <name> OLDPWD <value> /run/s6/legacy-services/tvapp2
|
||||
```
|
||||
|
||||
<br />
|
||||
|
||||
#### Debug (5)
|
||||
|
||||
This **LOG_LEVEL** will output many of the steps that this container takes to create new XML guide and M3U playlist files. It will also output the environment variables you have set associated with the docker image itself.
|
||||
|
||||
<br />
|
||||
|
||||
```shell
|
||||
tvapp2 → .net [assigner] ⚙️ <name> IP_CONTAINER <value> 172.18.0.7
|
||||
tvapp2 → .net [assigner] ⚙️ <name> IP_GATEWAY <value> 172.18.0.1
|
||||
tvapp2 → .env [assigner] ⚙️ <name> RELEASE <value> stable
|
||||
tvapp2 → .env [assigner] ⚙️ <name> WEB_IP <value> 0.0.0.0
|
||||
tvapp2 → .env [assigner] ⚙️ <name> WEB_PORT <value> 4124
|
||||
tvapp2 → .env [assigner] ⚙️ <name> WEB_FOLDER <value> www
|
||||
tvapp2 → file [requests] ⚙️ <msg> Requesting to download external file <src> https://git.binaryninja.net/binaryninja//XMLTV-EPG/raw/branch/main/xmltv.1.xml <dest> /usr/bin/app/www/xmltv.xml
|
||||
```
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
---
|
||||
|
||||
@@ -1245,7 +1510,7 @@ We will be setting up the following:
|
||||
|
||||
To add TVApp2 to Traefik, you will need to open your `📄 docker-compose.yml` and apply the following labels to your TVApp2 container. Ensure you change `domain.lan` to your actual domain name.
|
||||
|
||||
```yml ignore
|
||||
```yml
|
||||
services:
|
||||
tvapp2:
|
||||
container_name: tvapp2
|
||||
@@ -1594,7 +1859,7 @@ Sign into the Authentik admin panel, go to the left-side navigation, select **Ap
|
||||
|
||||
<br />
|
||||
|
||||
<p align="center"><img style="width: 40%;text-align: center;" src="docs/img/authentik/01.png"><br><small><sup><b>Authentik:</b> Select <code>Applications</code> › <code>Providers</code></sup></small></p>
|
||||
<p align="center"><img style="width: 80%;text-align: center;" src="docs/img/authentik/01.png"><br><small><sup><b>Authentik:</b> Select <code>Applications</code> › <code>Providers</code></sup></small></p>
|
||||
|
||||
<br />
|
||||
|
||||
@@ -1630,7 +1895,7 @@ Once finished, click **Create**. Then on the left-side menu, select **Applicatio
|
||||
|
||||
<br />
|
||||
|
||||
<p align="center"><img style="width: 40%;text-align: center;" src="docs/img/authentik/05.png"><br><small><sup><b>Authentik:</b> Select <code>Applications</code> › <code>Applications</code></sup></small></p>
|
||||
<p align="center"><img style="width: 80%;text-align: center;" src="docs/img/authentik/05.png"><br><small><sup><b>Authentik:</b> Select <code>Applications</code> › <code>Applications</code></sup></small></p>
|
||||
|
||||
<br />
|
||||
|
||||
@@ -1656,7 +1921,7 @@ Save, and then on the left-side menu, select **Applications** -> **Outposts**:
|
||||
|
||||
<br />
|
||||
|
||||
<p align="center"><img style="width: 40%;text-align: center;" src="docs/img/authentik/07.png"><br><small><sup><b>Authentik:</b> Select <code>Applications</code> › <code>Outposts</code></sup></small></p>
|
||||
<p align="center"><img style="width: 80%;text-align: center;" src="docs/img/authentik/07.png"><br><small><sup><b>Authentik:</b> Select <code>Applications</code> › <code>Outposts</code></sup></small></p>
|
||||
|
||||
<br />
|
||||
|
||||
@@ -1771,7 +2036,28 @@ If you have issues building your TVApp2 docker image, please refer to the follow
|
||||
<br />
|
||||
<br />
|
||||
|
||||
#### Run Error: `Error serving playlist: ENOENT: no such file or directory, open /usr/src/app/xmltv.1.xml`
|
||||
### Run Error: `Warning: Step size 60 higher than possible maximum of 59`
|
||||
|
||||
This error means that you have placed an incorrect value for a cron job. This error can show if you've set:
|
||||
|
||||
```shell
|
||||
environment:
|
||||
TASK_CRON_SYNC: "*/60 * * * *"
|
||||
```
|
||||
|
||||
<br />
|
||||
|
||||
To correctly set the value, change your cron to:
|
||||
|
||||
```shell
|
||||
environment:
|
||||
TASK_CRON_SYNC: "0 */1 * * *"
|
||||
```
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
### Run Error: `Error serving playlist: ENOENT: no such file or directory, open /usr/src/app/xmltv.1.xml`
|
||||
|
||||
This error occurs at run-time when attempting to spin up your TVApp2 docker container. If you receive this error, restart your TVApp2 docker container. Ensure that your docker container also has access to your docker network so that it can connect to our repository and fetch the data files it needs to generate your playlist.
|
||||
|
||||
@@ -1782,7 +2068,7 @@ If the error continues after doing the above; delete the existing image, and re-
|
||||
<br />
|
||||
<br />
|
||||
|
||||
#### Build Error: `s6-rc-compile: fatal: invalid /etc/s6-overlay/s6-rc.d/certsync/type: must be oneshot, longrun, or bundle`
|
||||
### Build Error: `s6-rc-compile: fatal: invalid /etc/s6-overlay/s6-rc.d/certsync/type: must be oneshot, longrun, or bundle`
|
||||
|
||||
This error means that you are attempting to combine files which are utilizing CRLF over LF; which is **CR** = Carriage Return and **LF** = Line Feed
|
||||
|
||||
@@ -1812,6 +2098,8 @@ cd /path/to/tvapp2
|
||||
find ./ -type f | grep -Ev '.git|*.jpg|*.jpeg|*.png' | sudo xargs dos2unix --
|
||||
```
|
||||
|
||||
<br />
|
||||
|
||||
> [!WARNING]
|
||||
> Do not run `🗔 dos2unix` on your `📁 .git` folder or you will corrupt your git indexes and will be unable to push commits.
|
||||
>
|
||||
@@ -1820,7 +2108,7 @@ find ./ -type f | grep -Ev '.git|*.jpg|*.jpeg|*.png' | sudo xargs dos2unix --
|
||||
<br />
|
||||
<br />
|
||||
|
||||
#### Build Error: `unable to exec /etc/s6-overlay/s6-rc.d/init-envfile/run: Permission denied`
|
||||
### Build Error: `unable to exec /etc/s6-overlay/s6-rc.d/init-envfile/run: Permission denied`
|
||||
|
||||
There are multiple errors you can receive when attempting to run your TVApp2 docker image. You may receive any of the following errors:
|
||||
|
||||
@@ -1835,14 +2123,46 @@ There are multiple errors you can receive when attempting to run your TVApp2 doc
|
||||
If you receive any of the above errors; this means that you have not set your `run` files to have execute permissions `+x`. Run the following command in the root directory of your TVApp2 project folder:
|
||||
|
||||
```shell
|
||||
find ./ -name 'run' -exec sudo chmod +x {} \;
|
||||
find ./ -name 'run' -print -exec sudo chmod +x {} \;
|
||||
```
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
After you have set these permissions, re-build your docker image using `docker build` or `docker buildx`. Then spin the container up.
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
### Build Error: `[ERR] [27] Jellyfin.LiveTv.Guide.GuideManager: Error getting programs for channel XXXXXXXXXXXXXXX (Source 2) System.Xml.XmlException: '', hexadecimal value 0x1F, is an invalid character. Line 1, position 1.`
|
||||
|
||||
This error may be seen if you are attempting to import our EPG guide data directly into Jellyfin. The cause of this is due to you having **GZIP Compression** enabled in your header request and response. See the example below; which is in your TVApp2 `📄 docker-compose.yml` file:
|
||||
|
||||
```yml
|
||||
tvapp2:
|
||||
container_name: tvapp2
|
||||
image: ghcr.io/thebinaryninja/tvapp2:latest
|
||||
hostname: tvapp2
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
LOG_LEVEL: 10
|
||||
WEB_ENCODING: 'gzip, deflate, br'
|
||||
```
|
||||
|
||||
<br />
|
||||
|
||||
To fix the issue, add or change the environment variable `WEB_ENCODING` and ensure `gzip` is not specified in the list like the following:
|
||||
|
||||
```yml
|
||||
tvapp2:
|
||||
container_name: tvapp2
|
||||
image: ghcr.io/thebinaryninja/tvapp2:latest
|
||||
hostname: tvapp2
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
LOG_LEVEL: 10
|
||||
WEB_ENCODING: 'deflate, br'
|
||||
```
|
||||
|
||||
<br />
|
||||
|
||||
---
|
||||
|
||||
5
config/config.example.json
Normal file
5
config/config.example.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"mongoUri": "mongodb://MONGO_ROOT_USER:MONGO_ROOT_PASS@mongo:27017/tvapp2?authSource=admin",
|
||||
"port": 3000,
|
||||
"logLevel": "info"
|
||||
}
|
||||
5
config/config.json
Normal file
5
config/config.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"mongoUri": "mongodb://tvapp:tvapp@mongo:27017/tvapp2?authSource=admin",
|
||||
"port": 3000,
|
||||
"logLevel": "info"
|
||||
}
|
||||
1
dist/assets/ActiveStreamsScreen-Df8Wdk9n.js
vendored
Normal file
1
dist/assets/ActiveStreamsScreen-Df8Wdk9n.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/DashboardScreen-C8mAn1wl.js
vendored
Normal file
1
dist/assets/DashboardScreen-C8mAn1wl.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/EPGDetailScreen-CX4y1Ve9.js
vendored
Normal file
1
dist/assets/EPGDetailScreen-CX4y1Ve9.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/EPGSourcesScreen-Bh2qXoOm.js
vendored
Normal file
1
dist/assets/EPGSourcesScreen-Bh2qXoOm.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import{v as g,r,o as e,u as n,X as o,e as d,F as y,K as p,O as u,d as b,H as l,t as a,y as h,f as c,N as i,g as k,p as C,_ as m,q as S,Q as $,j as x}from"./index-CQPQcDLN.js";const E={class:"col"},z={class:"card flush"},N={class:"toolbar"},w=["onClick"],B={class:"src-name"},G={class:"src-url"},P={class:"stat-mini"},V={class:"stat-mini"},F={class:"stat-mini",style:{"min-width":"110px"}},L={style:{"font-size":"12px","font-weight":"500",color:"var(--text-1)"}},A=g({__name:"EPGSourcesScreen",emits:["add"],setup(O,{emit:_}){const v=_,f=$();return(R,s)=>(l(),r("div",E,[e("div",z,[e("div",N,[n(x,{value:"",onChange:()=>{},placeholder:"Search EPG sources"}),s[3]||(s[3]=e("span",{class:"spacer"},null,-1)),n(d,{variant:"ghost",icon:"refresh"},{default:o(()=>[...s[1]||(s[1]=[a("Sync all",-1)])]),_:1}),n(d,{variant:"primary",icon:"plus",onClick:s[0]||(s[0]=t=>v("add","epg"))},{default:o(()=>[...s[2]||(s[2]=[a("Add EPG source",-1)])]),_:1})]),(l(!0),r(y,null,p(u(b),t=>(l(),r("div",{key:t.id,class:"src-row",onClick:j=>u(f).push(`/epg-sources/${t.id}`)},[e("div",{class:h(["src-ico",{builtin:t.builtin,"epg-builtin":t.builtin}]),style:{color:"var(--good)"}},[n(c,{name:t.builtin?"tv":"epg",size:18},null,8,["name"])],2),e("div",null,[e("div",B,[a(i(t.name)+" ",1),n(k,{status:t.status,pulse:t.status==="good"},null,8,["status","pulse"]),t.builtin?(l(),C(m,{key:0,tone:"system"},{default:o(()=>[n(c,{name:"check",size:10}),s[4]||(s[4]=a("built-in",-1))]),_:1})):S("",!0),n(m,{tone:"cyan"},{default:o(()=>[a(i(t.interval),1)]),_:2},1024)]),e("div",G,i(t.url),1)]),e("div",P,[e("b",null,i(t.channels),1),s[5]||(s[5]=a("channels",-1))]),e("div",V,[e("b",null,i(t.programs.toLocaleString()),1),s[6]||(s[6]=a("programs",-1))]),e("div",F,[e("b",L,i(t.lastSync),1),s[7]||(s[7]=a(" last sync ",-1))]),n(d,{variant:"ghost",size:"sm",icon:"more"})],8,w))),128))])]))}});export{A as default};
|
||||
1
dist/assets/HistoryMetricsScreen-DAcDrLQC.js
vendored
Normal file
1
dist/assets/HistoryMetricsScreen-DAcDrLQC.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/ImportScreen-D7vLRk6-.js
vendored
Normal file
1
dist/assets/ImportScreen-D7vLRk6-.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/MappingScreen-BdiMBcth.js
vendored
Normal file
1
dist/assets/MappingScreen-BdiMBcth.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import{v as V,C as f,r,o as n,u as i,O as z,z as A,X as m,e as w,t as u,y as c,F as g,K as N,q as $,_ as k,I as D,J as B,n as E,H as l,N as p,p as y,f as v,i as G}from"./index-CQPQcDLN.js";import{_ as U}from"./Stat.vue_vue_type_script_setup_true_lang-BLQk8QX-.js";const K={class:"col"},T={class:"card",style:{display:"flex","align-items":"center",gap:"18px"}},j={style:{width:"180px",height:"6px",background:"var(--bg-2)","border-radius":"999px",overflow:"hidden"}},F={class:"map-grid"},O={class:"map-col"},P={class:"segmented",style:{padding:"2px"}},H={class:"map-list"},J=["onClick"],L={class:"nm"},q={class:"id"},X={key:0,class:"empty"},Q={class:"map-link",style:{"align-self":"center"}},R={class:"map-col"},W={class:"map-list"},Y=["onClick"],Z={class:"nm"},ee={class:"id"},ae=V({__name:"MappingScreen",setup(ne){const _=[{id:"bbc.one.uk",name:"BBC One"},{id:"bbc.two.uk",name:"BBC Two"},{id:"bbc.news.uk",name:"BBC News"},{id:"sky.sports.main.uk",name:"Sky Sports Main Event"},{id:"sky.sports.f1.uk",name:"Sky Sports F1"},{id:"itv1.uk",name:"ITV1"},{id:"channel4.uk",name:"Channel 4"},{id:"film4.uk",name:"Film4"},{id:"discovery.uk",name:"Discovery Channel UK"},{id:"natgeo.uk",name:"National Geographic UK"},{id:"cnn.int",name:"CNN International"},{id:"aljazeera.en",name:"Al Jazeera English"},{id:"hgtv.uk",name:"HGTV UK"},{id:"nickjr.uk",name:"Nick Jr UK"},{id:"tcm.uk",name:"TCM Movies"},{id:"eurosport1.uk",name:"Eurosport 1"}],a=D({});f.forEach(s=>{s.epg==="matched"&&s.tvg_id&&(a[s.id]=s.tvg_id)});const o=B(null),d=B("unmatched"),x=E(()=>f.filter(s=>d.value==="all"||(d.value==="unmatched"?!a[s.id]:!!a[s.id])));function S(s,e){a[s]=e}function I(s){delete a[s]}const C=E(()=>Object.keys(a).length),b=f.length;function h(s){return Object.entries(a).find(([,e])=>e===s)}return(s,e)=>(l(),r("div",K,[n("div",T,[i(v,{name:"map",size:20}),e[4]||(e[4]=n("div",{style:{flex:"1"}},[n("div",{style:{"font-weight":"600","font-size":"15px"}},"Channel ↔ EPG mapping"),n("div",{class:"muted",style:{"font-size":"var(--fs-xs)","margin-top":"2px"}}," Drag from left to right, or pick a channel and click the EPG ID. Auto-match runs nightly. ")],-1)),i(U,{label:"Matched",value:`${C.value} / ${z(b)}`},null,8,["value"]),n("div",j,[n("div",{style:A({width:C.value/z(b)*100+"%",height:"100%",background:"var(--accent)",boxShadow:"0 0 12px var(--accent)"})},null,4)]),i(w,{variant:"primary",icon:"refresh"},{default:m(()=>[...e[3]||(e[3]=[u("Auto-match",-1)])]),_:1})]),n("div",F,[n("div",O,[n("h3",null,[i(v,{name:"playlist",size:14}),e[5]||(e[5]=u(" M3U Channels ",-1)),e[6]||(e[6]=n("span",{class:"spacer"},null,-1)),n("div",P,[n("button",{class:c(d.value==="unmatched"?"active":""),onClick:e[0]||(e[0]=t=>d.value="unmatched"),style:{"font-size":"10.5px",padding:"3px 8px"}},"Unmatched",2),n("button",{class:c(d.value==="matched"?"active":""),onClick:e[1]||(e[1]=t=>d.value="matched"),style:{"font-size":"10.5px",padding:"3px 8px"}},"Matched",2),n("button",{class:c(d.value==="all"?"active":""),onClick:e[2]||(e[2]=t=>d.value="all"),style:{"font-size":"10.5px",padding:"3px 8px"}},"All",2)])]),n("div",H,[(l(!0),r(g,null,N(x.value,t=>(l(),r("div",{key:t.id,class:c(["map-item",{selected:o.value===t.id,matched:!!a[t.id]}]),onClick:M=>o.value=t.id},[i(G,{ch:t},null,8,["ch"]),n("div",L,p(t.tvg_name),1),a[t.id]?(l(),r(g,{key:0},[n("span",q,p(a[t.id]),1),i(w,{variant:"ghost",size:"sm",icon:"x",onClick:M=>I(t.id)},null,8,["onClick"])],64)):(l(),y(k,{key:1,tone:"warn"},{default:m(()=>[...e[7]||(e[7]=[u("unmatched",-1)])]),_:1}))],10,J))),128)),x.value.length===0?(l(),r("div",X,[...e[8]||(e[8]=[n("h3",null,"All matched 🎉",-1),n("p",null,"Every channel in this view has an EPG ID assigned.",-1)])])):$("",!0)])]),n("div",Q,[i(v,{name:"chevron-r",size:22})]),n("div",R,[n("h3",null,[i(v,{name:"epg",size:14}),e[9]||(e[9]=u(" EPG channel IDs ",-1)),e[10]||(e[10]=n("span",{class:"spacer"},null,-1)),i(k,null,{default:m(()=>[u(p(_.length),1)]),_:1})]),n("div",W,[(l(),r(g,null,N(_,t=>n("div",{key:t.id,class:c(["map-item",{selected:o.value&&!h(t.id),matched:!!h(t.id)}]),onClick:()=>{o.value&&!h(t.id)&&(S(o.value,t.id),o.value=null)}},[n("div",Z,p(t.name),1),n("span",ee,p(t.id),1),h(t.id)?(l(),y(k,{key:0,tone:"good"},{default:m(()=>[i(v,{name:"check",size:10}),e[11]||(e[11]=u("linked",-1))]),_:1})):o.value?(l(),y(k,{key:1,tone:"cyan"},{default:m(()=>[...e[12]||(e[12]=[u("click to link",-1)])]),_:1})):$("",!0)],10,Y)),64))])])])]))}});export{ae as default};
|
||||
1
dist/assets/PlaylistDetailScreen-F92VSAQ7.js
vendored
Normal file
1
dist/assets/PlaylistDetailScreen-F92VSAQ7.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/PlaylistsScreen-0ooKY6SX.js
vendored
Normal file
1
dist/assets/PlaylistsScreen-0ooKY6SX.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import{v as k,D as g,r as d,o as a,u as i,X as l,e as _,F as h,K as C,J as $,H as o,t as e,O as u,y as x,f as v,N as n,g as w,p as S,_ as c,q as N,Q as z,j as B}from"./index-CQPQcDLN.js";import{u as f}from"./useSettings-CPUgOpin.js";const V={class:"col"},j={class:"card flush"},A={class:"toolbar"},D=["onClick"],F={class:"src-name"},P={class:"src-url"},q={class:"stat-mini"},E={class:"stat-mini"},H={class:"stat-mini",style:{"min-width":"110px"}},I={style:{"font-size":"12px","font-weight":"500",color:"var(--text-1)"}},O=k({__name:"PlaylistsScreen",emits:["add"],setup(J,{emit:y}){const p=y,b=z(),m=$([]);return g(async()=>{const r=await fetch("/api/playlists");r.ok&&(m.value=await r.json())}),(r,s)=>(o(),d("div",V,[a("div",j,[a("div",A,[i(B,{value:"",onChange:()=>{},placeholder:"Search playlists"}),s[3]||(s[3]=a("span",{class:"spacer"},null,-1)),i(_,{variant:"ghost",icon:"refresh"},{default:l(()=>[...s[1]||(s[1]=[e("Sync all",-1)])]),_:1}),i(_,{variant:"primary",icon:"plus",onClick:s[0]||(s[0]=t=>p("add","playlist"))},{default:l(()=>[...s[2]||(s[2]=[e("Add playlist",-1)])]),_:1})]),(o(!0),d(h,null,C(m.value,t=>(o(),d("div",{key:t.id,class:"src-row",onClick:K=>u(b).push(`/playlists/${t.id}`)},[a("div",{class:x(["src-ico",{builtin:t.builtin}])},[i(v,{name:t.builtin?"tv":"playlist",size:18},null,8,["name"])],2),a("div",null,[a("div",F,[e(n(t.name)+" ",1),i(w,{status:t.status,pulse:t.status==="good"},null,8,["status","pulse"]),t.builtin?(o(),S(c,{key:0,tone:"system"},{default:l(()=>[i(v,{name:"check",size:10}),s[4]||(s[4]=e("built-in",-1))]),_:1})):N("",!0),i(c,{tone:"cyan"},{default:l(()=>[e(n(t.interval),1)]),_:2},1024)]),a("div",P,n(t.url),1)]),i(c,{tone:u(f)(t.id).active?"active":"disabled"},{default:l(()=>[e(n(u(f)(t.id).active?"Active":"Inactive"),1)]),_:2},1032,["tone"]),a("div",q,[a("b",null,n(t.channels),1),s[5]||(s[5]=e("channels",-1))]),a("div",E,[a("b",null,n(t.groups),1),s[6]||(s[6]=e("groups",-1))]),a("div",H,[a("b",I,n(t.lastSync),1),s[7]||(s[7]=e(" last sync ",-1))])],8,D))),128))])]))}});export{O as default};
|
||||
1
dist/assets/SettingsScreen-Daj_a2gr.js
vendored
Normal file
1
dist/assets/SettingsScreen-Daj_a2gr.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/Stat.vue_vue_type_script_setup_true_lang-BLQk8QX-.js
vendored
Normal file
1
dist/assets/Stat.vue_vue_type_script_setup_true_lang-BLQk8QX-.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import{v as l,r as o,o as t,N as a,z as n,L as r,H as i,t as m}from"./index-CQPQcDLN.js";const c={style:{"text-align":"right"}},d={class:"muted",style:{"font-size":"var(--fs-xs)","text-transform":"uppercase","letter-spacing":"0.06em"}},u=l({__name:"Stat",props:{label:{},value:{},small:{type:Boolean}},setup(e){return(s,f)=>(i(),o("div",c,[t("div",d,a(e.label),1),t("div",{style:n({fontWeight:600,fontSize:e.small?"var(--fs-sm)":"18px",fontVariantNumeric:"tabular-nums",marginTop:"2px"})},[r(s.$slots,"default",{},()=>[m(a(e.value),1)])],4)]))}});export{u as _};
|
||||
1
dist/assets/index-BzPI8e-F.css
vendored
Normal file
1
dist/assets/index-BzPI8e-F.css
vendored
Normal file
File diff suppressed because one or more lines are too long
26
dist/assets/index-CQPQcDLN.js
vendored
Normal file
26
dist/assets/index-CQPQcDLN.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/useSettings-CPUgOpin.js
vendored
Normal file
1
dist/assets/useSettings-CPUgOpin.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import{n as c,J as s,I as l}from"./index-CQPQcDLN.js";const h=s("TVApp2 Workspace"),u=s("https://tvapp2.example.com"),o=s("/m3u/playlist.m3u8"),$=s("/epg/guide.xml.gz"),m=c(()=>`${u.value.replace(/\/$/,"")}${o.value.startsWith("/")?"":"/"}${o.value}`),e=l({});function i(t){return e[t]||(e[t]={active:!0,endpointMode:"global",customPath:`/playlists/${t}.m3u`}),e[t]}function d(t){const a=i(t),n=u.value.replace(/\/$/,"");if(a.endpointMode==="custom"){const p=a.customPath.startsWith("/")?a.customPath:`/${a.customPath}`;return`${n}${p}`}return m.value}export{u as a,o as b,h as d,$ as e,m,d as p,i as u};
|
||||
19
dist/index.html
vendored
Normal file
19
dist/index.html
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" data-theme="dark" data-density="regular">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>TVApp2 — M3U & EPG Manager</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
|
||||
<style>
|
||||
@keyframes slidein { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
|
||||
</style>
|
||||
<script type="module" crossorigin src="/assets/index-CQPQcDLN.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-BzPI8e-F.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
</html>
|
||||
2
dist/types-node/vite.config.d.ts
vendored
Normal file
2
dist/types-node/vite.config.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
declare const _default: import("vite").UserConfig;
|
||||
export default _default;
|
||||
14
dist/types-node/vite.config.js
vendored
Normal file
14
dist/types-node/vite.config.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
server: {
|
||||
port: 5173,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:3000',
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
126
docker-compose.yml
Executable file → Normal file
126
docker-compose.yml
Executable file → Normal file
@@ -1,50 +1,84 @@
|
||||
# #
|
||||
# TVApp2 Docker-compose.yml
|
||||
#
|
||||
# Automatic M3U playlist and XML guide updater for TheTvApp, TVPass, and MoveOnJoy utilized within your IPTV client.
|
||||
#
|
||||
# @url https://github.com/TheBinaryNinja/tvapp2
|
||||
# https://git.binaryninja.net/BinaryNinja/tvapp2
|
||||
#
|
||||
# @image:github ghcr.io/thebinaryninja/tvapp2:latest
|
||||
# ghcr.io/thebinaryninja/tvapp2:amd64
|
||||
# ghcr.io/thebinaryninja/tvapp2:arm64
|
||||
#
|
||||
# @image:dockerhub thebinaryninja/tvapp2:latest
|
||||
# thebinaryninja/tvapp2:1.0.0-amd64
|
||||
# thebinaryninja/tvapp2:1.0.0-arm64
|
||||
#
|
||||
# @image:gitea git.binaryninja.net/binaryninja/tvapp2:latest
|
||||
# git.binaryninja.net/binaryninja/tvapp2:1.0.0-amd64
|
||||
# git.binaryninja.net/binaryninja/tvapp2:1.0.0-arm64
|
||||
# #
|
||||
# Pinned image versions — bump in lockstep with docker/*.Dockerfile.
|
||||
# MONGO = 7.0.15
|
||||
# Requires Docker Engine >= 24.0 and Docker Compose >= 2.20 (Compose Spec).
|
||||
# The legacy top-level `version:` key is intentionally omitted (deprecated in Compose v2).
|
||||
|
||||
services:
|
||||
# One-shot init: writes ${TVAPP2_CONFIG_DIR}/config.json from the MONGO_ROOT_USER /
|
||||
# MONGO_ROOT_PASS values in .env. The JSON template is embedded below — NO host file is
|
||||
# bind-mounted — so a deployment host needs only this compose file + .env, nothing else to
|
||||
# ship. (Bind-mounting a host template is a footgun: if the file is missing Docker silently
|
||||
# creates it as an empty *directory*, and config.json ends up empty.) Left untouched if an
|
||||
# existing config.json already targets the compose "mongo" host; regenerated otherwise
|
||||
# (e.g. a stale @127.0.0.1: config left by an all-in-one run).
|
||||
config-init:
|
||||
image: alpine:3.20
|
||||
environment:
|
||||
MONGO_ROOT_USER: ${MONGO_ROOT_USER}
|
||||
MONGO_ROOT_PASS: ${MONGO_ROOT_PASS}
|
||||
volumes:
|
||||
- ${TVAPP2_CONFIG_DIR}:/out
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
set -eu
|
||||
if [ -s /out/config.json ] && grep -q '@mongo:' /out/config.json; then
|
||||
echo "[config-init] /out/config.json already targets @mongo: — leaving alone"
|
||||
exit 0
|
||||
fi
|
||||
if [ -s /out/config.json ]; then
|
||||
echo "[config-init] /out/config.json does not target @mongo: — regenerating"
|
||||
fi
|
||||
printf '{\n "mongoUri": "mongodb://%s:%s@mongo:27017/tvapp2?authSource=admin",\n "port": 3000,\n "logLevel": "info"\n}\n' \
|
||||
"$$MONGO_ROOT_USER" "$$MONGO_ROOT_PASS" > /out/config.json
|
||||
echo "[config-init] wrote /out/config.json"
|
||||
restart: "no"
|
||||
|
||||
# #
|
||||
# Service > TVApp2
|
||||
# #
|
||||
app:
|
||||
image: iflip721/tvapp2-app-stack:2.0.5-dev
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/app.Dockerfile
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
# config.json is generated by the config-init service from .env (embedded template).
|
||||
# Set TVAPP2_CONFIG_DIR in .env to the host directory that holds it.
|
||||
- ${TVAPP2_CONFIG_DIR}:/etc/tvapp2:rw
|
||||
depends_on:
|
||||
config-init:
|
||||
condition: service_completed_successfully
|
||||
mongo:
|
||||
condition: service_healthy
|
||||
networks: [tvnet]
|
||||
restart: unless-stopped
|
||||
|
||||
tvapp2:
|
||||
container_name: tvapp2
|
||||
image: ghcr.io/thebinaryninja/tvapp2:latest # Image: Github
|
||||
# image: thebinaryninja/tvapp2:latest # Image: Dockerhub
|
||||
# image: git.binaryninja.net/binaryninja/tvapp2:latest # Image: Gitea
|
||||
# image: tvapp2:latest # Image: Locally built
|
||||
hostname: tvapp2
|
||||
environment:
|
||||
TZ: "Etc/UTC"
|
||||
volumes:
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./config:/config
|
||||
- ./app:/usr/bin/app
|
||||
ulimits:
|
||||
memlock:
|
||||
soft: -1
|
||||
hard: -1
|
||||
healthcheck:
|
||||
test: [ "CMD", "curl", "--fail", "http://127.0.0.1:4124" ]
|
||||
interval: 30s
|
||||
retries: 5
|
||||
mongo:
|
||||
image: mongo:7.0.15
|
||||
environment:
|
||||
MONGO_INITDB_ROOT_USERNAME: ${MONGO_ROOT_USER}
|
||||
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_ROOT_PASS}
|
||||
ports:
|
||||
# Expose mongod on the host. Override the host-side port with
|
||||
# MONGO_HOST_PORT in .env (defaults to 27017).
|
||||
- "${MONGO_HOST_PORT:-27017}:27017"
|
||||
volumes:
|
||||
# Persistent MongoDB data. Set MONGO_DATA_PATH in .env to an absolute
|
||||
# host path (e.g. /srv/tvapp2/mongo) for a bind mount; leave unset to
|
||||
# use the named volume defined below.
|
||||
- ${MONGO_DATA_PATH:-mongo-data}:/data/db
|
||||
healthcheck:
|
||||
test: ["CMD", "mongosh", "--quiet", "--eval", "db.adminCommand('ping').ok"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks: [tvnet]
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
# Fallback named volume — used only when MONGO_DATA_PATH is unset.
|
||||
mongo-data:
|
||||
|
||||
networks:
|
||||
tvnet:
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# #
|
||||
# @project TVApp2
|
||||
# @usage docker image which allows you to download a m3u playlist and EPG guide data from
|
||||
# multiple IPTV services.
|
||||
# @file docker-entrypoint.sh
|
||||
# @repo https://github.com/TheBinaryNinja/tvapp2
|
||||
# https://git.binaryninja.net/BinaryNinja/tvapp2
|
||||
# https://github.com/aetherinox/docker-base-alpine
|
||||
#
|
||||
# you can build your own image by running
|
||||
# amd64 docker build --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250218 -t tvapp2:latest -t tvapp2:1.0.0 -t tvapp2:1.0.0-amd64 -f Dockerfile .
|
||||
# arm64 docker build --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250218 -t tvapp2:1.0.0-arm64 -f Dockerfile.aarch64 .
|
||||
#
|
||||
# if you prefer to use `docker buildx`
|
||||
# create docker buildx create --driver docker-container --name container --bootstrap --use
|
||||
# amd64 docker buildx build --no-cache --pull --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250218 -t tvapp2:latest -t tvapp2:1.0.0 --platform=linux/amd64 --output type=docker --output type=docker .
|
||||
# arm64 docker buildx build --no-cache --pull --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250218 -t tvapp2:latest -t tvapp2:1.0.0 --platform=linux/arm64 --output type=docker --output type=docker .
|
||||
# #
|
||||
|
||||
set -e
|
||||
|
||||
# Run command with node if the first argument contains a "-" or is not a system command. The last
|
||||
# part inside the "{}" is a workaround for the following bug in ash/dash:
|
||||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874264
|
||||
if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ] || { [ -f "${1}" ] && ! [ -x "${1}" ]; }; then
|
||||
set -- node "$@"
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
65
docker/app.Dockerfile
Normal file
65
docker/app.Dockerfile
Normal file
@@ -0,0 +1,65 @@
|
||||
# syntax=docker/dockerfile:1.7
|
||||
# -----------------------------------------------------------------------------
|
||||
# docker/app.Dockerfile — TVApp2 "app stack" image (iflip721/tvapp2-app-stack)
|
||||
#
|
||||
# Three-stage build:
|
||||
# 1) spa-build — Vue 3 + Vite SPA → /spa/dist (root package.json)
|
||||
# 2) server-build — Express API (tsc) → /server/dist (server/package.json)
|
||||
# 3) runtime — prod-only Node; serves API + built SPA on :3000
|
||||
#
|
||||
# Runtime layout (must match server/src/index.ts publicDir and sources/paths.ts SEED_SOURCES_DIR):
|
||||
# /app/dist/ compiled server (dist/index.js, dist/sources/paths.js)
|
||||
# /app/public/ built SPA (resolve(<dist>,'..','public') => /app/public)
|
||||
# /app/seed-data/ source bundles (resolve(<dist>,'..','..','seed-data','sources'))
|
||||
# /app/package.json server pkg (type:module) + node_modules (express, mongoose only)
|
||||
#
|
||||
# Node pin: 22.11.0 LTS "Jod" on alpine 3.20 — keep in lockstep with CLAUDE.md.
|
||||
# -----------------------------------------------------------------------------
|
||||
ARG NODE_IMAGE=node:22.11.0-alpine3.20
|
||||
|
||||
# ---- Stage 1: build the SPA (root package) ----------------------------------
|
||||
FROM ${NODE_IMAGE} AS spa-build
|
||||
WORKDIR /spa
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY tsconfig.json tsconfig.node.json vite.config.ts index.html ./
|
||||
COPY public/ ./public/
|
||||
COPY src/ ./src/
|
||||
RUN npm run build # vue-tsc -b && vite build -> /spa/dist
|
||||
|
||||
# ---- Stage 2: build the server (server package) -----------------------------
|
||||
FROM ${NODE_IMAGE} AS server-build
|
||||
WORKDIR /server
|
||||
COPY server/package.json server/package-lock.json ./
|
||||
RUN npm ci # devDeps (typescript) needed to compile
|
||||
COPY server/tsconfig.json ./
|
||||
COPY server/src/ ./src/
|
||||
RUN npm run build # tsc -p . -> /server/dist
|
||||
|
||||
# ---- Stage 3: runtime -------------------------------------------------------
|
||||
FROM ${NODE_IMAGE} AS runtime
|
||||
ENV NODE_ENV=production \
|
||||
TVAPP2_CONFIG=/etc/tvapp2/config.json
|
||||
WORKDIR /app
|
||||
|
||||
# tini = correct PID 1 (forwards SIGTERM/SIGINT to the graceful-shutdown handler in index.ts).
|
||||
RUN apk add --no-cache tini
|
||||
|
||||
# Prod-only server deps (express, mongoose).
|
||||
COPY server/package.json server/package-lock.json ./
|
||||
RUN npm ci --omit=dev && npm cache clean --force
|
||||
|
||||
# Compiled server + built SPA + committed seed bundles.
|
||||
COPY --from=server-build /server/dist ./dist
|
||||
COPY --from=spa-build /spa/dist ./public
|
||||
COPY server/seed-data ./seed-data
|
||||
|
||||
USER node
|
||||
EXPOSE 3000
|
||||
|
||||
# Liveness: HTTP server up (body also reports mongo connected/disconnected).
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
|
||||
CMD wget -qO- http://127.0.0.1:3000/api/health || exit 1
|
||||
|
||||
ENTRYPOINT ["/sbin/tini", "--"]
|
||||
CMD ["node", "dist/index.js"]
|
||||
@@ -28,6 +28,60 @@ This section outlines all releases of TVApp2, including the version of the relea
|
||||
|
||||
<br />
|
||||
|
||||
### <!-- md:version stable- --> 1.4.0 <small>Apr 10, 2025</small> { id="1.4.0" }
|
||||
|
||||
- `feat`: add new environment variable `HEALTH_TIMER` _(See feature below)_
|
||||
- `feat`: new health check icon in top right; triggers every `10 minutes` and reports back to the web interface as a toast notification
|
||||
- health check shows timer until next health check is performed.
|
||||
- `feat`: added bootstramp toast notifications and modals
|
||||
- `feat`: new modal dialog when when user triggers a re-sync of the m3u and epg data
|
||||
- `feat`: footer of web interface how discloses which build is being ran; `stable` or `development`
|
||||
- `refactor`: console logging system overhauled with new syntax for how logs are displayed
|
||||
- `refactor`: additional logs added for `LOG_LEVEL=5` or higher
|
||||
|
||||
<br />
|
||||
|
||||
---
|
||||
|
||||
<br />
|
||||
|
||||
### <!-- md:version stable- --> 1.3.0 <small>Apr 9, 2025</small> { id="1.3.0" }
|
||||
|
||||
- `feat`: new button to upper-right side of header which allows you to **force re-sync** your m3u and xml data.
|
||||
- `feat`: new api endpoint `/api/resync`; utilized to resync M3U and EPG data
|
||||
- `feat`: new api endpoint `/api/health`; utilized in your `docker-compose.yml` health check
|
||||
- `feat`: new env variable `WEB_ENCODING`; allows you to customize the HTTP `Accept-Encoding` request and response header
|
||||
- `feat`: new env variable `IP_GATEWAY`; stores assigned container gateway ip
|
||||
- `feat`: new env variable `IP_CONTAINER`; stores assigned container ip
|
||||
- `refactor`: env variables re-named
|
||||
- `FILE_TAR` → `FILE_GZP`
|
||||
- `refactor`: errors and success messages now use api endpoint; lists timestamp, error code, etc.
|
||||
- `build`: bump bootstrap from `v4` to `v5`
|
||||
- `fix`: bug in Jellyfin which caused EPG data syncing to error out for hosts which cannot support gzip compression
|
||||
- Error: _[ERR] [27] Jellyfin.LiveTv.Guide.GuideManager: Error getting programs for channel XXXXXXXXXXXXXXX (Source 2) System.Xml.XmlException: '', hexadecimal value 0x1F, is an invalid character. Line 1, position 1._
|
||||
|
||||
<br />
|
||||
|
||||
---
|
||||
|
||||
<br />
|
||||
|
||||
### <!-- md:version stable- --> 1.2.0 <small>Apr 5, 2025</small> { id="1.2.0" }
|
||||
|
||||
- `feat`: add support for additional mime types and default file type
|
||||
- `style`: rename env variable `FILE_PLAYLIST` to `FILE_M3U`
|
||||
- `build`: add new env vars to `Dockerfile`
|
||||
- `FILE_TAR`
|
||||
- `FILE_URL`
|
||||
- `refactor`: m3u and epg files now stored in `www` folder
|
||||
- `fix`: html template links pointing to old repo
|
||||
|
||||
<br />
|
||||
|
||||
---
|
||||
|
||||
<br />
|
||||
|
||||
### <!-- md:version stable- --> 1.1.0 <small>Mar 25, 2025</small> { id="1.1.0" }
|
||||
|
||||
- `feat`: new interface & theme for web ui
|
||||
@@ -66,6 +120,10 @@ This section outlines all releases of TVApp2, including the version of the relea
|
||||
|
||||
<br />
|
||||
|
||||
---
|
||||
|
||||
<br />
|
||||
|
||||
### <!-- md:version stable- --> 1.0.0 <small>Feb 24, 2025</small> { id="1.0.0" }
|
||||
|
||||
- Initial release
|
||||
|
||||
@@ -42,10 +42,21 @@ All channels contain multiple sources so that you have a reliable streaming expe
|
||||
|
||||
<br />
|
||||
|
||||
## Associated Links
|
||||
## Image Sources
|
||||
|
||||
Check out the following websites for additional resources for the TVApp2 docker image below.
|
||||
This project contains several repositories which all share the same code; use them as backups:
|
||||
|
||||
- [🔀 dockerhub:thebinaryninja/tvapp2](https://hub.docker.com/r/thebinaryninja/tvapp2)
|
||||
- [🔀 github:thebinaryninja/tvapp2](https://github.com/thebinaryninja/tvapp2)
|
||||
- [🔀 gitea:git.binaryninja.net/binaryninja/tvapp2](https://git.binaryninja.net/binaryninja/tvapp2)
|
||||
|
||||
<br />
|
||||
|
||||
| Pull URL | Registry | Arch | Version |
|
||||
| --- | --- | --- | --- |
|
||||
| `ghcr.io/thebinaryninja/tvapp2:latest`<br />`ghcr.io/thebinaryninja/tvapp2:development` | Github | amd64<br/>arm64 | [![Github][github-docker-version-img]][github-docker-version-uri] |
|
||||
| `thebinaryninja/tvapp2:latest`<br />`thebinaryninja/tvapp2:development` | Dockerhub | amd64<br/>arm64 | [![Dockerhub][dockerhub-docker-version-img]][dockerhub-docker-version-uri] |
|
||||
| `git.binaryninja.net/binaryninja/tvapp2:latest`<br />`git.binaryninja.net/binaryninja/tvapp2:development` | Gitea | amd64<br/>arm64 | [![Gitea][gitea-docker-version-img]][gitea-docker-version-uri] |
|
||||
|
||||
<br />
|
||||
|
||||
@@ -64,6 +75,13 @@ The following is a small list of the features available with the TVApp2 containe
|
||||
- Channel playlists can be downloaded as a `.m38u` or a compressed `.gzip` archive.
|
||||
- Compressed gzip compatible with 3rd party apps like Cabernet and Jellyfin.
|
||||
- Tracking statistics which show the last update time, size, and a description for each file's purpose.
|
||||
- API endpoints:
|
||||
- **Resync All Files**
|
||||
- http://127.0.0.1:4124/api/resync
|
||||
- http://127.0.0.1:4124/api/restart
|
||||
- **Health check**
|
||||
- http://127.0.0.1:4124/api/health
|
||||
- http://127.0.0.1:4124/api/status
|
||||
- Direct access to download each of the generated files, including multiple easy-to-remember URLs for each file type.
|
||||
- **M3U Playlist**:
|
||||
- http://127.0.0.1:4124/playlist
|
||||
|
||||
BIN
docs/docs/assets/images/health-toast.gif
Normal file
BIN
docs/docs/assets/images/health-toast.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
@@ -175,6 +175,63 @@ services:
|
||||
|
||||
<br />
|
||||
|
||||
## WEB_ENCODING
|
||||
<!-- md:control env -->
|
||||
<!-- md:version stable-1.3.0 -->
|
||||
<!-- md:default `deflate, br` -->
|
||||
|
||||
The `WEB_ENCODING` environment variable allows you to customize the HTTP `Accept-Encoding` request and response header. This value specifies what content encoding the sender can understand when sending these requests.
|
||||
|
||||
Most users will not need to modify this value unless you are running Jellyfin and receive the following error when attempting to sync EPG data between Jellyfin and the TVApp2 container:
|
||||
|
||||
!!! warning "Jellyfin Error"
|
||||
|
||||
```
|
||||
[ERR] [27] Jellyfin.LiveTv.Guide.GuideManager: Error getting programs for channel
|
||||
XXXXXXXXXXXXXXX (Source 2) System.Xml.XmlException: '', hexadecimal value 0x1F,
|
||||
is an invalid character. Line 1, position 1.
|
||||
```
|
||||
|
||||
If you receive the above error and you have already customized this environment variable to include `gzip`, you must remove it from your accepted encoders string to fix the error.
|
||||
|
||||
=== "Old"
|
||||
|
||||
``` { .yaml .copy .select title="docker-compose.yml" linenums="1" hl_lines="13" }
|
||||
services:
|
||||
tvapp2:
|
||||
container_name: tvapp2
|
||||
image: ghcr.io/thebinaryninja/tvapp2:latest
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./config:/config
|
||||
- ./app:/usr/bin/app
|
||||
environment:
|
||||
- WEB_ENCODING: 'gzip, deflate, br'
|
||||
```
|
||||
|
||||
=== "New"
|
||||
|
||||
``` { .yaml .copy .select title="docker-compose.yml" linenums="1" hl_lines="13" }
|
||||
services:
|
||||
tvapp2:
|
||||
container_name: tvapp2
|
||||
image: ghcr.io/thebinaryninja/tvapp2:latest
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./config:/config
|
||||
- ./app:/usr/bin/app
|
||||
environment:
|
||||
- WEB_ENCODING: 'deflate, br'
|
||||
```
|
||||
|
||||
<br />
|
||||
|
||||
## URL_REPO
|
||||
<!-- md:control env -->
|
||||
<!-- md:version stable-1.0.0 -->
|
||||
@@ -202,19 +259,19 @@ services:
|
||||
```
|
||||
|
||||
1. :warning: It is highly recommended that you do not change this value
|
||||
otherwise you will not be able to download the latest M3U playlists and EPG
|
||||
guide data.
|
||||
otherwise you will not be able to download the latest M3U playlists
|
||||
and EPG guide data.
|
||||
|
||||
<br />
|
||||
|
||||
## DIR_BUILD
|
||||
## FILE_URL
|
||||
<!-- md:control env -->
|
||||
<!-- md:version stable-1.0.0 -->
|
||||
<!-- md:default `/usr/src/app` -->
|
||||
<!-- md:flag dangerous -->
|
||||
<!-- md:version stable-1.2.0 -->
|
||||
<!-- md:default `urls.txt` -->
|
||||
|
||||
The `DIR_BUILD` environment variable specifies what local folder will be utilized
|
||||
by the TVApp2 docker container when the container builds the app.
|
||||
The `FILE_URL` environment variable allows you to specify what the name of the downloaded `urls.txt` cache file. This file is downloaded when you first spin up the TVApp2 container.
|
||||
|
||||
There should be no need to utilize this environment variable unless you have a specific reason.
|
||||
|
||||
``` { .yaml .copy .select title="docker-compose.yml" linenums="1" hl_lines="13" }
|
||||
services:
|
||||
@@ -229,85 +286,22 @@ services:
|
||||
- ./config:/config
|
||||
- ./app:/usr/bin/app
|
||||
environment:
|
||||
- DIR_BUILD=/usr/src/app # (1)
|
||||
- FILE_URL=urls.txt # (1)
|
||||
```
|
||||
|
||||
1. :warning: You should not change this unless you are an advanced user.
|
||||
1. :warning: There is really no reason to modify this environment variable
|
||||
unless you have a specific purpose.
|
||||
|
||||
<br />
|
||||
|
||||
## DIR_RUN
|
||||
<!-- md:control env -->
|
||||
<!-- md:version stable-1.0.0 -->
|
||||
<!-- md:default `/usr/src/app` -->
|
||||
<!-- md:flag dangerous -->
|
||||
|
||||
The `DIR_RUN` environment variable specifies what local folder will be utilized
|
||||
by the TVApp2 docker container when the container has built the app and placed it
|
||||
into a production folder.
|
||||
|
||||
``` { .yaml .copy .select title="docker-compose.yml" linenums="1" hl_lines="13" }
|
||||
services:
|
||||
tvapp2:
|
||||
container_name: tvapp2
|
||||
image: ghcr.io/thebinaryninja/tvapp2:latest
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./config:/config
|
||||
- ./app:/usr/bin/app
|
||||
environment:
|
||||
- DIR_RUN=/usr/bin/app # (1)
|
||||
```
|
||||
|
||||
1. :warning: You should not change this unless you are an advanced user.
|
||||
|
||||
<br />
|
||||
|
||||
## STREAM_QUALITY
|
||||
<!-- md:control env -->
|
||||
<!-- md:version stable-1.1.0 -->
|
||||
<!-- md:default `hd` -->
|
||||
|
||||
The `STREAM_QUALITY` environment variable specifies the default stream quality that will
|
||||
be used when you initiate a new channel to view.
|
||||
|
||||
Available Options:
|
||||
|
||||
* `hd` High Definition
|
||||
* `sd` Standard Definition
|
||||
|
||||
``` { .yaml .copy .select title="docker-compose.yml" linenums="1" hl_lines="13" }
|
||||
services:
|
||||
tvapp2:
|
||||
container_name: tvapp2
|
||||
image: ghcr.io/thebinaryninja/tvapp2:latest
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./config:/config
|
||||
- ./app:/usr/bin/app
|
||||
environment:
|
||||
- STREAM_QUALITY=hd # (1)
|
||||
```
|
||||
|
||||
1. :information: This environment variable has the following options:
|
||||
- hd
|
||||
- sd
|
||||
|
||||
<br />
|
||||
|
||||
## FILE_PLAYLIST
|
||||
## FILE_M3U
|
||||
<!-- md:control env -->
|
||||
<!-- md:version stable-1.1.0 -->
|
||||
<!-- md:default `playlist.m3u8` -->
|
||||
|
||||
The `FILE_PLAYLIST` environment variable specifies the filename that will be utilized when
|
||||
your .m3u playlist file is generated.
|
||||
The `FILE_M3U` environment variable allows you to specify what the name of the downloaded `playlist.m3u8` file will be. This file is downloaded when you first spin up the TVApp2 container, and contains a list of what channels you can pick from.
|
||||
|
||||
There should be no need to utilize this environment variable unless you have a specific reason.
|
||||
|
||||
``` { .yaml .copy .select title="docker-compose.yml" linenums="1" hl_lines="13" }
|
||||
services:
|
||||
@@ -322,11 +316,12 @@ services:
|
||||
- ./config:/config
|
||||
- ./app:/usr/bin/app
|
||||
environment:
|
||||
- FILE_PLAYLIST=playlist.m3u8 # (1)
|
||||
- FILE_M3U=playlist.m3u8 # (1)
|
||||
```
|
||||
|
||||
1. :information: Changing this file only changes the filename locally; it does
|
||||
not affect the server-side fetching mechanism.
|
||||
1. :warning: There is really no reason to modify this environment variable
|
||||
unless you have a specific purpose.
|
||||
|
||||
|
||||
<br />
|
||||
|
||||
@@ -389,6 +384,100 @@ services:
|
||||
|
||||
<br />
|
||||
|
||||
## STREAM_QUALITY
|
||||
<!-- md:control env -->
|
||||
<!-- md:version stable-1.1.0 -->
|
||||
<!-- md:default `hd` -->
|
||||
|
||||
The `STREAM_QUALITY` environment variable specifies the default stream quality that will
|
||||
be used when you initiate a new channel to view.
|
||||
|
||||
Available Options:
|
||||
|
||||
* `hd` High Definition
|
||||
* `sd` Standard Definition
|
||||
|
||||
``` { .yaml .copy .select title="docker-compose.yml" linenums="1" hl_lines="13" }
|
||||
services:
|
||||
tvapp2:
|
||||
container_name: tvapp2
|
||||
image: ghcr.io/thebinaryninja/tvapp2:latest
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./config:/config
|
||||
- ./app:/usr/bin/app
|
||||
environment:
|
||||
- STREAM_QUALITY=hd # (1)
|
||||
```
|
||||
|
||||
1. :information: This environment variable has the following options:
|
||||
- hd
|
||||
- sd
|
||||
|
||||
<br />
|
||||
|
||||
## DIR_BUILD
|
||||
<!-- md:control env -->
|
||||
<!-- md:version stable-1.0.0 -->
|
||||
<!-- md:default `/usr/src/app` -->
|
||||
<!-- md:flag dangerous -->
|
||||
|
||||
The `DIR_BUILD` environment variable specifies what local folder will be utilized
|
||||
by the TVApp2 docker container when the container builds the app.
|
||||
|
||||
``` { .yaml .copy .select title="docker-compose.yml" linenums="1" hl_lines="13" }
|
||||
services:
|
||||
tvapp2:
|
||||
container_name: tvapp2
|
||||
image: ghcr.io/thebinaryninja/tvapp2:latest
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./config:/config
|
||||
- ./app:/usr/bin/app
|
||||
environment:
|
||||
- DIR_BUILD=/usr/src/app # (1)
|
||||
```
|
||||
|
||||
1. :warning: You should not change this unless you are an advanced user.
|
||||
|
||||
<br />
|
||||
|
||||
## DIR_RUN
|
||||
<!-- md:control env -->
|
||||
<!-- md:version stable-1.0.0 -->
|
||||
<!-- md:default `/usr/src/app` -->
|
||||
<!-- md:flag dangerous -->
|
||||
|
||||
The `DIR_RUN` environment variable specifies what local folder will be utilized
|
||||
by the TVApp2 docker container when the container has built the app and placed it
|
||||
into a production folder.
|
||||
|
||||
``` { .yaml .copy .select title="docker-compose.yml" linenums="1" hl_lines="13" }
|
||||
services:
|
||||
tvapp2:
|
||||
container_name: tvapp2
|
||||
image: ghcr.io/thebinaryninja/tvapp2:latest
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./config:/config
|
||||
- ./app:/usr/bin/app
|
||||
environment:
|
||||
- DIR_RUN=/usr/bin/app # (1)
|
||||
```
|
||||
|
||||
1. :warning: You should not change this unless you are an advanced user.
|
||||
|
||||
<br />
|
||||
|
||||
## LOG_LEVEL
|
||||
<!-- md:control env -->
|
||||
<!-- md:version stable-1.1.0 -->
|
||||
@@ -417,13 +506,16 @@ when being output to your console.
|
||||
|
||||
1. :information: The default log level is `4` (info).
|
||||
|
||||
=== "Logging Options"
|
||||
=== "Log Levels"
|
||||
|
||||
| Log Level | Name | Description |
|
||||
| --------------- | ----------- | ------------------------------------------------------------------------------- |
|
||||
| `6` | Trace | Displays all possible logs in console, along with anything below this line. |
|
||||
| `5` | Debug | Displays debug / developer logs, along with anything below this line. |
|
||||
| `4` | Info | Displays informative logs, along with anything below this line. |
|
||||
| `3` | Notice | Displays important notices, along with anything below this line. |
|
||||
| `2` | Warm | Displays warnings, along with anything below this line. |
|
||||
| `1` | Error | Displays only errors, none of the log levels above this line will be shown |
|
||||
| `6` | :material-checkbox-blank-circle:{ style="color: var(--md-loglevel-trace-color) " } Trace | Displays all possible logs in console, along with anything below this line. |
|
||||
| `5` | :material-checkbox-blank-circle:{ style="color: var(--md-loglevel-debug-color) " } Debug | Displays debug / developer logs, along with anything below this line. |
|
||||
| `4` | :material-checkbox-blank-circle:{ style="color: var(--md-loglevel-info-color) " } Info | Displays informative logs, along with anything below this line. |
|
||||
| `3` | :material-checkbox-blank-circle:{ style="color: var(--md-loglevel-notice-color) " } Notice | Displays important notices, along with anything below this line. |
|
||||
| `2` | :material-checkbox-blank-circle:{ style="color: var(--md-loglevel-warn-color) " } Warn | Displays warnings, along with anything below this line. |
|
||||
| `1` | :material-checkbox-blank-circle:{ style="color: var(--md-loglevel-error-color) " } Error | Displays only errors, none of the log levels above this line will be shown |
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
109
docs/docs/config/volumes.md
Normal file
109
docs/docs/config/volumes.md
Normal file
@@ -0,0 +1,109 @@
|
||||
---
|
||||
title: Environment Variables
|
||||
tags:
|
||||
- config
|
||||
---
|
||||
|
||||
# Mountable Volumes
|
||||
|
||||
Mountable volumes in Docker allow you to share folders within a docker container with your host machine. This allows you to access these specific files without having to bash into the container and using the terminal to navigate around.
|
||||
|
||||
The TVApp2 docker image provides a few different paths that you can mount to your host machine; as outlined below.
|
||||
|
||||
<br />
|
||||
|
||||
## 📁 /usr/bin/app
|
||||
|
||||
<!-- md:control volume -->
|
||||
<!-- md:version stable-1.0.0 -->
|
||||
|
||||
The mountable volume `/usr/bin/app` is where TVApp2 files will be placed once the app has been built when your docker container spins up. The files in this folder include:
|
||||
|
||||
| File | Description |
|
||||
| --- | --- |
|
||||
| `📁 node_modules` | List of all NodeJS packages utilized by TVApp2 |
|
||||
| `📁 www` | Main storage folder for TVApp2. Contains website files and M3U / EPG synced files |
|
||||
| `📄 package.json` | NodeJS package file |
|
||||
| `📄 playlist.m3u8` | Generated playlist containing channels |
|
||||
| `📄 urls.txt` | List containing cached URLs utilized by TVApp2 |
|
||||
| `📄 xmltv.xml` | EPG guide data in uncompressed XML format |
|
||||
| `📄 xmltv.xml.gz` | EPG guide data in compressed GZ archive |
|
||||
| `📄 index.js` | Main source code file for TVApp2 |
|
||||
|
||||
<br />
|
||||
|
||||
=== "Example"
|
||||
|
||||
``` { .yaml .copy .select title="docker-compose.yml" linenums="1" hl_lines="7" }
|
||||
services:
|
||||
tvapp2:
|
||||
container_name: tvapp2
|
||||
image: ghcr.io/thebinaryninja/tvapp2:latest
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./app:/usr/bin/app # (1)
|
||||
```
|
||||
|
||||
1. :information: Changing this env variable will change the time for anything
|
||||
related to the TVApp2 docker container.
|
||||
|
||||
<br />
|
||||
|
||||
This folder path can be changed by specifying a new path with the environment variable `DIR_RUN`
|
||||
|
||||
=== "Example"
|
||||
|
||||
``` { .yaml .copy .select title="docker-compose.yml" linenums="1" hl_lines="7" }
|
||||
services:
|
||||
tvapp2:
|
||||
container_name: tvapp2
|
||||
image: ghcr.io/thebinaryninja/tvapp2:latest
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./app:/usr/bin/app # (1) (2)
|
||||
```
|
||||
|
||||
1. :information: Changing this env variable will change the folder within the docker container which stores the fully built TVApp2 files.
|
||||
|
||||
2. This should not be used unless you know what you're doing
|
||||
|
||||
<br />
|
||||
|
||||
---
|
||||
|
||||
<br />
|
||||
|
||||
## 📁 /config
|
||||
|
||||
<!-- md:control volume -->
|
||||
<!-- md:version stable-1.0.0 -->
|
||||
|
||||
The mountable volume `/config` defines where the TVApp2 application will store SSL certificates related to the TVApp2 web interface being ran using https instead of http. The files in this folder include:
|
||||
|
||||
| File | Description |
|
||||
| --- | --- |
|
||||
| `📁 keys` | Folder which stores the SSL cert and keys |
|
||||
| `📄 keys/cert.crt` | SSL public certificate |
|
||||
| `📄 keys/key.crt` | SSL private key |
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
=== "Example"
|
||||
|
||||
``` { .yaml .copy .select title="docker-compose.yml" linenums="1" hl_lines="7" }
|
||||
services:
|
||||
tvapp2:
|
||||
container_name: tvapp2
|
||||
image: ghcr.io/thebinaryninja/tvapp2:latest
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./config:/config # (1) (2)
|
||||
```
|
||||
|
||||
1. :information: Changing this env variable will change the folder within the docker container which stores the fully built TVApp2 files.
|
||||
|
||||
2. This should not be used unless you know what you're doing
|
||||
|
||||
<br />
|
||||
<br />
|
||||
13
docs/docs/includes/abbreviations.md
Normal file
13
docs/docs/includes/abbreviations.md
Normal file
@@ -0,0 +1,13 @@
|
||||
[mkdocs]: https://www.mkdocs.org
|
||||
[mkdocs.dotfiles]: https://www.mkdocs.org/dev-guide/themes/#dot-files
|
||||
[mkdocs.metadata]: https://www.mkdocs.org/user-guide/writing-your-docs/#yaml-style-meta-data
|
||||
[mkdocs.env]: https://www.mkdocs.org/user-guide/configuration/#environment-variables
|
||||
[mkdocs.docs_dir]: https://www.mkdocs.org/user-guide/configuration/#docs_dir
|
||||
[mkdocs.extra_templates]: https://www.mkdocs.org/user-guide/configuration/#extra_templates
|
||||
[mkdocs.site_dir]: https://www.mkdocs.org/user-guide/configuration/#site_dir
|
||||
[mkdocs.site_url]: https://www.mkdocs.org/user-guide/configuration/#site_url
|
||||
[mkdocs.site_description]: https://www.mkdocs.org/user-guide/configuration/#site_description
|
||||
[mkdocs.nav]: https://www.mkdocs.org/user-guide/configuration/#nav
|
||||
[mkdocs.plugins]: https://www.mkdocs.org/user-guide/configuration/#plugins
|
||||
[mkdocs.strict]: https://www.mkdocs.org/user-guide/configuration/#strict
|
||||
[mkdocs.use_directory_urls]: https://www.mkdocs.org/user-guide/configuration/#use_directory_urls
|
||||
125
docs/docs/install/docker-run.md
Normal file
125
docs/docs/install/docker-run.md
Normal file
@@ -0,0 +1,125 @@
|
||||
---
|
||||
title: "Install: docker-run"
|
||||
tags:
|
||||
- install
|
||||
---
|
||||
|
||||
# docker run
|
||||
|
||||
Our documentation provides two ways that you may start up a TVApp2 docker container:
|
||||
|
||||
<div class="grid cards" markdown>
|
||||
|
||||
- :material-circle: [docker run](docker-run.md)
|
||||
|
||||
---
|
||||
|
||||
Spin up the TVApp2 container using the `docker run` command.
|
||||
This is useful for quick launches, but is not time efficient
|
||||
if you plan to use this container long-term.
|
||||
|
||||
This requires a longer command that must be used each time
|
||||
you wish to bring the container up.
|
||||
|
||||
- :material-circle: [docker compose](docker-compose.md)
|
||||
|
||||
---
|
||||
|
||||
Spin up the TVApp2 container by creating a `📄 docker-compose.yml`
|
||||
file which will store all of your options such as env variables,
|
||||
mounted volumes, and labels.
|
||||
|
||||
To bring the container up, `cd` into the folder with the
|
||||
`📄 docker-compose.yml` file, and run the
|
||||
command `docker compose up -d`.
|
||||
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
The `🗔 docker run` command allows you to start up a docker container by providing a set of [options](#command-options) which define how the container should operate, including the environment variables, mounted volumes, assigned IP address, etc.
|
||||
|
||||
<br />
|
||||
|
||||
---
|
||||
|
||||
<br />
|
||||
|
||||
## Start TVApp2
|
||||
|
||||
Pulling the image if needed and starting the container. To spin up a TVApp2 container using this method; run a command similar to the below example. See the section [Options](#options) below for a list of what you can specify.
|
||||
|
||||
=== "Terminal"
|
||||
|
||||
```shell
|
||||
docker run -d \
|
||||
--restart=unless-stopped \ # (1)!
|
||||
--name tvapp2 \ # (2)!
|
||||
-p 4124:4124 \ # (3)!
|
||||
-e "TZ=Etc/UTC" \ # (4)!
|
||||
-v ${PWD}/app:/usr/bin/app \ # (5)!
|
||||
ghcr.io/thebinaryninja/tvapp2:latest # (6)!
|
||||
```
|
||||
|
||||
1. Specifies what happens if the container becomes unresponsive or goes down.
|
||||
2. Name to assign the container; otherwise, a random id will be given.
|
||||
3. Port that will be used for the container
|
||||
4. Environment variable which specifies the timezone to use for the container.
|
||||
5. Mount the container volume `/usr/bin/app` to your host machine in the subfolder `./app`
|
||||
6. Specifies what docker image to spin up.
|
||||
|
||||
<br />
|
||||
|
||||
To confirm that the container has been brought up, run the command `docker ps | grep tvapp2`. If you have the app [Portainer](https://portainer.io/), you can sign into your admin interface and view your TVApp2 container details, instead of using a command-line.
|
||||
|
||||
```
|
||||
e95236c42b43 binaryninja/tvapp2:1.4.0 "/init" 3 seconds ago Up 3 seconds 4124/tcp tvapp2
|
||||
```
|
||||
|
||||
<br />
|
||||
|
||||
---
|
||||
|
||||
<br />
|
||||
|
||||
## Options
|
||||
|
||||
Review the list of docker run options below. These allow you to define how a docker container will start up.
|
||||
|
||||
???- note "Official Docker Documentation"
|
||||
To view a full list of the available docker parameters, view the official docker documentation at:
|
||||
|
||||
- https://docs.docker.com/reference/cli/docker/container/run/
|
||||
|
||||
| Parameter / Flag | Description |
|
||||
| --- | --- |
|
||||
| `-d, --detach` | Run container in background and print container ID |
|
||||
| `-e, --env` | Set environment variable |
|
||||
| `--env-file` | Read in a file of environment variables |
|
||||
| `--expose` | Expose a port or a range of ports |
|
||||
| `--health-cmd` | Command to run to check health |
|
||||
| `--health-interval` | Time between running the check<br/>`ms|s|m|h` (default 0s) |
|
||||
| `--health-retries` | Consecutive failures needed to report unhealthy |
|
||||
| `--health-start-interval` | Time between running the check during the start period<br/>`ms|s|m|h` (default 0s) |
|
||||
| `--health-start-period` | Start period for the container to initialize before starting health-retries countdown<br/>`ms|s|m|h` (default 0s) |
|
||||
| `--health-timeout` | Maximum time to allow one check to run<br/>`ms|s|m|h` (default 0s) |
|
||||
| `-h, --hostname` | Container host name |
|
||||
| `--ip` | IPv4 address (e.g., 172.30.100.104) |
|
||||
| `--ip6` | IPv6 address (e.g., 2001:db8::33) |
|
||||
| `-l, --label` | Set meta data on a container |
|
||||
| `--mount` | Attach a filesystem mount to the container |
|
||||
| `--name` | Assign a name to the container |
|
||||
| `--network` | Connect a container to a network |
|
||||
| `--privileged` | Give extended privileges to this container |
|
||||
| `-p, --publish` | Publish a container's port(s) to the host |
|
||||
| `--pull` | Pull image before running<br/>`always`, `missing`, `never` |
|
||||
| `--restart` | Restart policy to apply when a container exits <br/> `on-failure[:max-retries]`, `always`, `unless-stopped` |
|
||||
| `-u, --user` | Username or UID <br/>`<name|uid>[:<group|gid>]` |
|
||||
| `-v, --volume` | Bind mount a volume |
|
||||
| `-w, --workdir` | Working directory inside the container |
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<br />
|
||||
<br />
|
||||
47
docs/docs/install/index.md
Normal file
47
docs/docs/install/index.md
Normal file
@@ -0,0 +1,47 @@
|
||||
---
|
||||
title: Install
|
||||
tags:
|
||||
- install
|
||||
---
|
||||
|
||||
# Installing TVApp2
|
||||
|
||||
To install TVApp2 using docker; you will need to use either the `🗔 docker run` command, or create a `📄 docker-compose.yml` file which contains information about how to pull the latest image and spin the container up. We have provided instructions for both.
|
||||
|
||||
<br />
|
||||
|
||||
{==
|
||||
|
||||
Select your desired option to bring up the TVApp2 container with:
|
||||
|
||||
==}
|
||||
|
||||
<div class="grid cards" markdown>
|
||||
|
||||
- :material-circle: [docker run](docker-run.md)
|
||||
|
||||
---
|
||||
|
||||
Spin up the TVApp2 container using the `docker run` command.
|
||||
This is useful for quick launches, but is not time efficient
|
||||
if you plan to use this container long-term.
|
||||
|
||||
This requires a longer command that must be used each time
|
||||
you wish to bring the container up.
|
||||
|
||||
- :material-circle: [docker compose](docker-compose.md)
|
||||
|
||||
---
|
||||
|
||||
Spin up the TVApp2 container by creating a `📄 docker-compose.yml`
|
||||
file which will store all of your options such as env variables,
|
||||
mounted volumes, and labels.
|
||||
|
||||
To bring the container up, `cd` into the folder with the
|
||||
`📄 docker-compose.yml` file, and run the
|
||||
command `docker compose up -d`.
|
||||
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
@@ -179,6 +179,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
[dir="ltr"] .md-typeset table th[role="columnheader"]::after
|
||||
{
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
/*
|
||||
Theme > Main
|
||||
*/
|
||||
@@ -191,6 +196,13 @@
|
||||
--md-tooltip-width: 400px;
|
||||
--glow-color: hsl(186 100% 69%);
|
||||
|
||||
--md-loglevel-error-color: #f06090;
|
||||
--md-loglevel-warn-color: #e6695b;
|
||||
--md-loglevel-notice-color: #e2d55e;
|
||||
--md-loglevel-info-color: #6791e0;
|
||||
--md-loglevel-debug-color: #c973d9;
|
||||
--md-loglevel-trace-color: hsla(225deg,15%,90%,0.56);
|
||||
|
||||
--md-default-fg-color: hsla(var(--md-hue),15%,90%,0.82);
|
||||
--md-default-fg-color--light: hsla(var(--md-hue),15%,90%,0.56);
|
||||
--md-default-fg-color--lighter: hsla(var(--md-hue),15%,90%,0.32);
|
||||
@@ -411,7 +423,28 @@
|
||||
|
||||
.md-typeset .tabbed-labels
|
||||
{
|
||||
background-color: #0d0d0d;
|
||||
background-color: #0b0b0b;
|
||||
border-top-left-radius: 4px;
|
||||
border-left: 1px solid #242735;
|
||||
border-top: 1px solid #242735;
|
||||
border-right: 1px solid #242735;
|
||||
border-top-right-radius: 4px;
|
||||
}
|
||||
|
||||
.tabbed-labels::before
|
||||
{
|
||||
background: hsla(343.1, 87.9%, 51.6%, 0.82);
|
||||
bottom: 0;
|
||||
content: "";
|
||||
display: block;
|
||||
height: 2px;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
transform: translateX(var(--md-indicator-x));
|
||||
transition: width 225ms,background-color .25s,transform .25s;
|
||||
transition-timing-function: ease, ease, ease;
|
||||
transition-timing-function: cubic-bezier(.4,0,.2,1);
|
||||
width: var(--md-indicator-width);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -561,6 +594,25 @@ h4:has(.twemoji) .twemoji
|
||||
--md-typeset-bg-color: #111;
|
||||
}
|
||||
|
||||
@keyframes health
|
||||
{
|
||||
0%, 40%, 80%, 100% {
|
||||
transform: scale(1);
|
||||
color: #FFF;
|
||||
fill: #FFF !important;
|
||||
}
|
||||
20%, 60% {
|
||||
transform: scale(1.15);
|
||||
color: #FF6593;
|
||||
fill: #FF6593 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.heart
|
||||
{
|
||||
animation: health 1000ms infinite;
|
||||
}
|
||||
|
||||
.md-typeset .mdx-badge--heart {
|
||||
--md-badge-icon-color: #e92063;
|
||||
--md-badge-icon-hover-color: #FFFFFF;
|
||||
|
||||
164
docs/docs/usage/healthcheck.md
Normal file
164
docs/docs/usage/healthcheck.md
Normal file
@@ -0,0 +1,164 @@
|
||||
---
|
||||
title: Healthcheck
|
||||
tags:
|
||||
- usage
|
||||
---
|
||||
|
||||
# Healthcheck
|
||||
|
||||
This docker container includes the ability to run health checks between the container api and outside services such as Portainer, or any other app that has the ability to query the endpoint `api/health`.
|
||||
|
||||
<br />
|
||||
|
||||
---
|
||||
|
||||
<br />
|
||||
|
||||
## API
|
||||
<!-- md:version stable-1.4.0 -->
|
||||
|
||||
This container includes the ability to run health checks utilizing the built-in API. You can directly access the health check and view a json formatted result with the url `https://tvapp2.domain.lan/api/health`
|
||||
|
||||
=== "Example"
|
||||
|
||||
``` { .yaml .copy .select title="/api/health" linenums="1" }
|
||||
{
|
||||
"ip": "172.18.2.1",
|
||||
"gateway": "172.18.0.1",
|
||||
"uptime": 5903.549082501,
|
||||
"message": "healthy",
|
||||
"status": "healthy",
|
||||
"ref": "/api/health",
|
||||
"method": "GET",
|
||||
"code": 200,
|
||||
"timestamp": 1744386346242
|
||||
}
|
||||
```
|
||||
|
||||
<br />
|
||||
|
||||
Numerous aliases have been added; you can use any of the following URLs to access the same health check results as they go to the same endpoint:
|
||||
|
||||
- https://tvapp2.domain.lan/api/health
|
||||
- https://tvapp2.domain.lan/api/status
|
||||
|
||||
<br />
|
||||
|
||||
---
|
||||
|
||||
<br />
|
||||
|
||||
## Portainer
|
||||
<!-- md:version stable-1.3.0 -->
|
||||
|
||||
To run a health check between TVApp2 and Portainer, apply the following lines of code to your TVApp2 `docker-compose.yml`. Two examples have been provided, you can use either one; `wget` or `curl`:
|
||||
|
||||
=== "Using CURL"
|
||||
|
||||
``` { .yaml .copy .select title="docker-compose.yml" linenums="1" hl_lines="14-18" }
|
||||
services:
|
||||
tvapp2:
|
||||
container_name: tvapp2
|
||||
image: ghcr.io/thebinaryninja/tvapp2:latest
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./config:/config
|
||||
- ./app:/usr/bin/app
|
||||
environment:
|
||||
- TZ=Etc/UTC
|
||||
health check:
|
||||
test: "curl --fail --silent http://127.0.0.1:4124/api/health | grep -i healthy || exit 1"
|
||||
interval: 15s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
```
|
||||
|
||||
=== "Using WGET"
|
||||
|
||||
``` { .yaml .copy .select title="docker-compose.yml" linenums="1" hl_lines="14-18" }
|
||||
services:
|
||||
tvapp2:
|
||||
container_name: tvapp2
|
||||
image: ghcr.io/thebinaryninja/tvapp2:latest
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./config:/config
|
||||
- ./app:/usr/bin/app
|
||||
environment:
|
||||
- TZ=Etc/UTC
|
||||
health check:
|
||||
test: "wget -qO- http://127.0.0.1:4124/api/health | grep -i healthy || exit 1"
|
||||
interval: 15s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
```
|
||||
|
||||
<br />
|
||||
|
||||
---
|
||||
|
||||
<br />
|
||||
|
||||
## Web Interface
|
||||
<!-- md:version stable-1.4.0 -->
|
||||
|
||||
The TVApp2 web interface is equip with its own health check which is ran every `10 minutes` by default. Users will notice a health indicator in the top right of the header navigation bar which is represented by the :octicons-heart-fill-24:{ .heart } icon.
|
||||
|
||||
When the health check is ran every 10 minutes; a toast notification will appear in the lower-right side of the page:
|
||||
|
||||
<figure markdown="span">
|
||||
{ width="80%" }
|
||||
<figcaption>Health check toast notification</figcaption>
|
||||
</figure>
|
||||
|
||||
<br />
|
||||
|
||||
### Health Check Duration
|
||||
<!-- md:control env -->
|
||||
<!-- md:version stable-1.4.0 -->
|
||||
<!-- md:default `600000` -->
|
||||
|
||||
By default, a health check between the TVApp2 container and the web interface is done every `10 minutes`, but you can change this duration to something less or more. Be aware that if you set the time too low, you will constantly be spammed with toast notifications.
|
||||
|
||||
To change the health check delay, add the environment variable `HEALTH_TIMER` to your TVApp2 `docker-compose.yml`. Duration is in milliseconds.
|
||||
|
||||
<br />
|
||||
|
||||
=== "Example"
|
||||
|
||||
``` { .yaml .copy .select title="docker-compose.yml" linenums="1" hl_lines="13" }
|
||||
services:
|
||||
tvapp2:
|
||||
container_name: tvapp2
|
||||
image: ghcr.io/thebinaryninja/tvapp2:latest
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./config:/config
|
||||
- ./app:/usr/bin/app
|
||||
environment:
|
||||
- HEALTH_TIMER=600000 # (1)
|
||||
```
|
||||
|
||||
1. :information: Defines how often to perform health checks between the container and the web interface. Time is in milliseconds. <br /><br />Default value is `600000` (10 minutes)
|
||||
|
||||
=== "Time Chart"
|
||||
|
||||
| HEALTH_TIMER Value | Delay Between Checks |
|
||||
| --- | --- |
|
||||
| `HEALTH_TIMER=300000` | 5 minutes |
|
||||
| `HEALTH_TIMER=600000` | 10 minutes |
|
||||
| `HEALTH_TIMER=1200000` | 20 minutes |
|
||||
| `HEALTH_TIMER=1800000` | 30 minutes |
|
||||
| `HEALTH_TIMER=3600000` | 1 hour |
|
||||
|
||||
<br />
|
||||
<br />
|
||||
BIN
docs/img/screenshots/01.gif
Normal file
BIN
docs/img/screenshots/01.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 970 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 60 KiB |
1
docs/material/overrides/.icons/aetherx/axd/volume.svg
Normal file
1
docs/material/overrides/.icons/aetherx/axd/volume.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2024 Fonticons, Inc. --><defs><style>.fa-secondary{opacity:.4}</style></defs><path class="fa-secondary" d="M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 224c0 5.5-.7 10.8-2 16c-3.6-13.8-11.6-25.8-22.5-34.4c-5.4-4.3-11.6-7.7-18.2-10c-3.3-1.2-6.8-2.1-10.3-2.7c-1.8-.3-3.6-.5-5.4-.7c-.9-.1-1.8-.1-2.8-.2s-1.8-.1-2.8-.1L64 288c-29.8 0-54.9 20.4-62 48c-1.3-5.1-2-10.5-2-16L0 96zM352 384a32 32 0 1 1 -64 0 32 32 0 1 1 64 0z"/><path class="fa-primary" d="M0 352c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 64c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64l0-64zm352 32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm64 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"/></svg>
|
||||
|
After Width: | Height: | Size: 872 B |
@@ -164,6 +164,7 @@ def badgeControl( args: str, page: Page, files: Files ):
|
||||
elif type == "button": return newControlButton( page, files )
|
||||
elif type == "slider": return newControlSlider( page, files )
|
||||
elif type == "env": return newControlEnvVar( page, files )
|
||||
elif type == "volume": return newControlVolume( page, files )
|
||||
elif type == "color": return newControlColor( args, page, files )
|
||||
else: return newControlDefault( page, files )
|
||||
|
||||
@@ -935,7 +936,7 @@ def newControlColor( text: str, page: Page, files: Files ):
|
||||
# Icon : Control : Env Variable
|
||||
#
|
||||
# use the following tag in your md file:
|
||||
# <!-- md:control slider -->
|
||||
# <!-- md:control env -->
|
||||
# #
|
||||
|
||||
def newControlEnvVar( page: Page, files: Files ):
|
||||
@@ -948,3 +949,21 @@ def newControlEnvVar( page: Page, files: Files ):
|
||||
icon = f"[:{icon}:]({href} 'Type: Environment Variable')",
|
||||
type = "env"
|
||||
)
|
||||
|
||||
# #
|
||||
# Icon : Control : Volume
|
||||
#
|
||||
# use the following tag in your md file:
|
||||
# <!-- md:control volume -->
|
||||
# #
|
||||
|
||||
def newControlVolume( page: Page, files: Files ):
|
||||
icon = "aetherx-axd-volume"
|
||||
href = _resolve_path( f"{PAGE_CONVENTIONS}#control", page, files )
|
||||
|
||||
print(clr.MAGENTA + 'VERBOSE - ' + clr.WHITE + ' Running ' + clr.YELLOW + inspect.stack()[0][3] + clr.WHITE + ' for page ' + clr.GREY + str(href) + clr.WHITE )
|
||||
|
||||
return badgeCreate(
|
||||
icon = f"[:{icon}:]({href} 'Type: Mountable Volume')",
|
||||
type = "volume"
|
||||
)
|
||||
|
||||
@@ -29,6 +29,7 @@ site_url: 'https://thebinaryninja.github.io/tvapp2/'
|
||||
# #
|
||||
|
||||
markdown_extensions:
|
||||
- pymdownx.critic
|
||||
- markdown.extensions.extra
|
||||
- toc:
|
||||
permalink: true
|
||||
@@ -238,8 +239,15 @@ nav:
|
||||
- Wiki:
|
||||
- Conventions: 'about/conventions.md'
|
||||
- Tags: 'about/tags.md'
|
||||
- Install:
|
||||
- Getting Started: 'install/index.md'
|
||||
- docker run: 'install/docker-run.md'
|
||||
- docker compose: 'install/docker-compose.md'
|
||||
- Config:
|
||||
- Environment Variables: 'config/env.md'
|
||||
- Volumes: 'config/volumes.md'
|
||||
- Usage:
|
||||
- Healthcheck: 'usage/healthcheck.md'
|
||||
- Changelog: 'about/changelog.md'
|
||||
- Discord: 'https://discord.gg/gTze6hRe'
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
services:
|
||||
|
||||
# #
|
||||
# Service › TVApp2 › Traefik Labels
|
||||
# Service › TVApp2
|
||||
# #
|
||||
|
||||
tvapp2:
|
||||
@@ -40,7 +40,6 @@ services:
|
||||
volumes:
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./config:/config
|
||||
- ./app:/usr/bin/app
|
||||
ulimits:
|
||||
@@ -56,7 +55,7 @@ services:
|
||||
- traefik.enable=true
|
||||
|
||||
# #
|
||||
# Scope > http
|
||||
# Routers › Web Interface › http
|
||||
# #
|
||||
|
||||
- traefik.http.routers.tvapp2-http.rule=Host(`tvapp2.localhost`) || Host(`tvapp2.domain.lan`) || Host(`www.tvapp2.domain.lan`) || Host(`${SERVICE_IP}`)
|
||||
@@ -66,7 +65,7 @@ services:
|
||||
- traefik.http.routers.tvapp2-http.middlewares=https-redirect@file
|
||||
|
||||
# #
|
||||
# Scope > https
|
||||
# Routers › Web Interface › https
|
||||
#
|
||||
# remove the authentik@file line if you do not wish to use Authentik or middleware
|
||||
# - traefik.http.routers.tvapp2-https.middlewares=authentik@file
|
||||
@@ -83,8 +82,26 @@ services:
|
||||
- traefik.http.routers.tvapp2-https.middlewares=authentik@file
|
||||
|
||||
# #
|
||||
# Load Balancer
|
||||
# Routers › HDHomeRun
|
||||
# #
|
||||
|
||||
- traefik.http.services.tvapp2.loadbalancer.server.port=http
|
||||
- traefik.http.services.tvapp2.loadbalancer.server.scheme=4124
|
||||
- traefik.http.routers.hdhr-https.rule=Host(`hdhr.domain.lan`)
|
||||
- traefik.http.routers.hdhr-https.service=hdhr
|
||||
- traefik.http.routers.hdhr-https.entrypoints=https
|
||||
- traefik.http.routers.hdhr-https.priority=1
|
||||
- traefik.http.routers.hdhr-https.tls=true
|
||||
- traefik.http.routers.hdhr-https.tls.certresolver=cloudflare
|
||||
|
||||
# #
|
||||
# Services › Main Web Interface
|
||||
# #
|
||||
|
||||
- traefik.http.services.tvapp2.loadbalancer.server.port=4124
|
||||
- traefik.http.services.tvapp2.loadbalancer.server.scheme=http
|
||||
|
||||
# #
|
||||
# Services › HDHomeRun Server (optional)
|
||||
# #
|
||||
|
||||
- traefik.http.services.hdhr.loadbalancer.server.port=6077
|
||||
- traefik.http.services.hdhr.loadbalancer.server.scheme=http
|
||||
|
||||
@@ -295,24 +295,24 @@ http:
|
||||
- "*.domain.lan"
|
||||
|
||||
# #
|
||||
# @container TVApp2
|
||||
# @desc utomatic M3U playlist and XML guide updater for TheTvApp, TVPass, and MoveOnJoy utilized within your IPTV client.
|
||||
# @container TVApp2 › Main
|
||||
# @desc automatic M3U playlist and XML guide updater for TheTvApp, TVPass, and MoveOnJoy utilized within your IPTV client.
|
||||
# @url https://github.com/TheBinaryNinja/tvapp2
|
||||
#
|
||||
# remove / comment out the authentik line if you do not plan to use authentik:
|
||||
# - authentik@file
|
||||
# remove / comment out the authentik line if you do not plan to use authentik:
|
||||
# - authentik@file
|
||||
# #
|
||||
|
||||
tvapp2-http:
|
||||
service: "tvapp2"
|
||||
tvapp2-server-http:
|
||||
service: "tvapp2-server"
|
||||
rule: "Host(`tvapp2.localhost`) || Host(`tvapp2.domain.lan`)"
|
||||
entryPoints:
|
||||
- http
|
||||
middlewares:
|
||||
- https-redirect@file
|
||||
|
||||
tvapp2-https:
|
||||
service: "tvapp2"
|
||||
tvapp2-server-https:
|
||||
service: "tvapp2-server"
|
||||
rule: "Host(`tvapp2.localhost`) || Host(`tvapp2.domain.lan`)"
|
||||
entryPoints:
|
||||
- https
|
||||
@@ -325,6 +325,37 @@ http:
|
||||
- main: "domain.lan"
|
||||
sans:
|
||||
- "*.domain.lan"
|
||||
# #
|
||||
# @container TVApp2 › HDHomeRun
|
||||
# @desc automatic M3U playlist and XML guide updater for TheTvApp, TVPass, and MoveOnJoy utilized within your IPTV client.
|
||||
# @url https://github.com/TheBinaryNinja/tvapp2
|
||||
#
|
||||
# remove / comment out the authentik line if you do not plan to use authentik:
|
||||
# - authentik@file
|
||||
# #
|
||||
|
||||
tvapp2-hdhr-http:
|
||||
service: "tvapp2-hdhr"
|
||||
rule: "Host(`hdhr.localhost`) || Host(`hdhr.domain.lan`)"
|
||||
entryPoints:
|
||||
- http
|
||||
middlewares:
|
||||
- https-redirect@file
|
||||
|
||||
tvapp2-hdhr-https:
|
||||
service: "tvapp2-hdhr"
|
||||
rule: "Host(`hdhr.localhost`) || Host(`hdhr.domain.lan`)"
|
||||
entryPoints:
|
||||
- https
|
||||
middlewares:
|
||||
- redirect-www@file
|
||||
- authentik@file
|
||||
tls:
|
||||
certResolver: cloudflare
|
||||
domains:
|
||||
- main: "domain.lan"
|
||||
sans:
|
||||
- "*.domain.lan"
|
||||
|
||||
# #
|
||||
# http › Services
|
||||
@@ -351,7 +382,12 @@ http:
|
||||
servers:
|
||||
- url: "http://plex:32400"
|
||||
|
||||
tvapp2:
|
||||
tvapp2-server:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: "http://tvapp2:4124"
|
||||
|
||||
tvapp2-hdhr:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: "http://tvapp2:4124"
|
||||
|
||||
18
index.html
Normal file
18
index.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" data-theme="dark" data-density="regular">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>TVApp2 — M3U & EPG Manager</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
|
||||
<style>
|
||||
@keyframes slidein { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
1575
package-lock.json
generated
Normal file
1575
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
23
package.json
Normal file
23
package.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "tvapp2",
|
||||
"private": true,
|
||||
"version": "0.1.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vue-tsc -b && vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"hls.js": "^1.6.16",
|
||||
"mitt": "^3.0.1",
|
||||
"vue": "^3.5.13",
|
||||
"vue-router": "^4.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^5.2.1",
|
||||
"typescript": "^5.7.2",
|
||||
"vite": "^6.0.5",
|
||||
"vue-tsc": "^2.2.0"
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# #
|
||||
# @project TVApp2
|
||||
# @usage Automatic m3u and xml guide updater for TheTvApp, TVPass, and MoveOnJoy utilized within your IPTV client.
|
||||
# @file plugins
|
||||
# @repo.1 https://github.com/TheBinaryNinja/tvapp2
|
||||
# @repo.2 https://git.binaryninja.net/BinaryNinja/tvapp2
|
||||
# @repo.3 https://github.com/aetherinox/docker-base-alpine
|
||||
# #
|
||||
|
||||
PLUGINS_PATH="/config/www/plugins"
|
||||
|
||||
# #
|
||||
# Plugins > Start
|
||||
# #
|
||||
|
||||
echo -e " Loader : Checking tvapp2-plugins"
|
||||
@@ -1 +0,0 @@
|
||||
oneshot
|
||||
@@ -1 +0,0 @@
|
||||
echo -e " Core : Completed loading container"
|
||||
@@ -1,21 +0,0 @@
|
||||
──────────────────────────────────────────────────────────────────────────────────────────
|
||||
TVApp2 Docker Image
|
||||
──────────────────────────────────────────────────────────────────────────────────────────
|
||||
The TvApp2 image allows you to fetch M3U playlist and EPG data for numerous
|
||||
IPTV services online.
|
||||
|
||||
Once the files are fetched by the image, you can visit the self-hosted webpage,
|
||||
copy the links to the M3U and EPG files; and add them to your favorite IPTV app
|
||||
such as Jellyfin, Plex, or Emby.
|
||||
|
||||
For more information about this project; visit the links below. This app is
|
||||
served on multiple repositories as backup. Use any of the repo links below:
|
||||
|
||||
TVApp2 Repo 1 https://github.com/TheBinaryNinja/tvapp2
|
||||
TVApp2 Repo 2 https://git.binaryninja.net/BinaryNinja/tvapp2
|
||||
Base Alpine Image https://github.com/Aetherinox/docker-base-alpine
|
||||
|
||||
If you are making this container available on a public-facing domain,
|
||||
please consider using Traefik and Authentik to protect this container from
|
||||
outside access. Your M3U and EPG files will be available for the public to
|
||||
download and use.
|
||||
@@ -1,38 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
PUID=${PUID:-911}
|
||||
PGID=${PGID:-911}
|
||||
|
||||
IP_GATEWAY=$(/sbin/ip route|awk '/default/ { print $3 }')
|
||||
IP_CONTAINER=$(ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1')
|
||||
|
||||
if [[ -z ${TVAPP_READ_ONLY_FS} ]] && [[ -z ${TVAPP_NON_ROOT_USER} ]]; then
|
||||
groupmod -o -g "$PGID" dockerx
|
||||
usermod -o -u "$PUID" dockerx
|
||||
fi
|
||||
|
||||
if { [[ -z ${TVAPP_READ_ONLY_FS} ]] && [[ -z ${TVAPP_NON_ROOT_USER} ]]; } || [[ ! ${TVAPP_FIRST_PARTY} = "true" ]]; then
|
||||
cat /etc/s6-overlay/s6-rc.d/init-adduser/branding
|
||||
else
|
||||
cat /run/branding
|
||||
fi
|
||||
|
||||
if [[ -z ${TVAPP_NON_ROOT_USER} ]]; then
|
||||
echo ""
|
||||
echo " User:Group $(id -u dockerx):$(id -g dockerx)"
|
||||
else
|
||||
echo " User:Group $(stat /run -c %u):$(stat /run -c %g)"
|
||||
fi
|
||||
echo " Port(s) $(echo $WEB_PORT)"
|
||||
echo " Gateway $(echo $IP_GATEWAY)"
|
||||
echo " Web Server $(echo $IP_CONTAINER:$WEB_PORT)"
|
||||
echo " App Folder $(echo $DIR_RUN)"
|
||||
echo ""
|
||||
echo '──────────────────────────────────────────────────────────────────────────────────────────'
|
||||
|
||||
if [[ -z ${TVAPP_READ_ONLY_FS} ]] && [[ -z ${TVAPP_NON_ROOT_USER} ]]; then
|
||||
aetherxown dockerx:dockerx /app
|
||||
aetherxown dockerx:dockerx /config
|
||||
aetherxown dockerx:dockerx $(echo $DIR_BUILD)
|
||||
fi
|
||||
@@ -1 +0,0 @@
|
||||
oneshot
|
||||
@@ -1 +0,0 @@
|
||||
/etc/s6-overlay/s6-rc.d/init-adduser/run
|
||||
@@ -1 +0,0 @@
|
||||
oneshot
|
||||
@@ -1 +0,0 @@
|
||||
# This file doesn't do anything, it's just the end of the downstream image init process
|
||||
@@ -1,45 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
for cron_user in dockerx root; do
|
||||
if [[ -z ${TVAPP_READ_ONLY_FS} ]] && [[ -z ${TVAPP_NON_ROOT_USER} ]]; then
|
||||
if [[ -f "/etc/crontabs/${cron_user}" ]]; then
|
||||
aetherxown "${cron_user}":"${cron_user}" "/etc/crontabs/${cron_user}"
|
||||
crontab -u "${cron_user}" "/etc/crontabs/${cron_user}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -f "/defaults/crontabs/${cron_user}" ]]; then
|
||||
mkdir -p /config/crontabs
|
||||
|
||||
# #
|
||||
# if crontabs do not exist in config
|
||||
# #
|
||||
|
||||
if [[ ! -f "/config/crontabs/${cron_user}" ]]; then
|
||||
|
||||
# #
|
||||
# copy crontab from system
|
||||
# #
|
||||
|
||||
if crontab -l -u "${cron_user}" >/dev/null 2>&1; then
|
||||
crontab -l -u "${cron_user}" >"/config/crontabs/${cron_user}"
|
||||
fi
|
||||
|
||||
# #
|
||||
# if crontabs still do not exist in config (were not copied from system)
|
||||
# copy crontab from image defaults (using -n, do not overwrite an existing file)
|
||||
# #
|
||||
|
||||
cp -n "/defaults/crontabs/${cron_user}" /config/crontabs/
|
||||
fi
|
||||
|
||||
# #
|
||||
# set perms and import user crontabs
|
||||
# #
|
||||
|
||||
aetherxown "${cron_user}":"${cron_user}" "/config/crontabs/${cron_user}"
|
||||
crontab -u "${cron_user}" "/config/crontabs/${cron_user}"
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
oneshot
|
||||
@@ -1 +0,0 @@
|
||||
/etc/s6-overlay/s6-rc.d/init-crontab-config/run
|
||||
@@ -1,22 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
# Directories
|
||||
SCRIPTS_DIR="/custom-cont-init.d"
|
||||
|
||||
# Make sure custom init directory exists and has files in it
|
||||
if [[ -e "${SCRIPTS_DIR}" ]] && [[ -n "$(/bin/ls -A ${SCRIPTS_DIR} 2>/dev/null)" ]]; then
|
||||
echo -e " Loader : Plugins found, loading them ..."
|
||||
for SCRIPT in "${SCRIPTS_DIR}"/*; do
|
||||
NAME="$(basename "${SCRIPT}")"
|
||||
if [[ -f "${SCRIPT}" ]]; then
|
||||
echo -e " Loader : Executing ..."
|
||||
/bin/bash "${SCRIPT}"
|
||||
echo -e " Loader : ${NAME}: Ran Successfully with code [$?]"
|
||||
elif [[ ! -f "${SCRIPT}" ]]; then
|
||||
echo -e " Loader : ${NAME}: Not a valid file"
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo -e " Loader : No Plugins found, skipping..."
|
||||
fi
|
||||
@@ -1 +0,0 @@
|
||||
oneshot
|
||||
@@ -1 +0,0 @@
|
||||
/etc/s6-overlay/s6-rc.d/init-custom-files/run
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
if find /run/s6/container_environment/FILE__* -maxdepth 1 > /dev/null 2>&1; then
|
||||
for FILENAME in /run/s6/container_environment/FILE__*; do
|
||||
SECRETFILE=$(cat "${FILENAME}")
|
||||
if [[ -f ${SECRETFILE} ]]; then
|
||||
FILESTRIP=${FILENAME//FILE__/}
|
||||
if [[ $(tail -n1 "${SECRETFILE}" | wc -l) != 0 ]]; then
|
||||
echo "[env-init] Your secret: ${FILENAME##*/}"
|
||||
echo " contains a trailing newline and may not work as expected"
|
||||
fi
|
||||
cat "${SECRETFILE}" >"${FILESTRIP}"
|
||||
echo "[env-init] ${FILESTRIP##*/} set from ${FILENAME##*/}"
|
||||
else
|
||||
echo "[env-init] cannot find secret in ${FILENAME##*/}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
@@ -1 +0,0 @@
|
||||
oneshot
|
||||
@@ -1 +0,0 @@
|
||||
/etc/s6-overlay/s6-rc.d/init-envfile/run
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
# make folders
|
||||
mkdir -p \
|
||||
/config/keys \
|
||||
/run \
|
||||
@@ -1 +0,0 @@
|
||||
oneshot
|
||||
@@ -1 +0,0 @@
|
||||
/etc/s6-overlay/s6-rc.d/init-folders/run
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
# #
|
||||
# @project TVApp2
|
||||
# @usage Automatic m3u and xml guide updater for TheTvApp, TVPass, and MoveOnJoy utilized within your IPTV client.
|
||||
# @file run
|
||||
# @repo.1 https://github.com/TheBinaryNinja/tvapp2
|
||||
# @repo.2 https://git.binaryninja.net/BinaryNinja/tvapp2
|
||||
# @repo.3 https://github.com/aetherinox/docker-base-alpine
|
||||
# #
|
||||
|
||||
SUBJECT="/C=NA/ST=NA/L=NA/O=BinaryNinja/OU=TVApp2 Docker Image/CN=*"
|
||||
if [[ -f /config/keys/cert.key && -f /config/keys/cert.crt ]]; then
|
||||
echo -e " SSL : Using existing keys found in /config/keys"
|
||||
else
|
||||
echo -e " SSL : Generating self-signed keys in folder/config/keys. Replace if needed."
|
||||
rm -f \
|
||||
/config/keys/cert.key \
|
||||
/config/keys/cert.crt || true
|
||||
|
||||
mkdir -p /config/keys
|
||||
|
||||
OUT=$(openssl req -new -x509 -days 3650 -nodes -out /config/keys/cert.crt -keyout /config/keys/cert.key -subj "$SUBJECT" 2>/dev/null)
|
||||
fi
|
||||
@@ -1 +0,0 @@
|
||||
oneshot
|
||||
@@ -1 +0,0 @@
|
||||
/etc/s6-overlay/s6-rc.d/init-keygen/run
|
||||
@@ -1,39 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
MIGRATIONS_DIR="/migrations"
|
||||
MIGRATIONS_HISTORY="/config/.migrations"
|
||||
|
||||
echo -e " Migrations : Started"
|
||||
|
||||
if [[ ! -d ${MIGRATIONS_DIR} ]]; then
|
||||
echo -e " Migrations : No migrations found"
|
||||
exit
|
||||
fi
|
||||
|
||||
for MIGRATION in $(find ${MIGRATIONS_DIR}/* | sort -n); do
|
||||
NAME="$(basename "${MIGRATION}")"
|
||||
if [[ -f ${MIGRATIONS_HISTORY} ]] && grep -Fxq "${NAME}" ${MIGRATIONS_HISTORY}; then
|
||||
echo -e " Migrations : ${NAME} › Skipped"
|
||||
continue
|
||||
fi
|
||||
|
||||
echo -e " Migrations : ${NAME} › Executing"
|
||||
chmod +x "${MIGRATION}"
|
||||
|
||||
# #
|
||||
# Execute migration script in a subshell to prevent it from modifying the current environment
|
||||
# #
|
||||
|
||||
("${MIGRATION}")
|
||||
EXIT_CODE=$?
|
||||
if [[ ${EXIT_CODE} -ne 0 ]]; then
|
||||
echo -e " Migrations : ${NAME} › Failed with exit code ${EXIT_CODE}"
|
||||
exit "${EXIT_CODE}"
|
||||
fi
|
||||
|
||||
echo "${NAME}" >>${MIGRATIONS_HISTORY}
|
||||
echo -e " Migrations : ${NAME} › Success"
|
||||
done
|
||||
|
||||
echo -e " Migrations : Complete"
|
||||
@@ -1 +0,0 @@
|
||||
oneshot
|
||||
@@ -1 +0,0 @@
|
||||
/etc/s6-overlay/s6-rc.d/init-migrations/run
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user