Skip to content

yaml

yaml #22

Workflow file for this run

name: 构建和提交nginx
on:
push:
branches:
- master
paths:
- "**"
- "./*"
- "!docker-build/**"
- "!.github/workflows/*.yml"
- ".github/workflows/nginx.yml"
jobs:
setup-build-publish:
runs-on: ubuntu-latest
name: 构建和推送docker镜像
steps:
-
name: 登录 Docker Hub
uses: docker/login-action@v2
with:
username: adockero
password: ${{ secrets.PASSWORD }}
- name: Checkout
# 使用action库 actions/checkout获取源码
uses: actions/checkout@v2.3.2
# ---------------alpine---start---------------------
# - name: nginx-alpine-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:nginx-alpine-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: FROM_ARG=webdevops/nginx:alpine
# # Adds labels with git repository information to the built image
# labels: true
- name: nginx-alpine-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:nginx-alpine-lua-host-dir
# pull: true
# push: false
push: true
context: ./
# Path to the Dockerfile (Default is '{path}/Dockerfile')
# path: ./dockerfile
file: ./openresty/Dockerfile.lua-host-dir
# Comma-delimited list of build-time variables
# build-args: FROM_ARG=adockero/php-nginx:nginx-alpine-lua
# Adds labels with git repository information to the built image
labels: true
# ---------------debian---end---------------------
# ---------------debian---start---------------------
- name: nginx-debian-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:nginx-debian-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: FROM_ARG=webdevops/nginx:debian-10
# Adds labels with git repository information to the built image
labels: true
- name: nginx-debian-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:nginx-debian-lua-host-dir
# pull: true
# push: false
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: FROM_ARG=adockero/php-nginx:nginx-debian-lua
# Adds labels with git repository information to the built image
labels: true
# ---------------debian---end---------------------