Repository navigation
70 lines (59 loc) · 2.11 KB
/
Copy pathpython.yml
File metadata and controls
70 lines (59 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: python-构建和提交docker
on:
workflow_dispatch:
push:
branches: [main]
paths:
- "python/**"
- ".github/workflows/python.yml"
- "!**.md"
jobs:
# 并发构建
setup-build-publish-v3:
runs-on: ubuntu-latest
name: 构建和推送docker镜像v3
steps:
- name: 更新代码
# 使用action库 actions/checkout获取源码
uses: actions/checkout@v3
-
name: 登录 Docker Hub
uses: docker/login-action@v2
with:
username: adockero
password: ${{ secrets.PASSWORD }}
# ########## 构建 ###########################
- name: 构建镜像 adockero/python:mijiaAPI容器,3版本
uses: docker/build-push-action@v3
with:
# Comma-delimited list of tags. These will be added to the registry/repository to form the image's tags
# tags: adockero/docker:ubuntu-ssh,adockero/docker-ubuntu:ssh
tags: adockero/python:mijiaAPI
# Path to the Dockerfile (Default is '{path}/Dockerfile')
context: ./python
file: "./python/Dockerfile"
# Always attempt to pull a newer version of the image
pull: true
push: true
# 构建参数
build-args: PIP_ARGS=mijiaAPI Pillow
# APK_ARG=rsync
# Adds labels with git repository information to the built image
labels: true
# - name: 构建镜像 adockero/python-service:python-11-alpine
# uses: docker/build-push-action@v3
# with:
# # Comma-delimited list of tags. These will be added to the registry/repository to form the image's tags
# tags: adockero/python-service:python-11-alpine
# # Path to the Dockerfile (Default is '{path}/Dockerfile')
# context: ./python
# file: "./python/Dockerfile.service"
# # Always attempt to pull a newer version of the image
# pull: true
# push: true
# # 构建参数
# build-args: |
# FROM_ARG=python:11-alpine
# # APK_ARG=rsync
# # Adds labels with git repository information to the built image
# labels: true