Skip to content
This repository was archived by the owner on Sep 4, 2025. It is now read-only.

Commit f806c59

Browse files
authored
Merge pull request #515 from ncihtan/fix-jsonld-action
fix: update workflow to handle both PR and non-PR contexts for JSONLD conversion
2 parents edece14 + 8887b39 commit f806c59

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/ci-lint-validate-convert.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,27 @@ jobs:
101101
with:
102102
repo-token: ${{ secrets.GITHUB_TOKEN }}
103103

104+
- name: Configure Git
105+
run: |
106+
git config --global user.name "github-actions[bot]"
107+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
108+
104109
- name: Commit the changes
105110
run: |
106111
git add HTAN.model.jsonld
107112
git commit -m "GitHub Action: convert *.model.csv to *.model.jsonld" || echo "No changes to commit"
108113
109-
- name: Push changes
114+
- name: Push changes in PR context
110115
if: steps.check_pr.outputs.is_pr == 'true'
111116
uses: r-lib/actions/pr-push@v2
112117
with:
113118
repo-token: ${{ secrets.GITHUB_TOKEN }}
114119

120+
- name: Push changes in non-PR context
121+
if: steps.check_pr.outputs.is_pr == 'false'
122+
run: |
123+
git push origin HEAD:${{ github.ref_name }}
124+
115125
build-dependencies:
116126
name: Build Dependencies Table
117127
needs: convert

0 commit comments

Comments
 (0)