-
Notifications
You must be signed in to change notification settings - Fork 30
42 lines (41 loc) · 1.33 KB
/
Public-health-check.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
39
40
41
42
name: Public Health Pledge Badging Check
on:
schedule:
- cron: 0 5 1 6,12 *
jobs:
create_issue:
name: Check Public Health Pledge
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Create issue
run: |
if [[ $CLOSE_PREVIOUS == true ]]; then
previous_issue_number=$(gh issue list \
--label "$LABELS" \
--json number \
--jq '.[0].number')
if [[ -n $previous_issue_number ]]; then
gh issue close "$previous_issue_number"
gh issue unpin "$previous_issue_number"
fi
fi
new_issue_url=$(gh issue create \
--title "$TITLE" \
--assignee "$ASSIGNEES" \
--label "$LABELS" \
--body "$BODY")
if [[ $PINNED == true ]]; then
gh issue pin "$new_issue_url"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
TITLE: Check Public Health Pledge Badging
ASSIGNEES: elizabethn
LABELS: check
BODY: |
Check the [Public Health Pledge Badge](https://publichealthpledge.com/badging) for updates, as this is tied to our DEI Event Badging Application.
PINNED: false
CLOSE_PREVIOUS: false