-
-
Notifications
You must be signed in to change notification settings - Fork 28
46 lines (39 loc) · 1.13 KB
/
execute-draw.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
45
46
name: execute-draw
on:
push:
branches: [main]
permissions:
contents: write
env:
BOT_NAME: "drawbot"
BOT_EMAIL: "[email protected]"
jobs:
execute_draw:
if: "!contains(github.event.head_commit.author, 'drawbot')"
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Install nodejs 🔧
uses: actions/setup-node@v3
with:
node-version: latest
- name: Install dchoose 🔧
run: npm install -g dchoose
- name: Make folders if necessary 📁
run: |
mkdir -p ./recipients_selection/draws
mkdir -p ./recipients_selection/lists
- name: Draw 🎲
working-directory: recipients_selection
run: ./draw.sh
- name: Configure some git params 🔧
run: |
git config --global user.name $BOT_NAME
git config --global user.email $BOT_EMAIL
- name: Commit and raise PR 🔐
uses: peter-evans/create-pull-request@v5
with:
branch: draw/results
branch-suffix: timestamp
commit-message: completed a recipient draw