-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (36 loc) · 1.35 KB
/
communityasset.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
name: Convert issue to json
on:
issues:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issues
types:
- labeled
jobs:
update_library:
runs-on: ubuntu-latest
name: Convert data
# require an `approved` label for moderation
if: contains( github.event.issue.labels.*.name, 'communityasset')
steps:
- name: Checkout
uses: actions/checkout@v3
- name: GitHub Issue to JSON
uses: zachleat/[email protected]
with:
# This controls where the JSON files are generated
folder: "src/_data/communityassets/"
# This tells the action which GitHub Issue Form template file to use
issue-template: "communityasset.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: "design"
- 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
- name: Close issue
uses: peter-evans/close-issue@v1
with:
issue-number: "${{ env.IssueNumber }}"
comment: "Thank you! Your data file has been added!"