Skip to content

Commit 375df84

Browse files
committed
ci: update workflows
1 parent 3f3189c commit 375df84

File tree

8 files changed

+2724
-2234
lines changed

8 files changed

+2724
-2234
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: Aetherinox/[email protected]
102+
with:
103+
token: ${{ secrets.SELF_TOKEN_CL }}
104+
environment: orion
105+
onlyRemoveDeployments: true
Lines changed: 52 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,72 @@
1-
# ---------------------------------------------------------------------------------------
2-
# @parent : github workflow
3-
# @desc : adds a label and assignee when specified user types /accept in
4-
# PR comment.
5-
# @author : Aetherinox
6-
# @url : https://github.com/Aetherinox
7-
# ---------------------------------------------------------------------------------------
1+
# #
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
8+
# #
89

910
name: "🎫 Issue › Accept"
1011
run-name: "🎫 Issue › Accept"
1112

12-
# ---------------------------------------------------------------------------------------
13+
# #
1314
# triggers
14-
# ---------------------------------------------------------------------------------------
15+
# #
1516

1617
on:
17-
issue_comment:
18-
types: [created]
18+
issue_comment:
19+
types: [created]
1920

20-
# ---------------------------------------------------------------------------------------
21+
# #
2122
# environment variables
22-
# ---------------------------------------------------------------------------------------
23+
# #
2324

2425
env:
25-
LABEL_ACCEPT: "Status 𐄂 Accepted"
26+
LABEL_ACCEPT: "Status 𐄂 Accepted"
2627

27-
ASSIGN_USER: Aetherinox
28-
BOT_NAME_1: AdminServ
29-
BOT_NAME_2: AdminServX
30-
BOT_NAME_3: EuropaServ
31-
BOT_NAME_DEPENDABOT: dependabot[bot]
28+
BOT_NAME_1: AdminServ
29+
BOT_NAME_2: AdminServX
30+
BOT_NAME_3: EuropaServ
31+
BOT_NAME_DEPENDABOT: dependabot[bot]
3232

33-
# ---------------------------------------------------------------------------------------
33+
# #
3434
# jobs
35-
#
36-
# env not available for job.if
37-
# ---------------------------------------------------------------------------------------
35+
# #
3836

3937
jobs:
40-
deploy:
41-
runs-on: ubuntu-latest
42-
if: github.event.issue.pull_request && contains(github.event.comment.body, '/accept') && github.event.comment.user.login == 'Aetherinox'
43-
steps:
4438

45-
# ---------------------------------------------------------------------------------------
46-
# Add Label to accepted PR
47-
# ---------------------------------------------------------------------------------------
39+
# #
40+
# Job [ Deploy ]
41+
# #
4842

49-
- name: "🏷️ Assign Label › ${{ env.LABEL_ACCEPT }}"
50-
run: gh issue edit "$NUMBER" --add-label "$LABELS"
51-
env:
52-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53-
GH_REPO: ${{ github.repository }}
54-
NUMBER: ${{ github.event.issue.number }}
55-
LABELS: ${{ env.LABEL_ACCEPT }}
43+
deploy:
44+
if: contains(github.event.comment.body, '/accept') && github.event.comment.user.login == 'Aetherinox'
45+
runs-on: ubuntu-latest
46+
steps:
5647

57-
# ---------------------------------------------------------------------------------------
58-
# Add assignee to accepted PR
59-
# ---------------------------------------------------------------------------------------
48+
# #
49+
# Add Label to accepted PR
50+
# #
6051

61-
- name: "🏷️ Assign Assignee › ${{ env.ASSIGN_USER }}"
62-
run: gh issue edit "$NUMBER" --add-assignee "$ASSIGNEE"
63-
env:
64-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65-
GH_REPO: ${{ github.repository }}
66-
NUMBER: ${{ github.event.issue.number }}
67-
ASSIGNEE: ${{ env.ASSIGN_USER }}
52+
- name: >-
53+
🏷️ Assign Label › ${{ env.LABEL_ACCEPT }}
54+
run: gh issue edit "$NUMBER" --add-label "$LABELS"
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
GH_REPO: ${{ github.repository }}
58+
NUMBER: ${{ github.event.issue.number }}
59+
LABELS: ${{ env.LABEL_ACCEPT }}
60+
61+
# #
62+
# Add assignee to accepted PR
63+
# #
64+
65+
- name: >-
66+
🏷️ Assign Assignee › ${{ github.repository_owner }}
67+
run: gh issue edit "$NUMBER" --add-assignee "$ASSIGNEE"
68+
env:
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70+
GH_REPO: ${{ github.repository }}
71+
NUMBER: ${{ github.event.issue.number }}
72+
ASSIGNEE: ${{ github.repository_owner }}

0 commit comments

Comments
 (0)