Skip to content

Update a Greyhound

Update a Greyhound #91

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
env:
INPUTS: ${{ toJSON(inputs) }}
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: softprops/turnstyle@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
with:
token: ${{ secrets.ROOBOT_PAT }}
fetch-depth: 0
- uses: actions/setup-node@v3
- run: npm ci
- id: update
uses: actions/github-script@v6
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 }}