From b8d6e4f5381c417c7712085753bbd45856c2054f Mon Sep 17 00:00:00 2001 From: Aetherinox Date: Mon, 17 Mar 2025 19:30:01 -0700 Subject: [PATCH] ci: style workflows --- .github/workflows/documentation.yml | 46 +++++-- .github/workflows/issues-new.yml | 82 ++++++++---- .github/workflows/issues-scan.yml | 1 + .github/workflows/issues-stale.yml | 100 +++++++++----- .github/workflows/labels-clean.yml | 37 +++++- .github/workflows/labels-create.yml | 54 ++++++-- .github/workflows/release.yml | 198 ++++++++++++++++++---------- 7 files changed, 357 insertions(+), 161 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 8a31d336..f21911e4 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -1,16 +1,38 @@ # # # @type github workflow -# @desc builds mkdocs from the main branch /docs/ folder and puts the compiled version -# in the `gh-pages` branch. Is hosted using Github Pages. -# -# @update pip install --upgrade mkdocs -# pip install --upgrade --force-reinstall mkdocs-material -# # @author Aetherinox # @url https://github.com/Aetherinox +# @usage builds mkdocs from the main branch /docs/ folder and puts the compiled version +# in the `gh-pages` branch. Is hosted using Github Pages. # -# @secrets secrets.SELF_TOKEN_CL Github Access Token (Classic) -# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKfLOWS Discord Webbhook URL; right-click on channel, click "Integrations" +# @update use the following commands to update mkdocs and the mkdocs-material theme: +# pip install --upgrade mkdocs +# pip install --upgrade --force-reinstall mkdocs-material +# +# @secrets secrets.SELF_TOKEN self github personal access token (fine-grained) +# secrets.SELF_TOKEN_CL self github personal access token (classic) +# secrets.NPM_TOKEN self npmjs access token +# secrets.PYPI_API_TOKEN self Pypi API token (production site) - https://pypi.org/ +# secrets.PYPI_API_TEST_TOKEN self Pypi API token (test site) - https://test.pypi.org/ +# secrets.SELF_DOCKERHUB_TOKEN self Dockerhub token +# secrets.ORG_BINARYNINJA_TOKEN org github personal access token (fine-grained) +# secrets.ORG_BINARYNINJA_TOKEN_CL org github personal access token (classic) +# secrets.ORG_BINARYNINJA_DOCKERHUB_TOKEN org dockerhub secret +# secrets.ORG_BINARYNINJA_GITEA_TOKEN org gitea personal access token (classic) with package:write permission +# secrets.BINARYSERV_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK +# secrets.BINARYSERV_GPG_PASSPHRASE bot gpg private key passphrase +# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES discord webhook to report release notifications from github to discord +# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKFLOWS discord webhook to report workflow notifications from github to discord +# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_UPDATES discord webhook to report activity notifications from github to discord +# +# @local these workflows can be tested locally through the use of `act` +# https://github.com/nektos/act +# Extract act to folder +# Add system env var with path to act.exe +# Run the commands: +# git pull https://github.com/username/repo +# act -W .github/workflows/documentation.yml -P ubuntu-latest=catthehacker/ubuntu:full-22.04 +# act -W .github/workflows/documentation.yml -s TOKEN_CL=XXXXXXXXXX --pull=false # # name: "πŸ“’ Docs β€Ί Build" @@ -36,9 +58,11 @@ on: # # env: - ASSIGN_USER: Aetherinox - BOT_NAME_1: EuropaServ - BOT_NAME_DEPENDABOT: dependabot[bot] + ASSIGN_USER: Aetherinox + BOT_NAME_1: EuropaServ + BOT_NAME_2: BinaryServ + BOT_NAME_DEPENDABOT: dependabot[bot] + BOT_NAME_RENOVATE: renovate[bot] # # # jobs diff --git a/.github/workflows/issues-new.yml b/.github/workflows/issues-new.yml index 04ad83b5..5dc9addd 100755 --- a/.github/workflows/issues-new.yml +++ b/.github/workflows/issues-new.yml @@ -1,15 +1,40 @@ # # # @type github workflow -# @desc searches a new issues title and body for certain keywords and assigns a label -# sets the assignee for the issue to the repository owner # @author Aetherinox # @url https://github.com/Aetherinox +# @usage searches a new issues title and body for certain keywords and assigns a label +# sets the assignee for the issue to the repository owner # -# requires the following labels to be created in your repo: -# - bug -# - feature -# - urgent -# - roadmap +# @notes requires the following labels to be created in your repo: +# - bug +# - feature +# - urgent +# - roadmap +# +# @secrets secrets.SELF_TOKEN self github personal access token (fine-grained) +# secrets.SELF_TOKEN_CL self github personal access token (classic) +# secrets.NPM_TOKEN self npmjs access token +# secrets.PYPI_API_TOKEN self Pypi API token (production site) - https://pypi.org/ +# secrets.PYPI_API_TEST_TOKEN self Pypi API token (test site) - https://test.pypi.org/ +# secrets.SELF_DOCKERHUB_TOKEN self Dockerhub token +# secrets.ORG_BINARYNINJA_TOKEN org github personal access token (fine-grained) +# secrets.ORG_BINARYNINJA_TOKEN_CL org github personal access token (classic) +# secrets.ORG_BINARYNINJA_DOCKERHUB_TOKEN org dockerhub secret +# secrets.ORG_BINARYNINJA_GITEA_TOKEN org gitea personal access token (classic) with package:write permission +# secrets.BINARYSERV_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK +# secrets.BINARYSERV_GPG_PASSPHRASE bot gpg private key passphrase +# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES discord webhook to report release notifications from github to discord +# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKFLOWS discord webhook to report workflow notifications from github to discord +# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_UPDATES discord webhook to report activity notifications from github to discord +# +# @local these workflows can be tested locally through the use of `act` +# https://github.com/nektos/act +# Extract act to folder +# Add system env var with path to act.exe +# Run the commands: +# git pull https://github.com/username/repo +# act -W .github/workflows/issues-new.yml -P ubuntu-latest=catthehacker/ubuntu:full-22.04 +# act -W .github/workflows/issues-new.yml -s TOKEN_CL=XXXXXXXXXX --pull=false # # name: "🎫 Issue β€Ί New" @@ -30,28 +55,31 @@ on: # # 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_URGENT: "⚠ Urgent" - BOT_NAME_1: EuropaServ - BOT_NAME_DEPENDABOT: dependabot[bot] + ASSIGN_USER: Aetherinox + BOT_NAME_1: EuropaServ + BOT_NAME_2: BinaryServ + BOT_NAME_DEPENDABOT: dependabot[bot] + BOT_NAME_RENOVATE: renovate[bot] LABELS_JSON: | [ diff --git a/.github/workflows/issues-scan.yml b/.github/workflows/issues-scan.yml index 83c010a2..61cc2355 100755 --- a/.github/workflows/issues-scan.yml +++ b/.github/workflows/issues-scan.yml @@ -65,6 +65,7 @@ env: LABEL_TYPE_DEPENDENCY: Type β—¦ Dependency LABEL_TYPE_GITACTION: Type β—¦ Git Action + ASSIGN_USER: Aetherinox BOT_NAME_1: EuropaServ BOT_NAME_2: BinaryServ BOT_NAME_DEPENDABOT: dependabot[bot] diff --git a/.github/workflows/issues-stale.yml b/.github/workflows/issues-stale.yml index 8d6a72f2..f82cbbc1 100755 --- a/.github/workflows/issues-stale.yml +++ b/.github/workflows/issues-stale.yml @@ -1,27 +1,51 @@ # # # @type github workflow -# @desc creates repository labels if they are not yet installed -# issues marked as stale after 30 days, given tag Status 𐄂 Stale -# inactive issues closed after 180 days, given tag Status 𐄂 Locked -# inactive pr closed after 365 days, given tag Status 𐄂 Locked -# issues marked stale after 30 days, given tag Status 𐄂 Stale -# issues marked closed 7 days after being marked stale, given tag Status 𐄂 Autoclosed # @author Aetherinox # @url https://github.com/Aetherinox +# @usage creates repository labels if they are not yet installed +# issues marked as stale after 30 days, given tag Status 𐄂 Stale +# inactive issues closed after 180 days, given tag Status 𐄂 Locked +# inactive pr closed after 365 days, given tag Status 𐄂 Locked +# issues marked stale after 30 days, given tag Status 𐄂 Stale +# issues marked closed 7 days after being marked stale, given tag Status 𐄂 Autoclosed # -# This Github action must be activated manually. This workflow script will do the -# following: +# @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` +# - 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 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`. +# - Workflow will `autoclose` pr or issues which haven't had action in `365 days`. +# +# @secrets secrets.SELF_TOKEN self github personal access token (fine-grained) +# secrets.SELF_TOKEN_CL self github personal access token (classic) +# secrets.NPM_TOKEN self npmjs access token +# secrets.PYPI_API_TOKEN self Pypi API token (production site) - https://pypi.org/ +# secrets.PYPI_API_TEST_TOKEN self Pypi API token (test site) - https://test.pypi.org/ +# secrets.SELF_DOCKERHUB_TOKEN self Dockerhub token +# secrets.ORG_BINARYNINJA_TOKEN org github personal access token (fine-grained) +# secrets.ORG_BINARYNINJA_TOKEN_CL org github personal access token (classic) +# secrets.ORG_BINARYNINJA_DOCKERHUB_TOKEN org dockerhub secret +# secrets.ORG_BINARYNINJA_GITEA_TOKEN org gitea personal access token (classic) with package:write permission +# secrets.BINARYSERV_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK +# secrets.BINARYSERV_GPG_PASSPHRASE bot gpg private key passphrase +# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES discord webhook to report release notifications from github to discord +# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKFLOWS discord webhook to report workflow notifications from github to discord +# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_UPDATES discord webhook to report activity notifications from github to discord +# +# @local these workflows can be tested locally through the use of `act` +# https://github.com/nektos/act +# Extract act to folder +# Add system env var with path to act.exe +# Run the commands: +# git pull https://github.com/username/repo +# act -W .github/workflows/issues-stale.yml -P ubuntu-latest=catthehacker/ubuntu:full-22.04 +# act -W .github/workflows/issues-stale.yml -s TOKEN_CL=XXXXXXXXXX --pull=false # # name: "🎫 Issues β€Ί Stale" @@ -41,28 +65,32 @@ on: # # 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_URGENT: "⚠ Urgent" + + ASSIGN_USER: Aetherinox + BOT_NAME_1: EuropaServ + BOT_NAME_2: BinaryServ + BOT_NAME_DEPENDABOT: dependabot[bot] + BOT_NAME_RENOVATE: renovate[bot] - BOT_NAME_1: EuropaServ - BOT_NAME_DEPENDABOT: dependabot[bot] LABELS_JSON: | [ { "name": "AC β€Ί Changes Made", "color": "8F1784", "description": "Requested changes have been made and are pending a re-scan" }, diff --git a/.github/workflows/labels-clean.yml b/.github/workflows/labels-clean.yml index f92ac06c..6610b12b 100755 --- a/.github/workflows/labels-clean.yml +++ b/.github/workflows/labels-clean.yml @@ -4,10 +4,33 @@ # @author Aetherinox # @url https://github.com/Aetherinox # -# This Github action must be activated manually. This workflow script will do the -# following: +# @notes This Github action must be activated manually. This workflow script will do the following: +# - Remove all existing labels in repository # -# - Remove all existing labels in repository +# @secrets secrets.SELF_TOKEN self github personal access token (fine-grained) +# secrets.SELF_TOKEN_CL self github personal access token (classic) +# secrets.NPM_TOKEN self npmjs access token +# secrets.PYPI_API_TOKEN self Pypi API token (production site) - https://pypi.org/ +# secrets.PYPI_API_TEST_TOKEN self Pypi API token (test site) - https://test.pypi.org/ +# secrets.SELF_DOCKERHUB_TOKEN self Dockerhub token +# secrets.ORG_BINARYNINJA_TOKEN org github personal access token (fine-grained) +# secrets.ORG_BINARYNINJA_TOKEN_CL org github personal access token (classic) +# secrets.ORG_BINARYNINJA_DOCKERHUB_TOKEN org dockerhub secret +# secrets.ORG_BINARYNINJA_GITEA_TOKEN org gitea personal access token (classic) with package:write permission +# secrets.BINARYSERV_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK +# secrets.BINARYSERV_GPG_PASSPHRASE bot gpg private key passphrase +# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES discord webhook to report release notifications from github to discord +# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKFLOWS discord webhook to report workflow notifications from github to discord +# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_UPDATES discord webhook to report activity notifications from github to discord +# +# @local these workflows can be tested locally through the use of `act` +# https://github.com/nektos/act +# Extract act to folder +# Add system env var with path to act.exe +# Run the commands: +# git pull https://github.com/username/repo +# act -W .github/workflows/labels-clean.yml -P ubuntu-latest=catthehacker/ubuntu:full-22.04 +# act -W .github/workflows/labels-clean.yml -s TOKEN_CL=XXXXXXXXXX --pull=false # # name: "🎫 Labels β€Ί Remove" @@ -25,8 +48,12 @@ on: # # env: - BOT_NAME_1: EuropaServ - BOT_NAME_DEPENDABOT: dependabot[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": "bug", "color": "8F1784", "description": "Default github label" }, diff --git a/.github/workflows/labels-create.yml b/.github/workflows/labels-create.yml index af696bea..fa34cc8f 100755 --- a/.github/workflows/labels-create.yml +++ b/.github/workflows/labels-create.yml @@ -1,22 +1,46 @@ # # # @type github workflow -# @desc manually activated workflow to create issue labels # @author Aetherinox # @url https://github.com/Aetherinox +# @usage manually activated workflow to create issue labels # -# This Github action must be activated manually. This workflow script will do the -# following: +# @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` +# - 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 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`. +# - Workflow will `autoclose` pr or issues which haven't had action in `365 days`. +# +# @secrets secrets.SELF_TOKEN self github personal access token (fine-grained) +# secrets.SELF_TOKEN_CL self github personal access token (classic) +# secrets.NPM_TOKEN self npmjs access token +# secrets.PYPI_API_TOKEN self Pypi API token (production site) - https://pypi.org/ +# secrets.PYPI_API_TEST_TOKEN self Pypi API token (test site) - https://test.pypi.org/ +# secrets.SELF_DOCKERHUB_TOKEN self Dockerhub token +# secrets.ORG_BINARYNINJA_TOKEN org github personal access token (fine-grained) +# secrets.ORG_BINARYNINJA_TOKEN_CL org github personal access token (classic) +# secrets.ORG_BINARYNINJA_DOCKERHUB_TOKEN org dockerhub secret +# secrets.ORG_BINARYNINJA_GITEA_TOKEN org gitea personal access token (classic) with package:write permission +# secrets.BINARYSERV_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK +# secrets.BINARYSERV_GPG_PASSPHRASE bot gpg private key passphrase +# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES discord webhook to report release notifications from github to discord +# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKFLOWS discord webhook to report workflow notifications from github to discord +# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_UPDATES discord webhook to report activity notifications from github to discord +# +# @local these workflows can be tested locally through the use of `act` +# https://github.com/nektos/act +# Extract act to folder +# Add system env var with path to act.exe +# Run the commands: +# git pull https://github.com/username/repo +# act -W .github/workflows/labels-create.yml -P ubuntu-latest=catthehacker/ubuntu:full-22.04 +# act -W .github/workflows/labels-create.yml -s TOKEN_CL=XXXXXXXXXX --pull=false # # name: "🎫 Labels β€Ί Create" @@ -34,8 +58,12 @@ on: # # env: - BOT_NAME_1: EuropaServ - BOT_NAME_DEPENDABOT: dependabot[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" }, diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0b0cba92..0ec1063d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,12 +1,37 @@ # # # @type github workflow -# @desc publishes a new release on Github # @author Aetherinox # @url https://github.com/Aetherinox +# @usage publishes a new release on Github +# +# @secrets secrets.SELF_TOKEN self github personal access token (fine-grained) +# secrets.SELF_TOKEN_CL self github personal access token (classic) +# secrets.NPM_TOKEN self npmjs access token +# secrets.PYPI_API_TOKEN self Pypi API token (production site) - https://pypi.org/ +# secrets.PYPI_API_TEST_TOKEN self Pypi API token (test site) - https://test.pypi.org/ +# secrets.SELF_DOCKERHUB_TOKEN self Dockerhub token +# secrets.ORG_BINARYNINJA_TOKEN org github personal access token (fine-grained) +# secrets.ORG_BINARYNINJA_TOKEN_CL org github personal access token (classic) +# secrets.ORG_BINARYNINJA_DOCKERHUB_TOKEN org dockerhub secret +# secrets.ORG_BINARYNINJA_GITEA_TOKEN org gitea personal access token (classic) with package:write permission +# secrets.BINARYSERV_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK +# secrets.BINARYSERV_GPG_PASSPHRASE bot gpg private key passphrase +# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES discord webhook to report release notifications from github to discord +# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKFLOWS discord webhook to report workflow notifications from github to discord +# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_UPDATES discord webhook to report activity notifications from github to discord +# +# @local these workflows can be tested locally through the use of `act` +# https://github.com/nektos/act +# Extract act to folder +# Add system env var with path to act.exe +# Run the commands: +# git pull https://github.com/username/repo +# act -W .github/workflows/labels-create.yml -P ubuntu-latest=catthehacker/ubuntu:full-22.04 +# act -W .github/workflows/labels-create.yml -s TOKEN_CL=XXXXXXXXXX --pull=false # # -name: "πŸ“¦ Release β€Ί Github" -run-name: "πŸ“¦ Release β€Ί Github" +name: 'πŸ“¦ Release β€Ί Github' +run-name: 'πŸ“¦ Release β€Ί Github' # # # Triggers @@ -22,10 +47,10 @@ on: # # PROJECT_NAME: - description: "πŸ“¦ Name of App" - required: true - default: 'tvapp2' - type: string + description: 'πŸ“¦ Name of App' + required: true + default: 'tvapp2' + type: string # # # ENABLE: the changelog generated in releases tab will only display single commits. @@ -33,10 +58,10 @@ on: # # CHANGELOG_MODE_COMMIT: - description: "πŸ“‘ Use Commits Instead of PRs" - required: true - default: true - type: boolean + description: 'πŸ“‘ Use Commits Instead of PRs' + required: true + default: true + type: boolean # # # ENABLE: Will show all types of commits, including uncategorized @@ -46,10 +71,10 @@ on: # # SHOW_UNCATEGORIZED: - description: "πŸ—‚οΈ Show Uncategorized Commits" - required: true - default: false - type: boolean + description: 'πŸ—‚οΈ Show Uncategorized Commits' + required: true + default: false + type: boolean # # # ENABLE: released version will be marked as pre-release @@ -57,10 +82,10 @@ on: # # PRERELEASE: - description: "πŸ§ͺ Build RC (Pre-release)" - required: true - default: false - type: boolean + description: 'πŸ§ͺ Build RC (Pre-release)' + required: true + default: false + type: boolean # # # Release Candidate version number @@ -69,23 +94,26 @@ on: # # VERSION_RC: - description: "πŸ§ͺ RC (Pre-release) Ver (tvapp2-rc.v1)" - required: false - type: string - default: "1" + description: 'πŸ§ͺ RC (Pre-release) Ver (tvapp2-rc.v1)' + required: false + type: string + default: '1' # # # environment variables # # env: - PROJECT_NAME: ${{ github.event.inputs.PROJECT_NAME || 'tvapp2' }} - CHANGELOG_MODE_COMMIT: true - SHOW_UNCATEGORIZED: false - PRERELEASE: false - VERSION_RC: '1' - BOT_NAME_1: EuropaServ - BOT_NAME_DEPENDABOT: dependabot[bot] + PROJECT_NAME: ${{ github.event.inputs.PROJECT_NAME || 'tvapp2' }} + CHANGELOG_MODE_COMMIT: true + SHOW_UNCATEGORIZED: false + PRERELEASE: false + VERSION_RC: '1' + ASSIGN_USER: Aetherinox + BOT_NAME_1: EuropaServ + BOT_NAME_2: BinaryServ + BOT_NAME_DEPENDABOT: dependabot[bot] + BOT_NAME_RENOVATE: renovate[bot] # # # Jobs @@ -112,7 +140,7 @@ jobs: # Initialize β€Ί Start # # - - name: "βœ… Start" + - name: 'βœ… Start' id: task_initialize_start run: | echo "Starting build" @@ -134,7 +162,7 @@ jobs: # Initialize β€Ί Checkout # # - - name: "β˜‘οΈ Checkout" + - name: 'β˜‘οΈ Checkout' id: task_initialize_checkout uses: actions/checkout@v4 with: @@ -144,14 +172,14 @@ jobs: # Initialize β€Ί Get version from package.json VERSION value # # - - name: "πŸ‘οΈβ€πŸ—¨οΈ Package Version β€Ί Set" + - 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 - - name: "πŸ‘οΈβ€πŸ—¨οΈ Package Version β€Ί Get" + - name: 'πŸ‘οΈβ€πŸ—¨οΈ Package Version β€Ί Get' id: task_initialize_package_version_get run: | echo "VERSION: ${{ steps.task_initialize_package_getversion.outputs.PACKAGE_VERSION }}" @@ -179,7 +207,7 @@ jobs: # Release β€Ί Checkout # # - - name: "β˜‘οΈ Checkout" + - name: 'β˜‘οΈ Checkout' id: task_release_checkout uses: actions/checkout@v4 with: @@ -202,7 +230,7 @@ jobs: # Release β€Ί Print Version Debug # # - - name: "πŸͺͺ Test Next Job Version" + - name: 'πŸͺͺ Test Next Job Version' id: task_release_debug_print_ver run: | echo "VERSION: ${{ env.PACKAGE_VERSION }}" @@ -211,7 +239,7 @@ jobs: # Release β€Ί Install package via NPM # # - - name: "πŸͺͺ NPM β€Ί Install" + - name: 'πŸͺͺ NPM β€Ί Install' id: task_release_npm_install working-directory: ./tvapp2 run: | @@ -223,7 +251,7 @@ jobs: # Release β€Ί Execute npm generate so that a uuid and guid can be created # # - - name: "πŸͺͺ Generate IDs" + - name: 'πŸͺͺ Generate IDs' id: task_release_npm_env_generate working-directory: ./tvapp2 run: | @@ -234,7 +262,7 @@ jobs: # Get guid and uuid from env variable generated by npm # # - - name: "πŸͺͺ .ENV β€Ί Get" + - name: 'πŸͺͺ .ENV β€Ί Get' id: task_release_dotenv_get uses: falti/dotenv-action@v1 with: @@ -245,7 +273,7 @@ jobs: # Show guid and uuid from env variable generated by npm # # - - name: "πŸͺͺ .ENV β€Ί Read" + - name: 'πŸͺͺ .ENV β€Ί Read' id: task_dotenv_debug_print run: | echo "GUID: ${{ steps.task_release_dotenv_get.outputs.GUID }}" @@ -255,7 +283,7 @@ jobs: # Build Project & Create Zip # # - - name: "πŸ”¨ Build β€Ί Stable ( ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip )" + - name: 'πŸ”¨ Build β€Ί Stable ( ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip )' id: task_release_build_st if: ${{ startsWith( inputs.PRERELEASE, false ) }} run: | @@ -267,7 +295,7 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.ADMINSERV_TOKEN_CL }} - - name: "πŸ”¨ Build β€Ί RC ( ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}.zip )" + - name: 'πŸ”¨ Build β€Ί RC ( ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}.zip )' id: task_release_build_rc if: ${{ startsWith( inputs.PRERELEASE, true ) }} run: | @@ -287,7 +315,7 @@ jobs: # the list of commits will not be for the correct release. # # - - name: "πŸ”– Tag β€Ί Pre Create ${{ env.PACKAGE_VERSION }}" + - name: 'πŸ”– Tag β€Ί Pre Create ${{ env.PACKAGE_VERSION }}' id: task_release_tag_create uses: rickstaa/action-create-tag@v1 with: @@ -303,7 +331,7 @@ jobs: # check if tag already exists # # - - name: "πŸ”– Tag β€Ί Confirm ${{ env.PACKAGE_VERSION }}" + - name: 'πŸ”– Tag β€Ί Confirm ${{ env.PACKAGE_VERSION }}' id: task_release_tag_get run: | echo "Tag already present: ${{ env.TAG_EXISTS }}" @@ -313,7 +341,7 @@ jobs: # Checksum β€Ί Generate # # - - name: "πŸ†” Checksum β€Ί Stable" + - name: 'πŸ†” Checksum β€Ί Stable' id: task_release_checksum_st_set if: ${{ startsWith( inputs.PRERELEASE, false ) }} run: | @@ -327,7 +355,7 @@ jobs: sha256_compose="$(shasum --algorithm 256 ${filename_compose_zip} | awk '{ print $1 }')" echo "FILE_COMPOSE_ZIP=${filename_compose_zip}" >> $GITHUB_ENV - - name: "πŸ†” Checksum β€Ί RC" + - name: 'πŸ†” Checksum β€Ί RC' id: task_release_checksum_rc_set if: ${{ startsWith( inputs.PRERELEASE, true ) }} run: | @@ -345,7 +373,7 @@ jobs: # Checksum β€Ί Print # # - - name: "πŸ†” Checksum β€Ί Print" + - name: 'πŸ†” Checksum β€Ί Print' id: task_release_checksum_st_get run: | echo ${{ env.SHA256SUM }} @@ -354,7 +382,7 @@ jobs: # Contributor Images # # - - name: "πŸ₯Έ Contributors β€Ί Generate" + - name: 'πŸ₯Έ Contributors β€Ί Generate' id: task_release_contribs_generate uses: jaywcjlove/github-action-contributors@main with: @@ -366,7 +394,7 @@ jobs: # Checksum β€Ί Add to ZIP file # # - - name: "πŸ“¦ Zip β€Ί Add Checksum β€Ί Stable" + - name: 'πŸ“¦ Zip β€Ί Add Checksum β€Ί Stable' id: task_release_zip_st if: ${{ startsWith( inputs.PRERELEASE, false ) }} run: | @@ -374,7 +402,7 @@ jobs: zip -jr ${{ env.PROJECT_NAME }}-${{ env.PACKAGE_VERSION }}.zip SHA256SUMS.txt ls - - name: "πŸ“¦ Zip β€Ί Add Checksum β€Ί RC" + - name: 'πŸ“¦ Zip β€Ί Add Checksum β€Ί RC' id: task_release_zip_rc if: ${{ startsWith( inputs.PRERELEASE, true ) }} run: | @@ -392,15 +420,17 @@ jobs: # ${{ steps.changelog.outputs.changelog }} # # - - name: "πŸ“ Changelog β€Ί Pre Setup (Categorized Commits)" + - 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 - - name: "πŸ“ Changelog β€Ί Build (Categorized)" + - name: 'πŸ“ Changelog β€Ί Build (Categorized)' id: task_release_changelog_categorized - if: ${{ startsWith( inputs.SHOW_UNCATEGORIZED, false ) }} + if: | + startsWith( inputs.SHOW_UNCATEGORIZED, false ) || + startsWith( env.SHOW_UNCATEGORIZED, false ) uses: mikepenz/release-changelog-builder-action@v5 with: token: ${{ secrets.ADMINSERV_TOKEN }} @@ -408,7 +438,7 @@ jobs: #toTag: "${{ github.ref }}" configuration: ".github/changelog-configuration.json" ignorePreReleases: false - commitMode: ${{ inputs.CHANGELOG_MODE_COMMIT }} + commitMode: ${{ inputs.CHANGELOG_MODE_COMMIT || env.CHANGELOG_MODE_COMMIT }} fetchReleaseInformation: true fetchViaCommits: true configurationJson: | @@ -424,9 +454,11 @@ jobs: # type: description # # - - name: "πŸ“ Changelog β€Ί Build (Uncategorized)" + - name: 'πŸ“ Changelog β€Ί Build (Uncategorized)' id: task_release_changelog_uncategorized - if: ${{ startsWith( inputs.SHOW_UNCATEGORIZED, true ) }} + if: | + startsWith( inputs.SHOW_UNCATEGORIZED, true ) || + startsWith( env.SHOW_UNCATEGORIZED, true ) uses: mikepenz/release-changelog-builder-action@v5 with: token: ${{ secrets.ADMINSERV_TOKEN }} @@ -434,7 +466,7 @@ jobs: #toTag: "${{ github.ref }}" configuration: ".github/changelog-configuration.json" ignorePreReleases: false - commitMode: ${{ inputs.CHANGELOG_MODE_COMMIT }} + commitMode: ${{ inputs.CHANGELOG_MODE_COMMIT || env.CHANGELOG_MODE_COMMIT }} fetchReleaseInformation: true fetchViaCommits: true configurationJson: | @@ -444,19 +476,47 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.ADMINSERV_TOKEN }} + # # + # Changelog > Convert step into ENV + # + # This is a requirement in order for the action mikepenz/release-changelog-builder-action@v5 to work properly. + # If you use special characters like quotes and tildes in your push comments, bash will have no way of knowing + # if it's part of the changelog, or code itself. + # + # By converting the step into an env var, we quote the text, and it fixes the issue. + # # + + - name: "πŸ™Š Changelog β€Ί Step to Env β€Ί Categorized" + id: task_release_changelog_escape_categorized + env: + CHANGELOG_CATEGORIZED: ${{ steps.task_release_changelog_categorized.outputs.changelog }} + run: echo "CHANGELOG_CATEGORIZED" + + - name: "πŸ™Š Changelog β€Ί Step to Env β€Ί Uncategorized" + id: task_release_changelog_escape_uncategorized + env: + CHANGELOG_UNCATEGORIZED: ${{ steps.task_release_changelog_uncategorized.outputs.changelog }} + run: echo "CHANGELOG_UNCATEGORIZED" + # # # Changelog β€Ί Fetch # # - - name: "πŸ“ Changelog β€Ί Print (Categorized)" - if: ${{ startsWith( inputs.SHOW_UNCATEGORIZED, false ) }} + - name: 'πŸ“ Changelog β€Ί Print (Categorized)' + id: task_release_changelog_print_categorized + if: | + startsWith( inputs.SHOW_UNCATEGORIZED, false ) || + startsWith( env.SHOW_UNCATEGORIZED, false ) run: | - echo "${{ steps.task_release_changelog_categorized.outputs.changelog }}" + echo "${{ env.CHANGELOG_CATEGORIZED }}" - - name: "πŸ“ Changelog β€Ί Print (Uncategorized)" - if: ${{ startsWith( inputs.SHOW_UNCATEGORIZED, true ) }} + - name: 'πŸ“ Changelog β€Ί Print (Uncategorized)' + id: task_release_changelog_print_uncategorized + if: | + startsWith( inputs.SHOW_UNCATEGORIZED, true ) || + startsWith( env.SHOW_UNCATEGORIZED, true ) run: | - echo "${{ steps.task_release_changelog_uncategorized.outputs.changelog }}" + echo "${{ env.CHANGELOG_UNCATEGORIZED }}" # # # [ Release ]: Post Release @@ -486,8 +546,8 @@ jobs: SHA256SUMS.txt prerelease: false body: | - ${{ steps.task_release_changelog_categorized.outputs.changelog }} - ${{ steps.task_release_changelog_uncategorized.outputs.changelog }} + ${{ env.CHANGELOG_CATEGORIZED }} + ${{ env.CHANGELOG_UNCATEGORIZED }} - name: "🏳️ Post β€Ί Release Candidate" if: ${{ startsWith( inputs.PRERELEASE, true ) }} @@ -511,8 +571,8 @@ jobs: > [!WARNING] > This is a **release candidate**, which means it is not a stable release and could contain bugs. You should download it at your own risk. - ${{ steps.task_release_changelog_categorized.outputs.changelog }} - ${{ steps.task_release_changelog_uncategorized.outputs.changelog }} + ${{ env.CHANGELOG_CATEGORIZED }} + ${{ env.CHANGELOG_UNCATEGORIZED }} # # # Print Status @@ -524,8 +584,8 @@ jobs: echo "Printing Variables" echo echo "---- CHANGELOG ---------------------------------------------------------------" - echo "${{ steps.task_release_changelog_categorized.outputs.changelog }}" - echo "${{ steps.task_changelog_uncategorized.outputs.changelog }}" + echo "${{ env.CHANGELOG_CATEGORIZED }}" + echo "${{ env.CHANGELOG_UNCATEGORIZED }}" echo "---- CHANGELOG ---------------------------------------------------------------" echo "" echo ""