Skip to content

Add a Greyhound

Add a Greyhound #37

Workflow file for this run

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
concurrency:
group: ${{ github.workflow }}
env:
INPUTS: ${{ toJSON(inputs) }}
jobs:
Add:
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: add
uses: actions/github-script@v7
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 '[email protected]'
git config --global user.name 'Roobot'
git add _greyhounds/
git commit -m '${{ steps.add.outputs.message }}'
git push origin ${{ github.ref_name }}