-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Adeyinka Oresanya <[email protected]>
- Loading branch information
1 parent
5debc0e
commit cab6840
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |