-
Notifications
You must be signed in to change notification settings - Fork 6
60 lines (54 loc) · 1.47 KB
/
add-greyhound.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
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Add a Greyhound
on:
workflow_dispatch:
inputs:
name:
type: string
required: true
summary:
description: Short summary about this greyhound
type: string
default: ''
color:
type: string
required: true
sex:
type: choice
options:
- male
- female
required: true
dob:
description: Date of birth, format MM/DD/YYYY
type: string
required: true
env:
INPUTS: ${{ toJSON(inputs) }}
jobs:
Add:
runs-on: ubuntu-latest
steps:
- uses: softprops/turnstyle@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
with:
token: ${{ secrets.ROOBOT_PAT }}
fetch-depth: 0
- uses: actions/setup-node@v4
- run: npm ci
- id: add
uses: actions/github-script@v6
with:
script: |
const inputs = JSON.parse(process.env.INPUTS)
const addGreyhound = require('./script/add-greyhound.js')
const message = await addGreyhound({github, context, core, inputs})
core.setOutput('message', message)
- id: push
run: |
git config --global user.email 'website@galtx-centex.org'
git config --global user.name 'Roobot'
git add _greyhounds/
git commit -m '${{ steps.add.outputs.message }}'
git push origin ${{ github.ref_name }}