Skip to content

Commit

Permalink
ci: update global workflows (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
asyncapi-bot authored Feb 8, 2022
1 parent 3016b39 commit e13cc5c
Show file tree
Hide file tree
Showing 2 changed files with 145 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@ on:

jobs:
bump:
if: startsWith(github.event.commits[0].message, 'chore(release):')
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Check if Node.js project and has package.json
id: packagejson
run: test -e ./package.json && echo "::set-output name=exists::true" || echo "::set-output name=exists::false"
- if: steps.packagejson.outputs.exists == 'true' && startsWith(github.event.commits[0].message, 'chore(release):')
- if: steps.packagejson.outputs.exists == 'true'
name: Bumping latest version of this package in other repositories
uses: derberg/npm-dependency-manager-for-your-github-org@v3
uses: derberg/npm-dependency-manager-for-your-github-org@v4
with:
github_token: ${{ secrets.GH_TOKEN }}
committer_username: asyncapi-bot
Expand Down
142 changes: 142 additions & 0 deletions .github/workflows/notify-tsc-members-mention.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
#This action is centrally managed in https://github.com/asyncapi/.github/
#Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo

#This action notifies community on slack whenever there is a new issue, PR or discussion started in given repository
name: Notify slack whenever TSC members are mentioned in GitHub

on:
issue_comment:
types:
- created
- edited

discussion_comment:
types:
- created
- edited

issues:
types:
- opened
- reopened

pull_request_target:
types:
- opened
- reopened
- ready_for_review

discussion:
types:
- created
- edited

jobs:

issue:
if: github.event_name == 'issues' && contains(github.event.issue.body, '@asyncapi/tsc_members')
name: On every new issue
runs-on: ubuntu-latest
steps:
- name: Convert markdown to slack markdown
uses: LoveToKnow/[email protected]
id: issuemarkdown
with:
text: "[${{github.event.issue.title}}](${{github.event.issue.html_url}}) \n ${{github.event.issue.body}}"
- name: Send info about issue
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}}
SLACK_TITLE: πŸ†˜ New issue that requires TSC Members attention πŸ†˜
SLACK_MESSAGE: ${{steps.issuemarkdown.outputs.text}}
MSG_MINIMAL: true

pull_request:
if: github.event_name == 'pull_request_target' && contains(github.event.pull_request.body, '@asyncapi/tsc_members')
name: On every new pull request
runs-on: ubuntu-latest
steps:
- name: Convert markdown to slack markdown
uses: LoveToKnow/[email protected]
id: prmarkdown
with:
text: "[${{github.event.pull_request.title}}](${{github.event.pull_request.html_url}}) \n ${{github.event.pull_request.body}}"
- name: Send info about pull request
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}}
SLACK_TITLE: πŸ†˜ New PR that requires TSC Members attention πŸ†˜
SLACK_MESSAGE: ${{steps.prmarkdown.outputs.text}}
MSG_MINIMAL: true

discussion:
if: github.event_name == 'discussion' && contains(github.event.discussion.body, '@asyncapi/tsc_members')
name: On every new discussion
runs-on: ubuntu-latest
steps:
- name: Convert markdown to slack markdown
uses: LoveToKnow/[email protected]
id: discussionmarkdown
with:
text: "[${{github.event.discussion.title}}](${{github.event.discussion.html_url}}) \n ${{github.event.discussion.body}}"
- name: Send info about pull request
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}}
SLACK_TITLE: πŸ†˜ New discussion that requires TSC Members attention πŸ†˜
SLACK_MESSAGE: ${{steps.discussionmarkdown.outputs.text}}
MSG_MINIMAL: true

issue_comment:
if: ${{ github.event_name == 'issue_comment' && !github.event.issue.pull_request && contains(github.event.comment.body, '@asyncapi/tsc_members') }}
name: On every new comment in issue
runs-on: ubuntu-latest
steps:
- name: Convert markdown to slack markdown
uses: LoveToKnow/[email protected]
id: issuemarkdown
with:
text: "[${{github.event.issue.title}}](${{github.event.comment.html_url}}) \n ${{github.event.comment.body}}"
- name: Send info about issue comment
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}}
SLACK_TITLE: πŸ†˜ New comment under existing issue that requires TSC Members attention πŸ†˜
SLACK_MESSAGE: ${{steps.issuemarkdown.outputs.text}}
MSG_MINIMAL: true

pr_comment:
if: github.event_name == 'issue_comment' && github.event.issue.pull_request && contains(github.event.comment.body, '@asyncapi/tsc_members')
name: On every new comment in pr
runs-on: ubuntu-latest
steps:
- name: Convert markdown to slack markdown
uses: LoveToKnow/[email protected]
id: prmarkdown
with:
text: "[${{github.event.issue.title}}](${{github.event.comment.html_url}}) \n ${{github.event.comment.body}}"
- name: Send info about PR comment
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}}
SLACK_TITLE: πŸ†˜ New comment under existing PR that requires TSC Members attention πŸ†˜
SLACK_MESSAGE: ${{steps.prmarkdown.outputs.text}}
MSG_MINIMAL: true

discussion_comment:
if: github.event_name == 'discussion_comment' && contains(github.event.comment.body, '@asyncapi/tsc_members')
name: On every new comment in discussion
runs-on: ubuntu-latest
steps:
- name: Convert markdown to slack markdown
uses: LoveToKnow/[email protected]
id: discussionmarkdown
with:
text: "[${{github.event.discussion.title}}](${{github.event.comment.html_url}}) \n ${{github.event.comment.body}}"
- name: Send info about discussion comment
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}}
SLACK_TITLE: πŸ†˜ New comment under existing discussion that requires TSC Members attention πŸ†˜
SLACK_MESSAGE: ${{steps.discussionmarkdown.outputs.text}}
MSG_MINIMAL: true

0 comments on commit e13cc5c

Please sign in to comment.