Skip to content

Commit

Permalink
update workflow yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
larsbuntemeyer committed Apr 11, 2024
1 parent 52a7f1f commit 9584518
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 2 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/add-id.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
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: Show info
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo ${{ github.event.label.name }}
#echo ${{ github.event.client_payload.github.payload.issue.label }}
gh api --jq '.labels.[].name' /repos/{owner}/{repo}/issues/${{ github.event.number }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
cd scripts; pip install -e . --no-deps
- name: check labels
id: label
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
table=`python labels.py /repos/{owner}/{repo}/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 }}'`
echo "id_added=$id_added" >> $GITHUB_OUTPUT
# - name: Create Pull Request
# uses: peter-evans/create-pull-request@v5
# with:
# title: add ${{ steps.issue-parser.outputs.issueparser_source_id }}
# commit-message: add-${{ steps.issue-parser.outputs.issueparser_source_id }}
# branch: add-${{ steps.issue-parser.outputs.issueparser_source_id }}
# body: |
# Closes #${{ github.event.issue.number }}
# Request to add ${{ steps.issue-parser.outputs.issueparser_source_id }}
# delete-branch: true
2 changes: 1 addition & 1 deletion .github/workflows/add-institution-id.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Process institution id
on:
repository_dispatch:
types: [register-command]
types: [register2-command]
concurrency: 'main'
jobs:
add_institution_id:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/add-source-id.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Process source id
on:
repository_dispatch:
types: [register-command]
types: [register2-command]
concurrency: 'main'
jobs:
add_source_id:
Expand Down

0 comments on commit 9584518

Please sign in to comment.