Skip to content

Commit 056c4aa

Browse files
authored
ci: auto build docker images (#960)
1 parent 415e46e commit 056c4aa

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/publish-dragonos-docker-image.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
push:
66
paths:
77
- tools/BUILD_CONTAINER_VERSION
8+
branches:
9+
- master
810

911
jobs:
1012
docker:
@@ -30,8 +32,8 @@ jobs:
3032
- name: Build and push docker image
3133
uses: docker/build-push-action@v4
3234
with:
33-
context: .
34-
file: ./tools/Dockerfile
35+
context: "{{defaultContext}}:tools"
36+
file: Dockerfile
3537
platforms: linux/amd64
3638
push: true
3739
tags: dragonos/dragonos-dev:${{ steps.fetch-versions.outputs.build_container_version }}

tools/Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ FROM ubuntu:jammy
22

33
# 设置环境变量
44
ENV TZ=Asia/Shanghai
5+
ENV RUSTUP_DIST_SERVER=https://static.rust-lang.org
6+
ENV RUSTUP_UPDATE_ROOT=https://static.rust-lang.org/rustup
57
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
68

79
# 设置工作目录

0 commit comments

Comments
 (0)