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 2 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
32 changes: 29 additions & 3 deletions contrib/gh-runner/gh-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,35 @@ 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"

skrdgraph marked this conversation as resolved.
Show resolved Hide resolved
# 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.296.2.tar.gz -L https://github.com/actions/runner/releases/download/v2.296.2/actions-runner-linux-x64-2.296.2.tar.gz

# Optional: Validate the hash
echo "34a8f34956cdacd2156d4c658cce8dd54c5aef316a16bbbc95eb3ca4fd76429a actions-runner-linux-x64-2.296.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
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