Skip to content

Commit

Permalink
ci: update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Aetherinox committed Oct 14, 2024
1 parent 36983e1 commit 61a4abe
Show file tree
Hide file tree
Showing 7 changed files with 385 additions and 117 deletions.
105 changes: 105 additions & 0 deletions .github/workflows/deploy-clean.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# #
# @type github workflow
# @desc cleans up the list of deployments in the environment history
# @author Aetherinox
# @url https://github.com/Aetherinox
# #

name: "⚙️ Deploy › Clean"
run-name: "⚙️ Deploy › Clean"

# #
# triggers
# #

on:
workflow_dispatch:

# #
# environment variables
# #

env:
BOT_NAME_1: AdminServ
BOT_NAME_2: AdminServX
BOT_NAME_3: 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" },
{ "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": "› 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" }
]
# #
# jobs
# #

jobs:
cleanup:
runs-on: ubuntu-latest
permissions: write-all

steps:
- name: >-
⚙️ Deployments › Clean
uses: strumwolf/delete-deployment-environment@v2
with:
token: ${{ secrets.SELF_TOKEN_CL }}
environment: orion
onlyRemoveDeployments: true
12 changes: 7 additions & 5 deletions .github/workflows/issues-accept.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# #
# @parent : github workflow
# @desc : adds a label to a PR when the command "/accept" is typed in the issue comments
# @author : Aetherinox
# @url : https://github.com/Aetherinox
# @type github workflow
# @desc adds a label to a PR when the command "/accept" is typed in the issue comments
# do not attempt to use env variables in if condition.
# do not accept to change GITHUB_TOKEN.
# @author Aetherinox
# @url https://github.com/Aetherinox
# #

name: "🎫 Issue › Accept"
Expand Down Expand Up @@ -39,8 +41,8 @@ jobs:
# #

deploy:
if: contains(github.event.comment.body, '/accept') && github.event.comment.user.login == 'Aetherinox'
runs-on: ubuntu-latest
if: github.event.issue.pull_request && contains(github.event.comment.body, '/accept') && github.event.comment.user.login == ${{ github.repository_owner }}
steps:

# #
Expand Down
55 changes: 24 additions & 31 deletions .github/workflows/issues-new.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# #
# @parent : github workflow
# @desc : allows you to auto assign labels to new issues and pull requests
# @author : Aetherinox
# @url : https://github.com/Aetherinox
# @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
#
# requires the following labels to be created in your repo:
# - bug
Expand Down Expand Up @@ -133,8 +134,6 @@ jobs:
name: >-
🎫 Labels › Verify Existing
runs-on: ubuntu-latest
environment:
name: Orion
steps:

# #
Expand Down Expand Up @@ -210,8 +209,6 @@ jobs:
contents: 'read'
id-token: 'write'
issues: 'write'
environment:
name: Orion
steps:

# #
Expand All @@ -235,7 +232,7 @@ jobs:
# #
# Labels > Bugs
#
# Title of issue is carried over from the previous step.
# Title of issue is carried over from the previous step.
# #

