Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Support Triager

Support Triager #29

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 }}"