File tree Expand file tree Collapse file tree 3 files changed +41
-9
lines changed Expand file tree Collapse file tree 3 files changed +41
-9
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ name : Build and Publish
3
+
4
+ on :
5
+ release :
6
+ types :
7
+ - published
8
+
9
+ jobs :
10
+ release :
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Checkout
14
+ uses : actions/checkout@v4
15
+ - name : Set up QEMU
16
+ uses : docker/setup-qemu-action@v3
17
+ - name : Set up Docker Buildx
18
+ uses : docker/setup-buildx-action@v3
19
+ - name : Login to Docker Hub
20
+ uses : docker/login-action@v3
21
+ with :
22
+ username : ${{ secrets.DOCKER_USERNAME }}
23
+ password : ${{ secrets.DOCKER_PASSWORD }}
24
+ - name : Build and push Docker image
25
+ uses : docker/build-push-action@v6
26
+ with :
27
+ context : .
28
+ push : true
29
+ platforms : linux/amd64,linux/arm64
30
+ tags : ${{ secrets.DOCKER_USERNAME }}/github-runner-linux:${{ github.event.release.tag_name }},${{ secrets.DOCKER_USERNAME }}/github-runner-linux:latest
Original file line number Diff line number Diff line change 1
- name : Local runner test
1
+ name : Test Runner
2
2
3
3
on :
4
4
push :
Original file line number Diff line number Diff line change 2
2
3
3
Build a self-hosted GitHub action runner as an Ubuntu linux container
4
4
5
- ### Build
6
-
7
- ``` shell
8
- docker build -t runner .
9
- ```
10
-
11
- ### Run
5
+ ## Development
12
6
13
7
Set latest ` RUNNER_VERSION `
14
8
@@ -19,11 +13,19 @@ export RUNNER_VERSION=$(curl -sL \
19
13
https://api.github.com/repos/actions/runner/releases/latest | jq .tag_name --raw-output)
20
14
```
21
15
16
+ #### Build
17
+
18
+ ``` shell
19
+ docker build --build-arg RUNNER_VERSION=$RUNNER_VERSION -t runner .
20
+ ```
21
+
22
+ #### Run
23
+
22
24
``` shell
23
25
docker compose up -d
24
26
```
25
27
26
- ### Exec
28
+ #### Exec
27
29
28
30
``` shell
29
31
docker exec -it container-name sh
You can’t perform that action at this time.
0 commit comments