Skip to content

Slack Notify

Slack Notify #65

Workflow file for this run

name: Notify slack
on: watch
jobs:
star-notify:
name: Notify slack on star
runs-on: ubuntu-latest
steps:
- name: Get current star count
run: |
echo ::set-env name=STARS::$(curl --silent 'https://api.github.com/repos/layer5io/learn-layer5' -H 'Accept: application/vnd.github.preview' | jq '.watchers_count')
- name: Notify slack
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: pullreminders/slack-action@master
with:
args: '{\"channel\":\"CSK7N9TGX\",\"text\":\"${{ github.actor }} just starred Learn-Layer5! (https://github.com/layer5io/learn-layer5/stargazers) Total stars: ${{env.STARS}}\"}'
command: echo "Now at ${{env.STARS}} stars."