This repository has been archived by the owner on Feb 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
81 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
diff --git a/Dockerfile b/Dockerfile | ||
index 4d87988..9b403a0 100644 | ||
--- a/Dockerfile | ||
+++ b/Dockerfile | ||
@@ -6,7 +6,7 @@ ENV AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache | ||
RUN mkdir -p /opt/hostedtoolcache | ||
|
||
ARG GH_RUNNER_VERSION="2.294.0" | ||
-ARG TARGETPLATFORM | ||
+ARG TARGETPLATFORM="linux/arm64" | ||
|
||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
||
@@ -17,6 +17,12 @@ RUN chmod +x /actions-runner/install_actions.sh \ | ||
&& /actions-runner/install_actions.sh ${GH_RUNNER_VERSION} ${TARGETPLATFORM} \ | ||
&& rm /actions-runner/install_actions.sh | ||
|
||
+# install arduino ide build dependencies | ||
+RUN apt-get install -y libxkbfile-dev libsecret-1-dev | ||
+ | ||
+# install nvm | ||
+RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash | ||
+ | ||
COPY token.sh entrypoint.sh / | ||
RUN chmod +x /token.sh /entrypoint.sh | ||
|
||
diff --git a/entrypoint.sh b/entrypoint.sh | ||
index 3b29d58..5df4be8 100644 | ||
--- a/entrypoint.sh | ||
+++ b/entrypoint.sh | ||
@@ -124,5 +124,9 @@ if [[ ${_DISABLE_AUTOMATIC_DEREGISTRATION} == "false" ]]; then | ||
trap deregister_runner SIGINT SIGQUIT SIGTERM INT TERM QUIT | ||
fi | ||
|
||
+. $HOME/.nvm/nvm.sh | ||
+nvm install 14.0.0 | ||
+npm install --global yarn | ||
+ | ||
# Container's command (CMD) execution | ||
"$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
# before use, modify: | ||
# DOCKER_DIR is the directory of 'git clone https://github.com/myoung34/docker-github-actions-runner' | ||
# ACCESS_TOKEN is your github access token | ||
# REPO_URL is the url of your fork of the arduino ide | ||
|
||
DOCKER_DIR=/home/koen/src/docker-github-actions-runner | ||
|
||
docker build ${DOCKER_DIR} --tag ubuntu-bionic | ||
docker run --env 'ACCESS_TOKEN=ghp_your_github_token' --env RUNNER_SCOPE=repo --env 'REPO_URL=https://github.com/your_github/arduino-ide' --env RUNNER_NAME=arduino-ide-runner ubuntu-bionic |