Skip to content

Commit 5fb3b5b

Browse files
committed
Debugging render+commit
1 parent 7512cbf commit 5fb3b5b

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

.github/workflows/pull_request_ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,4 @@ jobs:
5858
with:
5959
commit_to_branch: false
6060
branch_name: "invalid_branch_name"
61+
remote_url: "invalid_remote_url"

.github/workflows/pull_request_precommit.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ jobs:
1919
commit_to_branch: true
2020
# github.head_ref is the branch from which a pull request is made
2121
branch_name: ${{ github.head_ref }}
22+
# github.event.pull_request.head.repo.clone_url is the URL from where the pull request is made
23+
remote_url: ${{ github.event.pull_request.head.repo.clone_url }}

.github/workflows/render.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ on:
99
branch_name:
1010
required: true
1111
type: string
12-
12+
remote_url:
13+
required: true
14+
type: string
15+
1316
jobs:
1417

1518
render_to_markdown_and_yaml:
@@ -48,15 +51,18 @@ jobs:
4851
if: ${{ inputs.commit_to_branch }}
4952
run: |
5053
set -u
51-
echo "Submitting rendered standard name dictionaries to branch ${BRANCH_NAME}"
54+
echo "Submitting rendered standard name dictionaries to branch ${BRANCH_NAME} in ${REMOTE_URL}"
5255
set +u
5356
git config --global user.name "github-actions[bot]"
5457
git config --global user.email "github-actions[bot]@users.noreply.github.com"
58+
git remote set-url origin ${REMOTE_URL}
5559
git checkout -b ${BRANCH_NAME}
60+
git add .
5661
git commit -m "Update Metadata-standard-names.{md,yaml} from standard_names.xml" || echo "No changes to commit"
5762
git remote -v show
5863
git status
59-
git push
64+
git push origin ${BRANCH_NAME}
6065
env:
6166
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6267
BRANCH_NAME: ${{ inputs.branch_name }}
68+
REMOTE_URL: ${{ inputs.remote_url }}

0 commit comments

Comments
 (0)