File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 3838 steps :
3939 - uses : actions/checkout@v2
4040 # 构建镜像,指定镜像名
41- - name : Build image
42- run : |
43- # 如果版本不带ffmpeg,打包之前将Dockerfile中的ffmpeg替换为空
44- if [[ "${{ github.ref }}" != "refs/tags/"* ]]; then
45- sed -i 's/ffmpeg//g' Dockerfile
46- fi
47- docker build . --file Dockerfile --tag $IMAGE_NAME
48- # 登录到 dockerhub,使用 GitHub secrets 传入账号密码,密码被加密存储在 GitHub 服务器,添加方法见下图。
4941 - name : Log into registry
5042 run : echo "${{ secrets.ACCESS_TOKEN }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
5143
7163
7264 # 设置镜像 id 和版本号
7365 docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
66+
67+ # 如果VERSION不带ffmpeg,打包之前将Dockerfile中的ffmpeg替换为空
68+ if [[ $VERSION != *"ffmpeg"* ]]; then
69+ sed -i 's/ffmpeg//g' Dockerfile
70+ fi
71+
7472 # 创建一个多平台构建环境
7573 docker buildx create --name multi-platform --use --platform linux/amd64,linux/arm64 --driver docker-container
7674 # 进行 push
You can’t perform that action at this time.
0 commit comments