-
Notifications
You must be signed in to change notification settings - Fork 8
63 lines (56 loc) · 2.02 KB
/
add-id.yaml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Process registration
on:
repository_dispatch:
types: [register-command]
concurrency: 'main'
jobs:
add_id:
runs-on: ubuntu-latest
permissions:
pull-requests: write
issues: write
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16'
- name: Setup Python
uses: actions/[email protected]
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r scripts/requirements.txt
cd scripts; pip install -e . --no-deps
- name: check labels
id: label
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
table=`python scripts/labels.py /repos/WCRP-CORDEX/cordex-cmip6-cv/issues/${{ github.event.client_payload.github.payload.issue.number }}`
echo $table
echo "table=$table" >> $GITHUB_OUTPUT
- uses: stefanbuck/github-issue-parser@v3
id: issue-parser
with:
template-path: .github/ISSUE_TEMPLATE/${{ steps.label.outputs.table }}.yaml
issue-body: ${{ github.event.client_payload.github.payload.issue.body }}
- name: update table
id: update
run: |
id_added=`python scripts/update-${{ steps.label.outputs.table }}.py '${{ steps.issue-parser.outputs.jsonString }}'`
python scripts/create-html-datatables.py
echo $id_added
echo "id_added=$id_added" >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
title: add ${{ steps.update.outputs.id_added }}
commit-message: add-${{ steps.update.outputs.id_added }}
branch: add-${{ steps.update.outputs.id_added }}
body: |
Closes #${{ github.event.client_payload.github.payload.issue.number }}
Request to add ${{ steps.update.outputs.id_added }}
delete-branch: true