Skip to content

Update a Greyhound #172

Update a Greyhound

Update a Greyhound #172

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 '[email protected]'
git config --global user.name 'Roobot'
git commit -am '${{ steps.update.outputs.message }}'
git push origin ${{ github.ref_name }}