Skip to content

Commit

Permalink
ci: Cleanup GitHub Actions workflows (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
HUTCHHUTCHHUTCH authored Oct 20, 2020
1 parent adaa55e commit 89ff5e9
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
steps:
- name: Autoapproving
uses: hmarr/[email protected]
if: github.actor == 'asyncapi-bot'
if: github.actor == 'asyncapi-bot' || github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

Expand All @@ -36,7 +36,7 @@ jobs:
steps:
- name: Automerging
uses: pascalgn/[email protected]
if: github.actor == 'asyncapi-bot'
if: github.actor == 'asyncapi-bot' || github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
env:
GITHUB_TOKEN: "${{ secrets.GH_TOKEN }}"
GITHUB_LOGIN: asyncapi-bot
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/sentiment-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: 'Sentiment Analysis'

on:
issue_comment:
types:
- created
- edited
issues:
types:
- opened
- edited
pull_request:
types:
- opened
- edited
pull_request_review:
types:
- submitted
- edited
pull_request_review_comment:
types:
- created
- edited
jobs:
test:
name: Checking sentiments
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check sentiment
uses: derberg/code-of-conduct-sentiment-analysis-github-action@v1
id: sentiments
with:
gcp_key: ${{ secrets.GCP_KEY_SENTIMENT }}
- uses: someimportantcompany/github-actions-slack-message@v1
# this step runs only if sentiment is a negative number
if: steps.sentiments.outputs.sentiment < -0.2
with:
webhook-url: ${{ secrets.SLACK_SENTIMENTS }}
text: Here ${{steps.sentiments.outputs.source}} you can find a potential negative text that requires your attention as the sentiment analysis score is ${{steps.sentiments.outputs.sentiment}}
color: orange
2 changes: 1 addition & 1 deletion .github/workflows/welcome-first-time-contrib.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Welcome first time contributors

on:
pull_request:
pull_request_target:
types:
- opened
issues:
Expand Down

0 comments on commit 89ff5e9

Please sign in to comment.