Skip to content

Add YOUR NAME

Add YOUR NAME #56

Workflow file for this run

name: Write Form Information
on:
issues:
types:
- opened
jobs:
write-form-info:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '14'
- name: Install dependencies
run: npm install
- name: Run script to write form information
run: |
issueNumber=${{ github.event.issue.number }}
issueBody="${{ github.event.issue.body }}"
firstCharacters=$(echo "${issueBody}" | awk '{print substr($0, 1, 2)}')
if [[ "${firstCharacters}" == *"ID"* ]]; then
targetFile="_data/people.yml"
else
targetFile="_data/groups.yml"
fi
echo "${issueBody}"
echo -e "\n" >> "$targetFile"
echo "- ${issueBody}" | sed '2,$s/^/ /' >> "$targetFile"
- name: Commit and push changes
run: |
git config --global user.email "[email protected]"
git config --global user.name "DelmiroDaladier"
git add "."
git commit -m "Auto-commit changes"
git push origin gh-pages