-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (57 loc) · 1.83 KB
/
Copy pathbot.yml
File metadata and controls
61 lines (57 loc) · 1.83 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: soothfast-bot
on:
push:
branches: [master]
paths: [bot/**, action/**, .github/workflows/bot.yml]
pull_request:
paths: [bot/**, action/**, .github/workflows/bot.yml]
permissions: {}
jobs:
bot-check:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
with:
egress-policy: audit
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 22
cache: npm
cache-dependency-path: bot/package-lock.json
- run: npm ci
working-directory: bot
- run: npm run check
working-directory: bot
- run: npm test
working-directory: bot
- run: shellcheck action/*.sh
# The Worker holds the App private key; the deploy token is the only
# credential this repo keeps for it.
deploy:
if: github.event_name == 'push'
needs: [bot-check]
concurrency:
group: bot-deploy
cancel-in-progress: false
runs-on: ubuntu-latest
environment: bot
permissions:
contents: read
steps:
- uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
with:
egress-policy: audit
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: cloudflare/wrangler-action@ebbaa1584979971c8614a24965b4405ff95890e0 # v4.0.0
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: bot
wranglerVersion: 4.129.0