1- name : Slack Notify on Star
2- on : watch
1+ name : Slack Notify
2+ on :
3+ watch :
4+ types :
5+ - started
36jobs :
47 star-notify :
8+ if : github.event_name == 'watch'
59 name : Notify Slack on star
6- runs-on : ubuntu-latest
10+ runs-on : ubuntu-22.04
711 steps :
8- - name : Get current star count
9- run : |
10- echo ::set-env name=STARS::$(curl --silent 'https://api.github.com/repos/layer5io/advanced-istio-service-mesh-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 Advanced Istio Service Mesh Workshop! (https://github.com/layer5io/advanced-istio-service-mesh-workshop/stargazers) Total ⭐️: ${{env.STARS}}\"}'
12+ - name : Get current star count
13+ run : >
14+ echo "STARS=$(curl --silent
15+ 'https://api.github.com/repos/${{github.repository}}' -H 'Accept:
16+ application/vnd.github.preview' | jq '.stargazers_count')" >>
17+ $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
24+ ${{github.repository}}!
25+ (https://github.com/${{github.repository}}/stargazers) Total ⭐️:
26+ ${{env.STARS}}\"}'
27+ good-first-issue-notify :
28+ if : github.event_name == 'issues' && github.event.label.name == 'good first
29+ issue' || github.event.label.name == 'first-timers-only'
30+ name : Notify Slack for new good-first-issue
31+ runs-on : ubuntu-22.04
32+ steps :
33+ - name : Notify slack
34+ env :
35+ SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
36+ uses : pullreminders/slack-action@master
37+ with :
38+ args : ' {\"channel\":\"C019426UBNY\",\"text\":\"A good first issue label was just
39+ added to ${{github.event.issue.html_url}}.\"}'
0 commit comments