File tree Expand file tree Collapse file tree 1 file changed +27
-14
lines changed Expand file tree Collapse file tree 1 file changed +27
-14
lines changed Original file line number Diff line number Diff line change 1
- name : Notify slack
2
- on : watch
1
+ name : Slack Notify
2
+ on :
3
+ watch :
4
+ types : [started]
3
5
jobs :
4
6
star-notify :
5
- name : Notify slack on star
6
- runs-on : ubuntu-latest
7
+ if : github.event_name == 'watch'
8
+ name : Notify Slack on star
9
+ runs-on : ubuntu-22.04
7
10
steps :
8
- - name : Get current star count
9
- run : |
10
- echo ::set-env name=STARS::$(curl --silent 'https://api.github.com/repos/layer5io/learn-layer5' -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\":\"${{ github.actor }} just starred Learn-Layer5! (https://github.com/layer5io/learn-layer5/stargazers) Total stars: ${{env.STARS}}\"}'
17
- command : echo "Now at ${{env.STARS}} stars."
11
+ - name : Get current star count
12
+ run : |
13
+ echo "STARS=$(curl --silent 'https://api.github.com/repos/${{github.repository}}' -H 'Accept: application/vnd.github.preview' | jq '.stargazers_count')" >> $GITHUB_ENV
14
+ - name : Notify slack
15
+ env :
16
+ SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
17
+ uses : pullreminders/slack-action@master
18
+ with :
19
+ args : ' {\"channel\":\"CSK7N9TGX\",\"text\":\"${{ github.actor }} just starred ${{github.repository}}! (https://github.com/${{github.repository}}/stargazers) Total ⭐️: ${{env.STARS}}\"}'
20
+ good-first-issue-notify :
21
+ if : github.event_name == 'issues' && github.event.label.name == 'good first issue' || github.event.label.name == 'first-timers-only'
22
+ name : Notify Slack for new good-first-issue
23
+ runs-on : ubuntu-22.04
24
+ steps :
25
+ - name : Notify slack
26
+ env :
27
+ SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
28
+ uses : pullreminders/slack-action@master
29
+ with :
30
+ args : ' {\"channel\":\"C019426UBNY\",\"text\":\"A good first issue label was just added to ${{github.event.issue.html_url}}.\"}'
You can’t perform that action at this time.
0 commit comments