This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Issue Forms Body Parser | |
on: issues | |
jobs: | |
process: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Issue Forms Body Parser | |
id: parse | |
uses: zentered/issue-forms-body-parser@v2.0.0 | |
- run: | | |
echo '${{ steps.parse.outputs.data }}' > issue.json | |
cat issue.json | |
- run: node parse-json.js | |
- run: | | |
ls -la | |
cat extracted-data.json | |
- name: Initialize mandatory git config | |
run: | | |
git config user.name "GitHub Actions" | |
git config user.email noreply@github.com | |
- name: Install dependencies | |
run: npm install js-yaml | |
- name: Convert JSON to YAML | |
run: | | |
node json-to-yaml.js | |
cat repo-settings.yml | |
- name: Create New Branch | |
run: | | |
git checkout -b fifth-branch | |
- name: Copy the file to .github/repos | |
run: cp repo-settings.yml .github/repos/ | |
- name: Commit and push the changes to the new branch | |
run: | | |
git add extracted-data.json | |
git add .github/repos/repo-settings.yml | |
git commit -m "Add json and yaml files" | |
git push --set-upstream origin fifth-branch | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |