Create weekly issues #44
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
name: Create weekly issues | |
on: | |
schedule: | |
- cron: 0 16 * * 2 | |
workflow_dispatch: {} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ORGANIZATION: openedx | |
jobs: | |
create_issue: | |
name: Create weekly issues | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
steps: | |
- run: | | |
new_issue_url=$(gh issue create --repo "openedx/axim-engineering" \ | |
--title "Welcome new discourse members" \ | |
--label "github-request" \ | |
--body "Go through [new discourse | |
introductions](https://discuss.openedx.org/c/community/introductions/18) | |
and welcome new people to the community.") | |
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 check for new Discourse members. ${{ env.NEW_ISSUE_URL }}" | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |