This repository has been archived by the owner on Jun 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
150 lines (128 loc) · 4.81 KB
/
support-triager.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
name: Support Triager
on:
workflow_dispatch:
inputs:
update-roles:
required: false
type: boolean
default: false
description: |
Whether or not to update the Team Roles or proceed with those currently saved
in the team-roles.json file. If True, the file will be updated and new members
will be used in the standup. If False (default), the file will not be updated
and the members currently listed there will be used in the standup.
update-calendar:
required: false
type: boolean
default: false
description: |
Whether or not to add a new event to the Team Roles calendar. If True, a new
event will be added.
usergroup-name:
required: false
default: support-triagers
description: |
The Slack usergroup our Support Triagers are generated from
schedule:
- cron: "0 0 * * MON" # Run at 00:00 UTC weekly on Mondays
env:
USERGROUP_NAME: support-triagers
jobs:
create-standup:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Python v3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv if one exists
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies if cache does not exist
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install library
run: poetry install --no-interaction
# This action use the github official cache mechanism internally
- name: Install sops
uses: mdgreenwald/mozilla-sops-action@v1
with:
version: v3.7.2
- name: Setup sops credentials to decrypt repo secrets
uses: google-github-actions/auth@v2
with:
credentials_json: "${{ secrets.GCP_KMS_DECRYPTOR_KEY }}"
- name: Update team member in role
if: github.event_name == 'schedule' || github.event.inputs.update-roles == 'true'
run: |
source .venv/bin/activate
poetry run update-team-role support-triager
env:
USERGROUP_NAME: "${{ github.event.inputs.usergroup-name || env.USERGROUP_NAME }}"
- name: Add and Commit updated team-roles.json file
if: github.event_name == 'schedule' || github.event.inputs.update-roles == 'true'
uses: EndBug/add-and-commit@v9
with:
add: team-roles.json
message: "Update the Team Roles JSON file"
- name: Create a standup for the Support Triager
run: |
source .venv/bin/activate
poetry run create-standup support-triager
update-calendar:
runs-on: ubuntu-latest
needs:
- create-standup
if: |
github.event.inputs.update-calendar == 'true'
|| github.event_name == 'schedule'
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Python v3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv if one exists
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies if cache does not exist
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install library
run: poetry install --no-interaction
# This action use the github official cache mechanism internally
- name: Install sops
uses: mdgreenwald/mozilla-sops-action@v1
with:
version: v3.7.2
- name: Setup sops credentials to decrypt repo secrets
uses: google-github-actions/auth@v2
with:
credentials_json: "${{ secrets.GCP_KMS_DECRYPTOR_KEY }}"
- name: Create next Support Triager event in the calendar
run: |
source .venv/bin/activate
poetry run create-next-event support-triager
env:
USERGROUP_NAME: "${{ github.event.inputs.usergroup-name || env.USERGROUP_NAME }}"