DO NOT EDIT - takes the developer survey #68
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: Process survey's entry | |
on: | |
issues: | |
types: [ opened ] | |
concurrency: 'main' | |
jobs: | |
take_survey: | |
runs-on: ubuntu-latest | |
if: contains(github.event.issue.title, 'DO NOT EDIT') && contains(github.event.issue.title, 'takes the developer survey') | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.GA_WORKFLOW_DEPLOYMENTS_TOKEN }} | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- uses: elhmn/github-issue-parser@release-parse-checkbox | |
id: issue-parser | |
with: | |
template-path: .github/ISSUE_TEMPLATE/take-the-survey.yaml | |
- run: echo '${{ steps.issue-parser.outputs.jsonString }}' > survey_submission.json | |
- run: | | |
cat survey_submission.json | jq | |
- name: Set convert json to yaml | |
shell: bash | |
run: | | |
cat survey_submission.json | yq e '{"items": [.]}' -P - > survey_submission.yaml | |
- run: cat survey_submission.yaml | |
- run: cat ./src/res/survey.yaml | |
- name: Set convert json to yaml | |
shell: bash | |
run: | | |
yq ea '. as $item ireduce ({}; . *+ $item)' -i ./src/res/survey.yaml survey_submission.yaml | |
- run: cat ./src/res/survey.yaml | |
- name: Commit changes | |
shell: bash | |
run: | | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" && \ | |
git config --global user.name "github-actions[bot]" && \ | |
git add ./src/res/survey.yaml && \ | |
git commit -m 'new survey answer' && \ | |
git push | |
- uses: peter-evans/close-issue@v1 | |
with: | |
comment: Your survey answer was submitted and will be deployed in few minutes here https://devsurvey.osscameroon.com. |