File tree Expand file tree Collapse file tree 4 files changed +85
-0
lines changed Expand file tree Collapse file tree 4 files changed +85
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish Docker
2
+ on :
3
+ push :
4
+ branches :
5
+ - master
6
+
7
+ jobs :
8
+ build :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Copy Repo Files
12
+ uses : actions/checkout@master
13
+
14
+ # This Action Emits 2 Variables, IMAGE_SHA_NAME and IMAGE_URL
15
+ # which you can reference in subsequent steps
16
+ - name : Publish Docker Image to GPR
17
+ uses : myoung34/gpr-docker-publish@master
18
+ id : docker
19
+ env :
20
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
21
+ with :
22
+ IMAGE_NAME : ' runner'
23
+ DOCKERFILE_PATH : ' Dockerfile'
24
+ BUILD_CONTEXT : ' .'
Original file line number Diff line number Diff line change
1
+ FROM ubuntu:latest
2
+ RUN apt-get update && \
3
+ apt-get install -y curl tar docker && \
4
+ rm -rf /var/lib/apt/lists/*
5
+ RUN mkdir actions-runner && cd actions-runner
6
+ RUN curl -O https://githubassets.azureedge.net/runners/2.160.2/actions-runner-linux-x64-2.160.2.tar.gz
7
+ RUN tar xzf ./actions-runner-linux-x64-2.160.2.tar.gz
8
+ COPY entrypoint.sh /
9
+ RUN chmod +x /entrypoint.sh
10
+ ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change
1
+ Docker Github Actions Runner
2
+ ============================
3
+
4
+ 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
5
+
6
+ ## Examples ##
7
+
8
+ Manual:
9
+
10
+ ```
11
+ docker login docker.pkg.github.com -u myoung34 -p foo
12
+ docker run -it \
13
+ -e REPO_URL="https://github.com/myoung34/LEDSpicer" \
14
+ -e RUNNER_TOKEN="footoken" \
15
+ docker.pkg.github.com/myoung34/docker-github-actions-runner/runner:latest
16
+ ```
17
+
18
+ Nomad:
19
+
20
+ ```
21
+ job "github_runner" {
22
+ datacenters = ["home"]
23
+ type = "system"
24
+
25
+ task "runner" {
26
+ driver = "docker"
27
+
28
+ env {
29
+ REPO_URL = "https://github.com/myoung34/LEDSpicer"
30
+ RUNNER_TOKEN = "footoken"
31
+ }
32
+
33
+ config {
34
+ privileged = true
35
+ image = "docker.pkg.github.com/myoung34/docker-github-actions-runner/runner:latest"
36
+ auth {
37
+ username = "myoung34"
38
+ password = "foo"
39
+ server_address = "docker.pkg.github.com"
40
+ }
41
+ volumes = [
42
+ "/var/run/docker.sock:/var/run/docker.sock"
43
+ ]
44
+ }
45
+ }
46
+ }
47
+ ```
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ export AGENT_ALLOW_RUNASROOT=1
3
+ echo ${RUNNER_NAME:- default} $' \n\n ' | ./config.sh --url ${REPO_URL} --token ${RUNNER_TOKEN}
4
+ exec ./run.sh
You can’t perform that action at this time.
0 commit comments