Skip to content

Commit 00c21be

Browse files
authored
Update seed.yml
1 parent eb6fce4 commit 00c21be

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

.github/workflows/seed.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ jobs:
4545
BRANCH_NAME="fresh-seed-$(date +%Y%m%d-%H%M%S)"
4646
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
4747
48+
- name: Extract GitHub org and repo
49+
run: |
50+
GITHUB_ORG=$(echo "${{ github.repository }}" | cut -d'/' -f1)
51+
GITHUB_REPO=$(echo "${{ github.repository }}" | cut -d'/' -f2)
52+
echo "GITHUB_ORG=$GITHUB_ORG" >> $GITHUB_ENV
53+
echo "GITHUB_REPO=$GITHUB_REPO" >> $GITHUB_ENV
54+
echo "GitHub Organization: $GITHUB_ORG"
55+
echo "GitHub Repository: $GITHUB_REPO"
56+
4857
- name: Verify seed config file exists
4958
run: |
5059
if [ ! -f "${{ github.event.inputs.config_file || 'seed-template.yaml' }}" ]; then
@@ -66,6 +75,12 @@ jobs:
6675
# Replace uribase_suffix value
6776
sed -i "s/^uribase_suffix:.*/uribase_suffix: ${{ github.event.inputs.uribase_suffix }}/" "$CONFIG_FILE"
6877
78+
# Replace github_org value
79+
sed -i "s/^github_org:.*/github_org: $GITHUB_ORG/" "$CONFIG_FILE"
80+
81+
# Replace repo value
82+
sed -i "s/^repo:.*/repo: $GITHUB_REPO/" "$CONFIG_FILE"
83+
6984
echo "Updated seed-template.yaml content:"
7085
cat "$CONFIG_FILE"
7186
@@ -118,7 +133,9 @@ jobs:
118133
119134
- **Ontology ID**: `${{ github.event.inputs.ontology_id }}`
120135
- **URI Base Suffix**: `${{ github.event.inputs.uribase_suffix }}`
136+
- **GitHub Organization**: `${{ env.GITHUB_ORG }}`
137+
- **Repository**: `${{ env.GITHUB_REPO }}`
121138
- **Config File**: `${{ github.event.inputs.config_file || 'seed-template.yaml' }}`
122139
- **ODK Tag**: `${{ github.event.inputs.odk_tag || 'latest' }}`
123140
124-
This PR contains the generated ontology files from ODK seed.
141+
This PR contains the generated ontology files from ODK seed.

0 commit comments

Comments
 (0)