Skip to content

Commit 61a4abe

Browse files
committed
ci: update workflows
1 parent 36983e1 commit 61a4abe

File tree

7 files changed

+385
-117
lines changed

7 files changed

+385
-117
lines changed

.github/workflows/deploy-clean.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# #
2+
# @type github workflow
3+
# @desc cleans up the list of deployments in the environment history
4+
# @author Aetherinox
5+
# @url https://github.com/Aetherinox
6+
# #
7+
8+
name: "⚙️ Deploy › Clean"
9+
run-name: "⚙️ Deploy › Clean"
10+
11+
# #
12+
# triggers
13+
# #
14+
15+
on:
16+
workflow_dispatch:
17+
18+
# #
19+
# environment variables
20+
# #
21+
22+
env:
23+
BOT_NAME_1: AdminServ
24+
BOT_NAME_2: AdminServX
25+
BOT_NAME_3: EuropaServ
26+
BOT_NAME_DEPENDABOT: dependabot[bot]
27+
LABELS_JSON: |
28+
[
29+
{ "name": "AC › Changes Made", "color": "8F1784", "description": "Requested changes have been made and are pending a re-scan" },
30+
{ "name": "AC › Changes Required", "color": "8F1784", "description": "Requires changes to be made to the package before being accepted" },
31+
{ "name": "AC › Failed", "color": "a61f2d", "description": "Autocheck failed to run through a complete cycle, requires investigation" },
32+
{ "name": "AC › Needs Rebase", "color": "8F1784", "description": "Due to the permissions on the requesting repo, this pull request must be rebased by the author" },
33+
{ "name": "AC › Passed", "color": "146b4a", "description": "Ready to be reviewed" },
34+
{ "name": "AC › Review Required", "color": "8F1784", "description": "PR needs to be reviewed by another person, after the requested changes have been made" },
35+
{ "name": "AC › Security Warning", "color": "761620", "description": "Does not conform to developer policies, or includes potentially dangerous code" },
36+
{ "name": "AC › Skipped Scan", "color": "8F1784", "description": "Author has skipped code scan" },
37+
{ "name": "Status 𐄂 Duplicate", "color": "75536b", "description": "Issue or pull request already exists" },
38+
{ "name": "Status 𐄂 Accepted", "color": "2e7539", "description": "This pull request has been accepted" },
39+
{ "name": "Status 𐄂 Autoclosed", "color": "3E0915", "description": "Originally stale and was autoclosed for no activity" },
40+
{ "name": "Status 𐄂 Denied", "color": "ba4058", "description": "Pull request has been denied" },
41+
{ "name": "Status 𐄂 Locked", "color": "550F45", "description": "Automatically locked by AdminServ for a prolonged period of inactivity" },
42+
{ "name": "Status 𐄂 Need Info", "color": "2E3C4C", "description": "Not enough information to resolve" },
43+
{ "name": "Status 𐄂 No Action", "color": "030406", "description": "Closed without any action being taken" },
44+
{ "name": "Status 𐄂 Pending", "color": "984b12", "description": "Pending pull request" },
45+
{ "name": "Status 𐄂 Released", "color": "1b6626", "description": "Issues or PR has been implemented and is now live" },
46+
{ "name": "Status 𐄂 Reopened", "color": "8a6f14", "description": "A previously closed PR which has been re-opened" },
47+
{ "name": "Status 𐄂 Review", "color": "9e1451", "description": "Currently pending review" },
48+
{ "name": "Status 𐄂 Stale", "color": "928282", "description": "Has not had any activity in over 30 days" },
49+
{ "name": "Type ◦ Bug", "color": "9a2c2c", "description": "Something isn't working" },
50+
{ "name": "Type ◦ Dependency", "color": "243759", "description": "Item is associated to dependency" },
51+
{ "name": "Type ◦ Docs", "color": "0e588d", "description": "Improvements or modifications to docs" },
52+
{ "name": "Type ◦ Feature", "color": "3c4e93", "description": "Feature request" },
53+
{ "name": "Type ◦ Git Action", "color": "030406", "description": "GitHub Action / workflow" },
54+
{ "name": "Type ◦ Pull Request", "color": "8F1784", "description": "Normal pull request" },
55+
{ "name": "Type ◦ Roadmap", "color": "8F1784", "description": "Feature or bug currently planned for implementation" },
56+
{ "name": "Type ◦ Internal", "color": "A51994", "description": "Assigned items are for internal developer use" },
57+
{ "name": "Build ◦ Desktop", "color": "c7ca4a", "description": "Specific to desktop" },
58+
{ "name": "Build ◦ Linux", "color": "c7ca4a", "description": "Specific to Linux" },
59+
{ "name": "Build ◦ MacOS", "color": "c7ca4a", "description": "Specific to MacOS" },
60+
{ "name": "Build ◦ Mobile", "color": "c7ca4a", "description": "Specific to mobile" },
61+
{ "name": "Build ◦ Web", "color": "c7ca4a", "description": "Specific to web" },
62+
{ "name": "Build ◦ Windows", "color": "c7ca4a", "description": "Specific to Windows" },
63+
{ "name": "› API", "color": "F99B50", "description": "Plugin API, CLI, browser JS API" },
64+
{ "name": "› Auto-type", "color": "9141E0", "description": "Auto-type functionality in desktop apps" },
65+
{ "name": "› Browser", "color": "9141E0", "description": "Browser plugins and passing data to <=> from app" },
66+
{ "name": "› Customization", "color": "E3F0FC", "description": "Customizations: plugins, themes, configs" },
67+
{ "name": "› Design", "color": "FA70DE", "description": "Design related queries" },
68+
{ "name": "› Dist", "color": "FA70DE", "description": "Installers and other forms of software distribution" },
69+
{ "name": "› Enterprise", "color": "11447a", "description": "Issues about collaboration, administration, and so on" },
70+
{ "name": "› Hardware", "color": "5a7503", "description": "YubiKey, other tokens, biometrics" },
71+
{ "name": "› Import/Export", "color": "F5FFCC", "description": "Import from and export to different file formats" },
72+
{ "name": "› Improvement", "color": "185c98", "description": "Enhance an existing feature" },
73+
{ "name": "› Performance", "color": "006b75", "description": "Web and desktop performance issues" },
74+
{ "name": "› Plugin Request", "color": "FCE9CA", "description": "Requested changes should be implemented as a plugin" },
75+
{ "name": "› Security", "color": "F75D39", "description": "Security issues" },
76+
{ "name": "› Self-Hosting", "color": "fad8c7", "description": "Self-hosting installations and configs" },
77+
{ "name": "› Storage", "color": "5319e7", "description": "Storage providers: Dropbox, Google, WebDAV, etc." },
78+
{ "name": "› Updater", "color": "1BADDE", "description": "Auto-updater issues" },
79+
{ "name": "› UX", "color": "1BADDE", "description": "UX and usability" },
80+
{ "name": "› Website", "color": "fef2c0", "description": "Website related issues" },
81+
{ "name": "⚠ Urgent", "color": "a8740e", "description": "Requires urgent attention" },
82+
{ "name": "⚠ Announcement", "color": "DB4712", "description": "Announcements" },
83+
{ "name": "📰 Progress Report", "color": "392297", "description": "Development updates" },
84+
{ "name": "📦 Release", "color": "277542", "description": "Release announcements" },
85+
{ "name": "✔️ Poll", "color": "972255", "description": "Community polls" },
86+
{ "name": "❔ Question", "color": "FFFFFF", "description": "All questions" }
87+
]
88+
89+
# #
90+
# jobs
91+
# #
92+
93+
jobs:
94+
cleanup:
95+
runs-on: ubuntu-latest
96+
permissions: write-all
97+
98+
steps:
99+
- name: >-
100+
⚙️ Deployments › Clean
101+
uses: strumwolf/delete-deployment-environment@v2
102+
with:
103+
token: ${{ secrets.SELF_TOKEN_CL }}
104+
environment: orion
105+
onlyRemoveDeployments: true

