File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 5858 with :
5959 commit_to_branch : false
6060 branch_name : " invalid_branch_name"
61+ remote_url : " invalid_remote_url"
Original file line number Diff line number Diff line change 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 }}
Original file line number Diff line number Diff line change 99 branch_name :
1010 required : true
1111 type : string
12-
12+ remote_url :
13+ required : true
14+ type : string
15+
1316jobs :
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 }}
You can’t perform that action at this time.
0 commit comments