rich/.github/workflows/readmechanged.yml

25 lines
902 B
YAML
Raw Normal View History

2021-04-18 15:22:16 +00:00
name: README.md Changed
on:
push:
branches:
- master
2021-04-18 15:22:16 +00:00
paths:
- 'README.md'
jobs:
send_notification:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
2021-04-18 15:22:16 +00:00
- name: Send notification to README Authors
2021-04-18 15:41:12 +00:00
env:
2021-04-18 15:44:46 +00:00
GITHUB_TOKEN: ${{ secrets.GHP_README_WORKFLOW }}
GIT_SHA: ${{ github.sha }}
2021-04-18 15:22:16 +00:00
run: |
COMMIT=$(git rev-parse --short "$GIT_SHA")
AUTHORS='@willmcgugan @oleksis @Adilius'
BODY="🤓 $AUTHORS README.md changed 📝. Check the [commit $COMMIT](https://github.com/willmcgugan/rich/commit/$GIT_SHA) 👀"
DISCUSSIONID='MDEwOkRpc2N1c3Npb24zMzI2NzM0'
2021-04-18 15:22:16 +00:00
gh api graphql -H 'GraphQL-Features: discussions_api' -f body="$BODY" -F discussionId="$DISCUSSIONID" -f query='mutation($body: String!, $discussionId: ID!){addDiscussionComment(input:{body: $body , discussionId: $discussionId}){comment{id}}}'