-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (34 loc) · 1.39 KB
/
add-quarterly-GH-audit.yml
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
name: Create quarterly issues for GitHub audit
on:
schedule:
- cron: 0 0 1 1,4,7,10 *
workflow_dispatch: {}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
create_issue:
name: Create quarterly issues
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- run: |
# Audit GitHub Users
new_issue_url=$(gh issue create --repo "openedx/axim-engineering" \
--title "Quarterly Audit of Github Users" \
--label "github-request" \
--body "It is time to perform the quartely audit of GitHub users in the \`openedx\` org. The playbook for performing the audit can be found [here](https://openedx.atlassian.net/wiki/spaces/COMM/pages/3438903337/On-call+Playbooks#%F0%9F%94%8D-Audit-Github-Users).")
echo "NEW_ISSUE_URL=$new_issue_url" >> $GITHUB_ENV
- name: Comment on issue
run: gh issue comment $NEW_ISSUE_URL --body "@openedx/axim-oncall heads up on this request"
- name: Send custom JSON data to Slack workflow
id: slack
uses: slackapi/[email protected]
with:
# This data can be any valid JSON from a previous step in the GitHub Action
payload: |
{
"msg": "Time to run the quarterly user audit. ${{ env.NEW_ISSUE_URL }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}