From dddd761bb0671ef09768855beefab24abe3c341a Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 23 Feb 2021 13:32:31 +0100 Subject: [PATCH] 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 --- .github/workflows/git-artifacts.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/git-artifacts.yml b/.github/workflows/git-artifacts.yml index f3ac44c0e2..1f1b32bc33 100644 --- a/.github/workflows/git-artifacts.yml +++ b/.github/workflows/git-artifacts.yml @@ -303,8 +303,20 @@ jobs: mkdir -p "$HOME" && git config --global user.name "$USER_NAME" && git config --global user.email "$USER_EMAIL" - - uses: actions/checkout@v2 + - name: Download bundle-artifacts if: env.SKIP != 'true' + uses: actions/download-artifact@v1 + with: + name: bundle-artifacts + path: bundle-artifacts + - name: Check out git/git + if: env.SKIP != 'true' + shell: bash + run: | + git -c init.defaultBranch=main init && + git remote add -f origin https://github.com/git-for-windows/git && + git fetch --tags bundle-artifacts/git.bundle $(cat bundle-artifacts/next_version) && + git reset --hard $(cat bundle-artifacts/next_version) - name: initialize vcpkg if: env.SKIP != 'true' uses: actions/checkout@v2