Skip to content

Commit eddc8d2

Browse files
committed
git-artifacts(build-arm64): build artifacts using the intended Git revision
We cannot just check out the current revision: The user might have overridden `REPOSITORY` and `REF` via the workflow dispatch. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 43b0d92 commit eddc8d2

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/git-artifacts.yml

+13-1
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,20 @@ jobs:
303303
mkdir -p "$HOME" &&
304304
git config --global user.name "$USER_NAME" &&
305305
git config --global user.email "$USER_EMAIL"
306-
- uses: actions/checkout@v2
306+
- name: Download bundle-artifacts
307+
if: env.SKIP != 'true'
308+
uses: actions/download-artifact@v1
309+
with:
310+
name: bundle-artifacts
311+
path: bundle-artifacts
312+
- name: Check out git/git
307313
if: env.SKIP != 'true'
314+
shell: bash
315+
run: |
316+
git -c init.defaultBranch=main init &&
317+
git remote add -f origin https://github.com/git-for-windows/git &&
318+
git fetch --tags bundle-artifacts/git.bundle $(cat bundle-artifacts/next_version) &&
319+
git reset --hard $(cat bundle-artifacts/next_version)
308320
- name: initialize vcpkg
309321
if: env.SKIP != 'true'
310322
uses: actions/checkout@v2

0 commit comments

Comments
 (0)