Skip to content

Fix build-and-deploy on self-hosted ARM64 agents #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ env:
REF: "${{ github.event.inputs.ref }}"
ARCHITECTURE: "${{ github.event.inputs.architecture }}"
GPG_OPTIONS: "--batch --yes --no-tty --list-options no-show-photos --verify-options no-show-photos --pinentry-mode loopback"
HOME: "${{ github.workspace }}\\home"
ACTOR: "${{ github.event.inputs.actor || github.triggering_actor }}"
CREATE_CHECK_RUN: true

Expand Down Expand Up @@ -117,6 +116,8 @@ jobs:
run: |
USER_NAME="${{ steps.actor.outputs.name }}" &&
USER_EMAIL="${{ steps.actor.outputs.email }}" &&
HOME="${{ runner.temp }}\\home" &&
echo "HOME=$HOME" >>$GITHUB_ENV &&
mkdir -p "$HOME" &&
git config --global user.name "$USER_NAME" &&
git config --global user.email "$USER_EMAIL" &&
Expand Down Expand Up @@ -204,7 +205,7 @@ jobs:
shell: bash
run: |
echo '${{secrets.PRIVGPGKEY}}' | tr % '\n' | gpg $GPG_OPTIONS --import &&
mkdir -p home &&
mkdir -p "$HOME" &&
git config --global gpg.program "/usr/src/build-extra/gnupg-with-gpgkey.sh" &&
info="$(gpg --list-keys --with-colons "${GPGKEY%% *}" | cut -d : -f 1,10 | sed -n '/^uid/{s|uid:||p;q}')" &&
git config --global user.name "${info% <*}" &&
Expand All @@ -220,9 +221,9 @@ jobs:
CODESIGN_PASS: ${{secrets.CODESIGN_PASS}}
shell: bash
run: |
mkdir -p home/.sig &&
echo "$CODESIGN_P12" | tr % '\n' | base64 -d >home/.sig/codesign.p12 &&
echo "$CODESIGN_PASS" >home/.sig/codesign.pass
mkdir -p "$HOME"/.sig &&
echo "$CODESIGN_P12" | tr % '\n' | base64 -d >"$HOME"/.sig/codesign.p12 &&
echo "$CODESIGN_PASS" >"$HOME"/.sig/codesign.pass
git config --global alias.signtool '!sh "/usr/src/build-extra/signtool.sh"'
echo "SIGNTOOL=git signtool" >>$GITHUB_ENV

Expand Down Expand Up @@ -302,7 +303,7 @@ jobs:
- name: Clean up temporary files
if: always()
shell: bash
run: rm -rf home
run: rm -rf "$HOME"

- name: mark check run as completed
if: env.CREATE_CHECK_RUN != 'false' && always()
Expand Down