Skip to content

Commit 3788a15

Browse files
committed
Merge branch 'master' into test_ci
2 parents b94efc6 + 0910659 commit 3788a15

File tree

2 files changed

+14
-17
lines changed

2 files changed

+14
-17
lines changed

.github/scripts/upload_py_tools.sh

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/build_py_tools.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,9 @@ jobs:
7878
- name: Checkout user repository
7979
uses: actions/checkout@v4
8080
with:
81-
fetch-depth: 2
8281
persist-credentials: false
8382
token: ${{ steps.create_token.outputs.token }}
84-
ref: "refs/pull/${{ github.event.number }}/merge"
83+
ref: ${{ github.event.pull_request.head.sha }}
8584

8685
# To avoid giving unknown scripts elevated permissions, download them from the master branch
8786
- name: Get CI scripts from master (Linux and macOS)
@@ -147,7 +146,19 @@ jobs:
147146
for tool in ${{ env.CHANGED_TOOLS }}; do
148147
cp -f ./${{ env.DISTPATH }}/$tool.exe tools/$tool.exe
149148
done
150-
bash .github/scripts/upload_py_tools.sh "${{ env.CHANGED_TOOLS }}"
149+
150+
CHANGED_FILES="${{ env.CHANGED_TOOLS }}"
151+
152+
echo "Pushing '$CHANGED_FILES' as github-actions[bot]"
153+
git config --global github.user "github-actions[bot]"
154+
git config --global user.name "github-actions[bot]"
155+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
156+
for tool in $CHANGED_FILES; do
157+
git add tools/$tool.exe
158+
done
159+
git commit -m "change(tools): Push generated binaries to PR"
160+
git push origin HEAD:refs/pull/${{ github.event.number }}/merge
161+
151162
- name: Archive artifact
152163
uses: actions/upload-artifact@master
153164
with:

0 commit comments

Comments
 (0)