File tree Expand file tree Collapse file tree 1 file changed +31
-11
lines changed Expand file tree Collapse file tree 1 file changed +31
-11
lines changed Original file line number Diff line number Diff line change 1- name : Slack Notify on Star
2- on : watch
1+ name : Slack Notify
2+
3+ on :
4+ watch :
5+ types : [started]
6+ issues :
7+ types : [labeled]
8+
39jobs :
410 star-notify :
11+ if : github.event_name == 'watch'
512 name : Notify Slack on star
613 runs-on : ubuntu-latest
714 steps :
8- - name : Get current star count
9- run : |
10- echo ::set-env name=STARS::$(curl --silent 'https://api.github.com/repos/layer5io/containers-101-workshop' -H 'Accept: application/vnd.github.preview' | jq '.watchers_count')
11- - name : Notify slack
12- env :
13- SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
14- uses : pullreminders/slack-action@master
15- with :
16- args : ' {\"channel\":\"CSK7N9TGX\",\"text\":\"Someone just starred Containers 101 Workshop! (https://github.com/layer5io/containers-101-workshop/stargazers) Total ⭐️: ${{env.STARS}}\"}'
15+ - name : Get current star count
16+ run : |
17+ echo "STARS=$(curl --silent 'https://api.github.com/repos/${{ github.repository }}' -H 'Accept: application/vnd.github.preview' | jq '.stargazers_count')" >> $GITHUB_ENV
18+ - name : Notify Slack
19+ env :
20+ SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
21+ uses : pullreminders/slack-action@master
22+ with :
23+ args : ' {\"channel\":\"CSK7N9TGX\",\"text\":\"${{ github.actor }} just starred ${{ github.repository }}! (https://github.com/${{ github.repository }}/stargazers) Total ⭐️: ${{ env.STARS }}\"}'
24+
25+ good-first-issue-notify :
26+ if : github.event_name == 'issues' && (github.event.label.name == 'good first issue' || github.event.label.name == 'first-timers-only')
27+ name : Notify Slack for new good-first-issue
28+ runs-on : ubuntu-latest
29+ steps :
30+ - name : Notify Slack
31+ env :
32+ SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
33+ uses : pullreminders/slack-action@master
34+ with :
35+ args : ' {\"channel\":\"C019426UBNY\",\"type\":\"section\",\"text\":\":new: Good first issue up for grabs: ${{ github.event.issue.title }} - ${{ github.event.issue.html_url }} \"}'
36+
You can’t perform that action at this time.
0 commit comments