.github/workflows/issues-accept.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# #
2-
# @parent : github workflow
3-
# @desc : adds a label to a PR when the command "/accept" is typed in the issue comments
4-
# @author : Aetherinox
5-
# @url : https://github.com/Aetherinox
2+
# @type github workflow
3+
# @desc adds a label to a PR when the command "/accept" is typed in the issue comments
4+
# do not attempt to use env variables in if condition.
5+
# do not accept to change GITHUB_TOKEN.
6+
# @author Aetherinox
7+
# @url https://github.com/Aetherinox
68
# #
79

810
name: "🎫 Issue › Accept"
@@ -39,8 +41,8 @@ jobs:
3941
# #
4042

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

4648
# #

.github/workflows/issues-new.yml

Lines changed: 24 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# #
2-
# @parent : github workflow
3-
# @desc : allows you to auto assign labels to new issues and pull requests
4-
# @author : Aetherinox
5-
# @url : https://github.com/Aetherinox
2+
# @type github workflow
3+
# @desc searches a new issues title and body for certain keywords and assigns a label
4+
# sets the assignee for the issue to the repository owner
5+
# @author Aetherinox
6+
# @url https://github.com/Aetherinox
67
#
78
# requires the following labels to be created in your repo:
89
# - bug
@@ -133,8 +134,6 @@ jobs:
133134
name: >-
134135
🎫 Labels › Verify Existing
135136
runs-on: ubuntu-latest
136-
environment:
137-
name: Orion
138137
steps:
139138

