Skip to content

支持path

支持path #14

Workflow file for this run

name: 构建和提交docker-7.1
on:
push:
branches:
- master
paths:
- "**"
- "./*"
- "!.github/workflows/*.yml"
- ".github/workflows/docker-7.1.yml"
jobs:
setup-build-publish:
runs-on: ubuntu-latest
name: 构建和推送docker镜像
steps:
- name: Checkout
# 使用action库 actions/checkout获取源码
uses: actions/[email protected]
-
name: 登录 Docker Hub
uses: docker/login-action@v2
with:
username: adockero
password: ${{ secrets.PASSWORD }}
# 已全改
-
name: 登录阿里镜像
uses: docker/login-action@v2
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ALI_DOCKER_USERNAME }}
password: ${{ secrets.ALI_DOCKER_PASSWORD }}
# ----------------base基础start---------------------
- name: 7.1-base
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/php-nginx:7.1
registry.cn-hangzhou.aliyuncs.com/adockero/php-nginx:7.1
pull: true
push: true
context: ./
# Path to the Dockerfile (Default is '{path}/Dockerfile')
# path: ./dockerfile
file: Dockerfile.base
# Comma-delimited list of build-time variables
build-args: FROM_ARG=webdevops/php-nginx:7.1
# Adds labels with git repository information to the built image
labels: true
# - name: 7.1-base
# uses: docker/[email protected]
# with:
# # Username used to log in to a Docker registry. If not set then no login will occur
# username: adockero
# # Password or personal access token used to log in to a Docker registry. If not set then no login will occur
# password: ${{ secrets.PASSWORD }}
# # Docker repository to tag the image with
# repository: adockero/php-nginx
# # Comma-delimited list of tags. These will be added to the registry/repository to form the image's tags
# tags: 7.1
# # Path to the Dockerfile (Default is '{path}/Dockerfile')
# # path: ./dockerfile
# dockerfile: Dockerfile.base
# # Always attempt to pull a newer version of the image
# always_pull: true
# # Comma-delimited list of build-time variables
# build_args: FROM_ARG=webdevops/php-nginx:7.1
# # Adds labels with git repository information to the built image
# add_git_labels: true
- name: 7.1-dev
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/php-nginx:7.1-dev
registry.cn-hangzhou.aliyuncs.com/adockero/php-nginx:7.1-dev
pull: true
push: true
context: ./
# Path to the Dockerfile (Default is '{path}/Dockerfile')
# path: ./dockerfile
file: Dockerfile.base
# Comma-delimited list of build-time variables
build-args: FROM_ARG=webdevops/php-nginx-dev:7.1
# Adds labels with git repository information to the built image
labels: true
- name: 7.1-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/php-nginx:7.1-alpine
registry.cn-hangzhou.aliyuncs.com/adockero/php-nginx:7.1-alpine
pull: true
push: true
context: ./
# Path to the Dockerfile (Default is '{path}/Dockerfile')
# path: ./dockerfile
file: Dockerfile.base
# Comma-delimited list of build-time variables
build-args: FROM_ARG=webdevops/php-nginx:7.1-alpine
# Adds labels with git repository information to the built image
labels: true
- name: 7.1-dev-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/php-nginx:7.1-dev-alpine
registry.cn-hangzhou.aliyuncs.com/adockero/php-nginx:7.1-dev-alpine
pull: true
push: true
context: ./
# Path to the Dockerfile (Default is '{path}/Dockerfile')
# path: ./dockerfile
file: Dockerfile.base
# Comma-delimited list of build-time variables
build-args: FROM_ARG=webdevops/php-nginx-dev:7.1-alpine
# Adds labels with git repository information to the built image
labels: true
# ----------------base基础end---------------------
# ----------------lua start---------------------
- name: 7.1-lua-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/php-nginx:7.1-lua-alpine
registry.cn-hangzhou.aliyuncs.com/adockero/php-nginx:7.1-lua-alpine
pull: true
push: true
context: ./
# Path to the Dockerfile (Default is '{path}/Dockerfile')
# path: ./dockerfile
file: Dockerfile.lua
# Comma-delimited list of build-time variables
build-args: TAG=php-nginx:7.1-alpine
# Adds labels with git repository information to the built image
labels: true
- name: 7.1-lua
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/php-nginx:7.1-lua
registry.cn-hangzhou.aliyuncs.com/adockero/php-nginx:7.1-lua
pull: true
push: true
context: ./
# Path to the Dockerfile (Default is '{path}/Dockerfile')
# path: ./dockerfile
file: Dockerfile.lua
# Comma-delimited list of build-time variables
build-args: TAG=php-nginx:7.1
# Adds labels with git repository information to the built image
labels: true
- name: 7.1-dev-lua-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/php-nginx:7.1-dev-lua-alpine
registry.cn-hangzhou.aliyuncs.com/adockero/php-nginx:7.1-dev-lua-alpine
pull: true
push: true
context: ./
# Path to the Dockerfile (Default is '{path}/Dockerfile')
# path: ./dockerfile
file: Dockerfile.lua
# Comma-delimited list of build-time variables
build-args: TAG=php-nginx:7.1-dev-alpine
# Adds labels with git repository information to the built image
labels: true
- name: 7.1-dev-lua
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/php-nginx:7.1-dev-lua
registry.cn-hangzhou.aliyuncs.com/adockero/php-nginx:7.1-dev-lua
pull: true
push: true
context: ./
# Path to the Dockerfile (Default is '{path}/Dockerfile')
# path: ./dockerfile
file: Dockerfile.lua
# Comma-delimited list of build-time variables
build-args: TAG=php-nginx:7.1-dev
# Adds labels with git repository information to the built image
labels: true
# ----------------lua基础---------------------
- name: 7.1-lua-host-dir
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/php-nginx:7.1-lua-host-dir
registry.cn-hangzhou.aliyuncs.com/adockero/php-nginx:7.1-lua-host-dir
pull: true
push: true
context: ./
# Path to the Dockerfile (Default is '{path}/Dockerfile')
# path: ./dockerfile
file: Dockerfile.lua-host-dir
# Comma-delimited list of build-time variables
build-args: TAG=7.1-lua
# Adds labels with git repository information to the built image
labels: true
- name: 7.1-dev-lua-host-dir
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/php-nginx:7.1-dev-lua-host-dir
registry.cn-hangzhou.aliyuncs.com/adockero/php-nginx:7.1-dev-lua-host-dir
pull: true
push: true
context: ./
# Path to the Dockerfile (Default is '{path}/Dockerfile')
# path: ./dockerfile
file: Dockerfile.lua-host-dir
# Comma-delimited list of build-time variables
build-args: TAG=7.1-dev-lua
# Adds labels with git repository information to the built image
labels: true
- name: 7.1-thinkphp6
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/php-nginx:7.1-thinkphp6
registry.cn-hangzhou.aliyuncs.com/adockero/php-nginx:7.1-thinkphp6
pull: true
push: true
context: ./
# Path to the Dockerfile (Default is '{path}/Dockerfile')
# path: ./dockerfile
file: Dockerfile.thinkphp
# Comma-delimited list of build-time variables
# build-args: TAG=7.1-dev-lua
# Adds labels with git repository information to the built image
labels: true
- name: 7.1-git-auto
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/php-nginx:7.1-git-auto
registry.cn-hangzhou.aliyuncs.com/adockero/php-nginx:7.1-git-auto
pull: true
push: true
context: ./
# Path to the Dockerfile (Default is '{path}/Dockerfile')
# path: ./dockerfile
file: Dockerfile.git-auto
# Comma-delimited list of build-time variables
# build-args: TAG=7.1-dev-lua
# Adds labels with git repository information to the built image
labels: true