File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ permissions:
15
15
contents : read
16
16
deployments : none
17
17
issues : none
18
- packages : none
18
+ packages : write
19
19
pull-requests : none
20
20
repository-projects : none
21
21
security-events : none
@@ -166,10 +166,36 @@ jobs:
166
166
167
167
build :
168
168
runs-on : ubuntu-20.04
169
+ if : github.ref != 'refs/heads/main'
169
170
steps :
170
171
- uses : actions/checkout@v3
171
172
- uses : actions/setup-go@v3
172
173
with :
173
174
go-version : " ~1.20"
174
175
- name : build image
175
176
run : make -j build/image/envbox
177
+ publish :
178
+ runs-on : ubuntu-20.04
179
+ if : github.ref == 'refs/heads/main'
180
+ steps :
181
+ - name : Docker Login
182
+ uses : docker/login-action@v2
183
+ with :
184
+ registry : ghcr.io
185
+ username : ${{ github.actor }}
186
+ password : ${{ secrets.GITHUB_TOKEN }}
187
+
188
+ - uses : actions/checkout@v3
189
+
190
+ - uses : actions/setup-go@v3
191
+ with :
192
+ go-version : " ~1.20"
193
+
194
+ - name : build image
195
+ run : make -j build/image/envbox
196
+
197
+ - name : tag image
198
+ run : docker tag envbox ghcr.io/coder/envbox:latest
199
+
200
+ - name : push image
201
+ run : docker push ghcr.io/coder/envbox:latest
Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ FROM ubuntu:focal
4
4
# Copy configuration files to appropriate locations
5
5
COPY files /
6
6
7
+ LABEL \
8
+ org.opencontainers.image.title="Envbox" \
9
+ org.opencontainers.image.url="https://github.com/coder/envbox" \
10
+ org.opencontainers.image.source="https://github.com/coder/envbox" \
11
+ org.opencontainers.image.description="Run Docker in Docker in Kubernetes"
12
+
7
13
# Basic utilities
8
14
ARG DEBIAN_FRONTEND=noninteractive
9
15
# Ignore other repositories, as some require HTTPS
You can’t perform that action at this time.
0 commit comments