-
Notifications
You must be signed in to change notification settings - Fork 6
58 lines (52 loc) · 1.38 KB
/
update-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
name: Update a Greyhound
on:
workflow_dispatch:
inputs:
name:
type: string
required: true
status:
type: choice
options:
- 'no update'
- 'pending'
- 'adopted'
- 'medicalhold'
- 'permafoster'
- 'deceased'
default: 'no update'
catsafe:
type: choice
options:
- 'no update'
- 'yes'
- 'no'
default: 'no update'
concurrency:
group: ${{ github.workflow }}
env:
INPUTS: ${{ toJSON(inputs) }}
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.ROOBOT_PAT }}
fetch-depth: 0
- uses: actions/setup-node@v4
- run: npm ci
- id: update
uses: actions/github-script@v7
with:
script: |
const inputs = JSON.parse(process.env.INPUTS)
const updateGreyhound = require('./script/update-greyhound.js')
const message = await updateGreyhound({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 commit -am '${{ steps.update.outputs.message }}'
git push origin ${{ github.ref_name }}