forked from e-mission/nrel-openpath-deploy-configs
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.37 KB
/
issue-to-json.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Convert Issues to JSON Data
on:
issues:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issues
types:
- opened
- edited
- reopened
- labeled
jobs:
convert_to_config:
runs-on: ubuntu-latest
steps:
# This step checks out a copy of your repository.
- name: Check out repository
uses: actions/checkout@v4
- name: install dependencies
shell: bash -l {0}
run: |
npm install js-yaml
npm i @actions/core
npm i @actions/github
# This step references the directory that contains the action.
- name: Use local convertIssue action
uses: ./.github/actions/convertIssue
with:
# This controls where the JSON files are generated
folder: "configs/"
# This tells the action which GitHub Issue Form template file to use
issue-template: "add-new-config.yml"
# This controls which property we use to key the file name hash off of (values should be unique in your data set)
hash-property-name: "url_abbreviation"
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add *
git commit -m "Adding data for #${{ env.IssueNumber }}"
git push