-
Notifications
You must be signed in to change notification settings - Fork 3.2k
44 lines (41 loc) · 1.49 KB
/
pr-bot.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: PR Bot
on:
pull_request_target:
paths:
- "extensions/**"
branches: [main, master]
jobs:
pr-bot:
if: github.repository == 'raycast/extensions'
name: "PR Bot"
runs-on: ubuntu-latest
steps:
- name: Get changed extensions
id: get_changed_extensions
uses: raycast/github-actions/[email protected]
with:
github_event_name: ${{ github.event_name }}
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Setup Bot
run: bun create github.com/raycast/github-action-bot
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.RAYCAST_BOT_API_ACCESS_TOKEN }}
- name: Run bot
run: |
cd github-action-bot
bun run index.ts
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.RAYCAST_BOT_API_ACCESS_TOKEN }}
SCRIPT: "scripts/bots/pr-bot.ts"
CHANGED_EXTENSIONS: ${{ steps.get_changed_extensions.outputs.paths }}
- name: Notify Failure to Slack
if: failure()
uses: raycast/github-actions/slack-send@master
with:
webhook: ${{ secrets.SLACK_RELEASE_CHANNEL_WEBHOOK_URL }}
color: "danger"
text: |
:no_entry_sign: ${env.GITHUB_WORKFLOW} has failed
<${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}|Action logs> | <${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/commit/${ env.GITHUB_SHA }|Commit: ${ env.GITHUB_SHA.substr(0,8) }>