Compare commits

..
3 Commits
Author SHA1 Message Date
Marcus Young 064d289f23 Move armhf into this repo 2019-11-26 17:06:38 -06:00
Marcus Young 6118000b7d Bump to 2.161.0 2019-11-25 21:26:22 -06:00
Marcus Young 64055a7ff7 Upstream PR is merged, use that 2019-11-25 06:47:35 -06:00
5 changed files with 94 additions and 33 deletions
+12 -15
View File
@@ -6,21 +6,7 @@ on:
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Copy Repo Files
uses: actions/checkout@master
- name: Publish Docker Image to GPR
uses: myoung34/gpr-docker-publish@master
id: docker
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
IMAGE_NAME: 'runner'
DOCKERFILE_PATH: 'Dockerfile'
BUILD_CONTEXT: '.'
build_hub:
deploy_x86:
runs-on: ubuntu-latest
steps:
- name: Copy Repo Files
@@ -31,3 +17,14 @@ jobs:
name: myoung34/github-runner
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
deploy_arm:
runs-on: self-hosted
steps:
- name: Copy Repo Files
uses: actions/checkout@master
- name: Build
run: docker build -f Dockerfile.arm -t myoung34/github-runner:latest-arm .
- name: Login
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_TOKEN }}
- name: Push to hub registry
run: docker push myoung34/github-runner:latest-arm
+14 -17
View File
@@ -5,23 +5,7 @@ on:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Copy Repo Files
uses: actions/checkout@master
- name: get version
run: echo "::set-env name=IMAGE_TAG::$(cat Dockerfile | grep ARG\ GH_RUNNER_VERSION | sed 's/.*="\(.*\)"/\1/g')"
- name: Publish Docker Image to GPR
uses: myoung34/gpr-docker-publish@master
id: docker
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
IMAGE_NAME: 'runner'
DOCKERFILE_PATH: 'Dockerfile'
BUILD_CONTEXT: '.'
build_hub:
release_x86:
runs-on: ubuntu-latest
steps:
- name: Copy Repo Files
@@ -33,3 +17,16 @@ jobs:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
tag_names: true
release_arm:
runs-on: self-hosted
steps:
- name: Copy Repo Files
uses: actions/checkout@master
- name: get version
run: echo "::set-env name=TAG::$(echo ${GITHUB_REF} | sed -e "s/refs\/tags\///g")"
- name: Build
run: docker build -f Dockerfile.arm -t myoung34/github-runner:${TAG}-arm .
- name: Login
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_TOKEN }}
- name: Push to hub registry
run: docker push myoung34/github-runner:${TAG}-arm
+1 -1
View File
@@ -1,7 +1,7 @@
FROM ubuntu:xenial-20191024
LABEL maintainer="3vilpenguin@gmail.com"
ARG GH_RUNNER_VERSION="2.160.2"
ARG GH_RUNNER_VERSION="2.161.0"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN apt-get update && \
+51
View File
@@ -0,0 +1,51 @@
FROM ubuntu:xenial-20191024
LABEL maintainer="3vilpenguin@gmail.com"
ARG GH_RUNNER_VERSION="2.161.0"
ARG GIT_VERSION="2.9.2"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3003
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
tar \
apt-transport-https \
ca-certificates \
sudo \
gnupg-agent \
software-properties-common \
build-essential \
zlib1g-dev \
gettext \
liblttng-ust-ctl2 \
liblttng-ust0 \
liburcu4 \
libcurl4-openssl-dev \
&& rm -rf /var/lib/apt/lists/* \
&& cd /tmp \
&& curl -sL https://www.kernel.org/pub/software/scm/git/git-${GIT_VERSION}.tar.gz -o git.tgz \
&& tar zxf git.tgz \
&& cd git-${GIT_VERSION} \
&& ./configure --prefix=/usr \
&& make \
&& make install \
&& cd / \
&& rm -rf /tmp/git.tgz /tmp/git-${GIT_VERSION}
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
&& add-apt-repository "deb [arch=armhf] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \
&& apt-get update \
&& apt-get install -y docker.io --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /actions-runner
RUN curl -O https://githubassets.azureedge.net/runners/${GH_RUNNER_VERSION}/actions-runner-linux-arm-${GH_RUNNER_VERSION}.tar.gz \
&& tar -zxf actions-runner-linux-arm-${GH_RUNNER_VERSION}.tar.gz \
&& rm -f actions-runner-linux-arm-${GH_RUNNER_VERSION}.tar.gz \
&& mkdir /_work
WORKDIR /_work
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
+16
View File
@@ -3,10 +3,17 @@ Docker Github Actions Runner
This will run the [new self-hosted github actions runners](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/hosting-your-own-runners) with docker-in-docker
This has been tested and verified on:
* x86_64
* armhf
## Examples ##
Manual:
### X86_64 ###
```
docker run -it \
-e REPO_URL="https://github.com/myoung34/LEDSpicer" \
@@ -14,6 +21,15 @@ docker run -it \
myoung34/github-runner:latest
```
### ARMHF (raspberry pi) ###
```
docker run -it \
-e REPO_URL="https://github.com/myoung34/LEDSpicer" \
-e RUNNER_TOKEN="footoken" \
myoung34/github-runner:latest-arm
```
Nomad:
```