From 0383ca003f34e54f9157ce6aff20ec0f8d00420c Mon Sep 17 00:00:00 2001 From: sarina Date: Tue, 16 Jul 2024 09:21:42 -0400 Subject: [PATCH] build: Try commenting and slack notifying in separate workflow steps --- .github/workflows/add-weekly-gh-requests.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/add-weekly-gh-requests.yml b/.github/workflows/add-weekly-gh-requests.yml index a5af4b9..2758833 100644 --- a/.github/workflows/add-weekly-gh-requests.yml +++ b/.github/workflows/add-weekly-gh-requests.yml @@ -1,7 +1,7 @@ name: Create weekly issues on: schedule: - - cron: 0 12 * * 2 + - cron: 0 14 * * 2 workflow_dispatch: {} env: @@ -22,5 +22,18 @@ jobs: --body "Go through [new discourse introductions](https://discuss.openedx.org/c/community/introductions/18) and welcome new people to the community.") - gh issue comment "$new_issue_url" \ - --body "@openedx/axim-oncall heads up on this request" + 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/slack-github-action@v1.26.0 + with: + # This data can be any valid JSON from a previous step in the GitHub Action + payload: | + { + "msg": "$NEW_ISSUE_URL" + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}