140139
# #
@@ -210,8 +209,6 @@ jobs:
210209
contents: 'read'
211210
id-token: 'write'
212211
issues: 'write'
213-
environment:
214-
name: Orion
215212
steps:
216213

217214
# #
@@ -235,7 +232,7 @@ jobs:
235232
# #
236233
# Labels > Bugs
237234
#
238-
# Title of issue is carried over from the previous step.
235+
# Title of issue is carried over from the previous step.
239236
# #
240237

241238
- name: >-
@@ -261,9 +258,9 @@ jobs:
261258
262259
const iss_title_lc = iss_title.toLowerCase( );
263260
264-
console.log( "Feat Title .................... " + iss_title )
265-
console.log( "Feat Output ................... " + `${{ steps.task_get_title.outputs.issue_title }}` )
266-
console.log( "Feat Payload .................. " + `${ context.payload.issue.title }` )
261+
console.log( "Bug Title ..................... " + iss_title )
262+
console.log( "Bug Output .................... " + `${{ steps.task_get_title.outputs.issue_title }}` )
263+
console.log( "Bug Payload ................... " + `${ context.payload.issue.title }` )
267264
268265
/*
269266
Tags
@@ -283,7 +280,7 @@ jobs:
283280
*/
284281
285282
const words = [ "bug", "broke", "issue", "fail" ];
286-
const bIncWordT = words.some( s => s.includes( iss_title_lc ) || iss_title_lc.includes( s ) );
283+
const bTriggerWordInTitle = words.some( s => s.includes( iss_title_lc ) || iss_title_lc.includes( s ) );
287284
288285
/*
289286
Find regex based phrases
@@ -308,7 +305,7 @@ jobs:
308305
309306
console.log( "Title Lowercase ............... " + iss_title_lc )
310307
console.log( "Startswith " + bug_tag.toLowerCase( ) + "................ " + iss_title_lc.startsWith( bug_tag.toLowerCase( ) ) )
311-
console.log( "Title Includes Keyword ........ " + bIncWordT )
308+
console.log( "Title Includes Keyword ........ " + bTriggerWordInTitle )
312309
console.log( "Title Includes Regex .......... " + bFoundMatchTitle )
313310
console.log( "Body Includes Regex ........... " + bFoundMatchBody )
314311
console.log( "\n" )
@@ -318,7 +315,7 @@ jobs:
318315
- Check if title contains word in words
319316
*/
320317
321-
if ( iss_title_lc.startsWith( bug_tag.toLowerCase( ) ) || bIncWordT || bFoundMatchTitle || bFoundMatchBody )
318+
if ( iss_title_lc.startsWith( bug_tag.toLowerCase( ) ) || bTriggerWordInTitle || bFoundMatchTitle || bFoundMatchBody )
322319
{
323320
324321
console.log( "⚠️ " + bug_tag + " ---------------------------------------" )
@@ -365,7 +362,7 @@ jobs:
365362
# #
366363
# Labels > Features
367364
#
368-
# Title of issue is carried over from the previous step.
365+
# Title of issue is carried over from the previous step.
369366
# #
370367

371368
- name: >-
@@ -412,7 +409,7 @@ jobs:
412409
*/
413410
414411
const words = [ "feature", "request", "add support" ];
415-
const bIncWordT = words.some( s => s.includes( iss_title_lc ) || iss_title_lc.includes( s ) );
412+
const bTriggerWordInTitle = words.some( s => s.includes( iss_title_lc ) || iss_title_lc.includes( s ) );
416413
417414
/*
418415
Find regex based phrases
@@ -437,7 +434,7 @@ jobs:
437434
438435
console.log( "Title Lowercase ............... " + iss_title_lc )
439436
console.log( "Startswith " + feat_tag.toLowerCase( ) + "............ " + iss_title_lc.startsWith( feat_tag.toLowerCase( ) ) )
440-
console.log( "Title Includes Keyword ........ " + bIncWordT )
437+
console.log( "Title Includes Keyword ........ " + bTriggerWordInTitle )
441438
console.log( "Title Includes Regex .......... " + bFoundMatchTitle )
442439
console.log( "Body Includes Regex ........... " + bFoundMatchBody )
443440
console.log( "\n" )
@@ -448,7 +445,7 @@ jobs:
448445
*/
449446
450447
// change TAG per category
451-
if ( iss_title_lc.startsWith( feat_tag.toLowerCase( ) ) || bIncWordT || bFoundMatchTitle || bFoundMatchBody )
448+
if ( iss_title_lc.startsWith( feat_tag.toLowerCase( ) ) || bTriggerWordInTitle || bFoundMatchTitle || bFoundMatchBody )
452449
{
453450
454451
console.log( "⚠️ " + feat_tag + " ---------------------------------------" )
@@ -497,7 +494,7 @@ jobs:
497494
# #
498495
# Labels > Urgent
499496
#
500-
# Title of issue is carried over from the previous step.
497+
# Title of issue is carried over from the previous step.
501498
# #
502499

503500
- name: >-
@@ -543,7 +540,7 @@ jobs:
543540
*/
544541
545542
const words = [ "urgent", "urgency", "emergency", "important", "critical" ];
546-
const bIncWordT = words.some( s => s.includes( iss_title_lc ) || iss_title_lc.includes( s ) );
543+
const bTriggerWordInTitle = words.some( s => s.includes( iss_title_lc ) || iss_title_lc.includes( s ) );
547544
548545
/*
549546
Find regex based phrases
@@ -568,7 +565,7 @@ jobs:
568565
569566
console.log( "Title Lowercase ............... " + iss_title_lc )
570567
console.log( "Startswith " + urgn_tag.toLowerCase( ) + "............. " + iss_title_lc.startsWith( urgn_tag.toLowerCase( ) ) )
571-
console.log( "Title Includes Keyword ........ " + bIncWordT )
568+
console.log( "Title Includes Keyword ........ " + bTriggerWordInTitle )
572569
console.log( "Title Includes Regex .......... " + bFoundMatchTitle )
573570
console.log( "Body Includes Regex ........... " + bFoundMatchBody )
574571
console.log( "\n" )
@@ -579,7 +576,7 @@ jobs:
579576
*/
580577
581578
// change TAG per category
582-
if ( iss_title_lc.startsWith( urgn_tag.toLowerCase( ) ) || bIncWordT || bFoundMatchTitle || bFoundMatchBody )
579+
if ( iss_title_lc.startsWith( urgn_tag.toLowerCase( ) ) || bTriggerWordInTitle || bFoundMatchTitle || bFoundMatchBody )
583580
{
584581
585582
console.log( "⚠️ " + urgn_tag + " ---------------------------------------" )
@@ -629,7 +626,7 @@ jobs:
629626
# #
630627
# Labels > Roadmap
631628
#
632-
# Title of issue is carried over from the previous step.
629+
# Title of issue is carried over from the previous step.
633630
# #
634631

635632
- name: >-
@@ -675,7 +672,7 @@ jobs:
675672
*/
676673
677674
const words = [ "roadmap", "road map", "planned" ];
678-
const bIncWordT = words.some( s => s.includes( iss_title_lc ) || iss_title_lc.includes( s ) );
675+
const bTriggerWordInTitle = words.some( s => s.includes( iss_title_lc ) || iss_title_lc.includes( s ) );
679676
680677
/*
681678
Find regex based phrases
@@ -701,7 +698,7 @@ jobs:
701698
702699
console.log( "Title Lowercase ............... " + iss_title_lc )
703700
console.log( "Startswith " + road_tag.toLowerCase( ) + "............ " + iss_title_lc.startsWith( road_tag.toLowerCase( ) ) )
704-
console.log( "Title Includes Keyword ........ " + bIncWordT )
701+
console.log( "Title Includes Keyword ........ " + bTriggerWordInTitle )
705702
console.log( "Title Includes Regex .......... " + bFoundMatchTitle )
706703
console.log( "Body Includes Regex ........... " + bFoundMatchBody )
707704
console.log( "\n" )
@@ -712,7 +709,7 @@ jobs:
712709
*/
713710
714711
// change TAG per category
715-
if ( iss_title_lc.startsWith( road_tag.toLowerCase( ) ) || bIncWordT || bFoundMatchTitle || bFoundMatchBody )
712+
if ( iss_title_lc.startsWith( road_tag.toLowerCase( ) ) || bTriggerWordInTitle || bFoundMatchTitle || bFoundMatchBody )
716713
{
717714
718715
console.log( "⚠️ " + road_tag + " ---------------------------------------" )
@@ -773,8 +770,6 @@ jobs:
773770
contents: 'read'
774771
id-token: 'write'
775772
issues: 'write'
776-
environment:
777-
name: Orion
778773
steps:
779774

780775
# #
@@ -863,8 +858,6 @@ jobs:
863858
&& !contains( needs.*.result, 'failure' )
864859
permissions:
865860
contents: write
866-
environment:
867-
name: Orion
868861
steps:
869862

870863
# #

0 commit comments

Comments
 (0)