Skip to content
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

fix(ci): gh-runner.sh refactored to account for ARM architecture #8395

Merged
merged 5 commits into from
Oct 28, 2022
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
24 changes: 21 additions & 3 deletions contrib/gh-runner/gh-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,27 @@ sudo usermod -aG docker ${USER}
newgrp docker &
# Install & Setup GH Actions Runner
mkdir actions-runner && cd actions-runner
curl -o actions-runner-linux-x64-2.296.2.tar.gz -L https://github.com/actions/runner/releases/download/v2.296.2/actions-runner-linux-x64-2.296.2.tar.gz
echo "34a8f34956cdacd2156d4c658cce8dd54c5aef316a16bbbc95eb3ca4fd76429a actions-runner-linux-x64-2.296.2.tar.gz" | shasum -a 256 -c
tar xzf ./actions-runner-linux-x64-2.296.2.tar.gz
if [ "$(uname -m)" = "aarch64" ]; then
echo "Detected arm64 architecture"
# Download the latest runner package
curl -o actions-runner-linux-arm64-2.298.2.tar.gz -L https://github.com/actions/runner/releases/download/v2.298.2/actions-runner-linux-arm64-2.298.2.tar.gz
# Optional: Validate the hash
echo "803e4aba36484ef4f126df184220946bc151ae1bbaf2b606b6e2f2280f5042e8 actions-runner-linux-arm64-2.298.2.tar.gz" | shasum -a 256 -c
# Extract the installer
tar xzf ./actions-runner-linux-arm64-2.298.2.tar.gz
elif [ "$(uname -m)" = "x86_64" ]; then
echo "Detected amd64 architecture"
# Download the latest runner package
curl -o actions-runner-linux-x64-2.298.2.tar.gz -L https://github.com/actions/runner/releases/download/v2.298.2/actions-runner-linux-x64-2.298.2.tar.gz
# Optional: Validate the hash
echo "0bfd792196ce0ec6f1c65d2a9ad00215b2926ef2c416b8d97615265194477117 actions-runner-linux-x64-2.298.2.tar.gz" | shasum -a 256 -c
# Extract the installer
tar xzf ./actions-runner-linux-x64-2.298.2.tar.gz
else
echo "Unrecognized architecture"
skrdgraph marked this conversation as resolved.
Show resolved Hide resolved
exit 1
fi
# Create the runner and start the configuration experience
./config.sh --url https://github.com/dgraph-io/dgraph --token $TOKEN
# CI Permission Issue
sudo touch /etc/cron.d/ci_permissions_resetter
Expand Down