Skip to content

Commit ac3c30b

Browse files
committed
Go build
1 parent 0847c0e commit ac3c30b

File tree

3 files changed

+66
-3
lines changed

3 files changed

+66
-3
lines changed

.github/workflows/github.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Publish Docker image to GitHub
2+
on:
3+
push:
4+
5+
jobs:
6+
push_docker:
7+
name: Push Ubuntu Docker image to GitHub
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Check out the repo
11+
uses: actions/checkout@v2
12+
- name: Login to GitHub Container Registry
13+
uses: docker/login-action@v1
14+
with:
15+
registry: ghcr.io
16+
username: ${{ github.repository_owner }}
17+
password: ${{ secrets.GITHUB_TOKEN }}
18+
- name: Push to GitHub
19+
uses: docker/build-push-action@v2
20+
with:
21+
file: ./Dockerfile.docker
22+
tags: ghcr.io/msyea/ubuntu-docker
23+
push: true
24+
push_dind:
25+
needs: push_docker
26+
name: Push Ubuntu DinD image to GitHub
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Check out the repo
30+
uses: actions/checkout@v2
31+
- name: Login to GitHub Container Registry
32+
uses: docker/login-action@v1
33+
with:
34+
registry: ghcr.io
35+
username: ${{ github.repository_owner }}
36+
password: ${{ secrets.GITHUB_TOKEN }}
37+
- name: Push to GitHub
38+
uses: docker/build-push-action@v2
39+
with:
40+
file: ./Dockerfile.dind
41+
tags: ghcr.io/msyea/ubuntu-dind
42+
push: true
43+
build-args: REGISTRY=ghcr.io/
44+
push_gha:
45+
needs: [push_docker, push_dind]
46+
name: Push GitHub Actions runner image to GitHub
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Check out the repo
50+
uses: actions/checkout@v2
51+
- name: Login to GitHub Container Registry
52+
uses: docker/login-action@v1
53+
with:
54+
registry: ghcr.io
55+
username: ${{ github.repository_owner }}
56+
password: ${{ secrets.GITHUB_TOKEN }}
57+
- name: Push to GitHub
58+
uses: docker/build-push-action@v2
59+
with:
60+
tags: ghcr.io/msyea/github-actions-runner
61+
push: true
62+
build-args: REGISTRY=ghcr.io/

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
FROM msyea/ubuntu-dind
1+
ARG REGISTRY
2+
FROM ${REGISTRY}msyea/ubuntu-dind
23

34
# "/run/user/UID" will be used by default as the value of XDG_RUNTIME_DIR
45
RUN mkdir /run/user && chmod 1777 /run/user

Dockerfile.dind

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#
44
# PLEASE DO NOT EDIT IT DIRECTLY.
55
#
6-
7-
FROM msyea/ubuntu-docker
6+
ARG REGISTRY
7+
FROM ${REGISTRY}msyea/ubuntu-docker
88

99
# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies
1010
ENV DEBIAN_FRONTEND=noninteractive

0 commit comments

Comments
 (0)