- name: >-
Expand All @@ -261,9 +258,9 @@ jobs:
const iss_title_lc = iss_title.toLowerCase( );
console.log( "Feat Title .................... " + iss_title )
console.log( "Feat Output ................... " + `${{ steps.task_get_title.outputs.issue_title }}` )
console.log( "Feat Payload .................. " + `${ context.payload.issue.title }` )
console.log( "Bug Title ..................... " + iss_title )
console.log( "Bug Output .................... " + `${{ steps.task_get_title.outputs.issue_title }}` )
console.log( "Bug Payload ................... " + `${ context.payload.issue.title }` )
/*
Tags
Expand All @@ -283,7 +280,7 @@ jobs:
*/
const words = [ "bug", "broke", "issue", "fail" ];
const bIncWordT = words.some( s => s.includes( iss_title_lc ) || iss_title_lc.includes( s ) );
const bTriggerWordInTitle = words.some( s => s.includes( iss_title_lc ) || iss_title_lc.includes( s ) );
/*
Find regex based phrases
Expand All @@ -308,7 +305,7 @@ jobs:
console.log( "Title Lowercase ............... " + iss_title_lc )
console.log( "Startswith " + bug_tag.toLowerCase( ) + "................ " + iss_title_lc.startsWith( bug_tag.toLowerCase( ) ) )
console.log( "Title Includes Keyword ........ " + bIncWordT )
console.log( "Title Includes Keyword ........ " + bTriggerWordInTitle )
console.log( "Title Includes Regex .......... " + bFoundMatchTitle )
console.log( "Body Includes Regex ........... " + bFoundMatchBody )
console.log( "\n" )
Expand All @@ -318,7 +315,7 @@ jobs:
- Check if title contains word in words
*/
if ( iss_title_lc.startsWith( bug_tag.toLowerCase( ) ) || bIncWordT || bFoundMatchTitle || bFoundMatchBody )
if ( iss_title_lc.startsWith( bug_tag.toLowerCase( ) ) || bTriggerWordInTitle || bFoundMatchTitle || bFoundMatchBody )
{
console.log( "⚠️ " + bug_tag + " ---------------------------------------" )
Expand Down Expand Up @@ -365,7 +362,7 @@ jobs:
# #
# Labels > Features
#
# Title of issue is carried over from the previous step.
# Title of issue is carried over from the previous step.
# #

- name: >-
Expand Down Expand Up @@ -412,7 +409,7 @@ jobs:
*/
const words = [ "feature", "request", "add support" ];
const bIncWordT = words.some( s => s.includes( iss_title_lc ) || iss_title_lc.includes( s ) );
const bTriggerWordInTitle = words.some( s => s.includes( iss_title_lc ) || iss_title_lc.includes( s ) );
/*
Find regex based phrases
Expand All @@ -437,7 +434,7 @@ jobs:
console.log( "Title Lowercase ............... " + iss_title_lc )
console.log( "Startswith " + feat_tag.toLowerCase( ) + "............ " + iss_title_lc.startsWith( feat_tag.toLowerCase( ) ) )
console.log( "Title Includes Keyword ........ " + bIncWordT )
console.log( "Title Includes Keyword ........ " + bTriggerWordInTitle )
console.log( "Title Includes Regex .......... " + bFoundMatchTitle )
console.log( "Body Includes Regex ........... " + bFoundMatchBody )
console.log( "\n" )
Expand All @@ -448,7 +445,7 @@ jobs:
*/
// change TAG per category
if ( iss_title_lc.startsWith( feat_tag.toLowerCase( ) ) || bIncWordT || bFoundMatchTitle || bFoundMatchBody )
if ( iss_title_lc.startsWith( feat_tag.toLowerCase( ) ) || bTriggerWordInTitle || bFoundMatchTitle || bFoundMatchBody )
{
console.log( "⚠️ " + feat_tag + " ---------------------------------------" )
Expand Down Expand Up @@ -497,7 +494,7 @@ jobs:
# #
# Labels > Urgent
#
# Title of issue is carried over from the previous step.
# Title of issue is carried over from the previous step.
# #

- name: >-
Expand Down Expand Up @@ -543,7 +540,7 @@ jobs:
*/
const words = [ "urgent", "urgency", "emergency", "important", "critical" ];
const bIncWordT = words.some( s => s.includes( iss_title_lc ) || iss_title_lc.includes( s ) );
const bTriggerWordInTitle = words.some( s => s.includes( iss_title_lc ) || iss_title_lc.includes( s ) );
/*
Find regex based phrases
Expand All @@ -568,7 +565,7 @@ jobs:
console.log( "Title Lowercase ............... " + iss_title_lc )
console.log( "Startswith " + urgn_tag.toLowerCase( ) + "............. " + iss_title_lc.startsWith( urgn_tag.toLowerCase( ) ) )
console.log( "Title Includes Keyword ........ " + bIncWordT )
console.log( "Title Includes Keyword ........ " + bTriggerWordInTitle )
console.log( "Title Includes Regex .......... " + bFoundMatchTitle )
console.log( "Body Includes Regex ........... " + bFoundMatchBody )
console.log( "\n" )
Expand All @@ -579,7 +576,7 @@ jobs:
*/
// change TAG per category
if ( iss_title_lc.startsWith( urgn_tag.toLowerCase( ) ) || bIncWordT || bFoundMatchTitle || bFoundMatchBody )
if ( iss_title_lc.startsWith( urgn_tag.toLowerCase( ) ) || bTriggerWordInTitle || bFoundMatchTitle || bFoundMatchBody )
{
console.log( "⚠️ " + urgn_tag + " ---------------------------------------" )
Expand Down Expand Up @@ -629,7 +626,7 @@ jobs:
# #
# Labels > Roadmap
#
# Title of issue is carried over from the previous step.
# Title of issue is carried over from the previous step.
# #

- name: >-
Expand Down Expand Up @@ -675,7 +672,7 @@ jobs:
*/
const words = [ "roadmap", "road map", "planned" ];
const bIncWordT = words.some( s => s.includes( iss_title_lc ) || iss_title_lc.includes( s ) );
const bTriggerWordInTitle = words.some( s => s.includes( iss_title_lc ) || iss_title_lc.includes( s ) );
/*
Find regex based phrases
Expand All @@ -701,7 +698,7 @@ jobs:
console.log( "Title Lowercase ............... " + iss_title_lc )
console.log( "Startswith " + road_tag.toLowerCase( ) + "............ " + iss_title_lc.startsWith( road_tag.toLowerCase( ) ) )
console.log( "Title Includes Keyword ........ " + bIncWordT )
console.log( "Title Includes Keyword ........ " + bTriggerWordInTitle )
console.log( "Title Includes Regex .......... " + bFoundMatchTitle )
console.log( "Body Includes Regex ........... " + bFoundMatchBody )
console.log( "\n" )
Expand All @@ -712,7 +709,7 @@ jobs:
*/
// change TAG per category
if ( iss_title_lc.startsWith( road_tag.toLowerCase( ) ) || bIncWordT || bFoundMatchTitle || bFoundMatchBody )
if ( iss_title_lc.startsWith( road_tag.toLowerCase( ) ) || bTriggerWordInTitle || bFoundMatchTitle || bFoundMatchBody )
{
console.log( "⚠️ " + road_tag + " ---------------------------------------" )
Expand Down Expand Up @@ -773,8 +770,6 @@ jobs:
contents: 'read'
id-token: 'write'
issues: 'write'
environment:
name: Orion
steps:

# #
Expand Down Expand Up @@ -863,8 +858,6 @@ jobs:
&& !contains( needs.*.result, 'failure' )
permissions:
contents: write
environment:
name: Orion
steps:

# #
Expand Down
Loading

0 comments on commit 61a4abe

Please sign in to comment.