Skip to content

docker

docker #468

Workflow file for this run

name: docker
on:
workflow_dispatch:
inputs:
ngx_stable_version_number:
description: 'literal'
required: true
ngx_mainline_version_number:
description: 'literal'
required: true
module_version_number:
description: 'literal'
required: true
defaults:
run:
shell: bash
jobs:
ngx-stable-module-lts:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/lts' }}
strategy:
matrix:
target: ['glibc', 'musl']
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER_NAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Build and push (ngx-stable-module-lts-x)
env:
TARGET: ${{ matrix.target }}
NGX_VERSION_NUMBER: ${{ github.event.inputs.ngx_stable_version_number }}
MODULE_VERSION_NUMBER: ${{ github.event.inputs.module_version_number }}
uses: docker/build-push-action@v2
with:
context: .
file: docker/Dockerfile.${{ env.TARGET }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
build-args: NGX_VER=stable
push: true
tags: |
${{ secrets.DOCKER_USER_NAME }}/ngx_waf-prebuild:ngx-stable-module-lts-${{ env.TARGET }}
${{ secrets.DOCKER_USER_NAME }}/ngx_waf-prebuild:ngx-stable-module-${{ env.MODULE_VERSION_NUMBER }}-${{ env.TARGET }}
${{ secrets.DOCKER_USER_NAME }}/ngx_waf-prebuild:ngx-${{ env.NGX_VERSION_NUMBER }}-module-lts-${{ env.TARGET }}
${{ secrets.DOCKER_USER_NAME }}/ngx_waf-prebuild:ngx-${{ env.NGX_VERSION_NUMBER }}-module-${{ env.MODULE_VERSION_NUMBER }}-${{ env.TARGET }}
platforms: |
linux/amd64
linux/arm64
linux/386
linux/arm/v7
ngx-mainline-module-lts:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/lts' }}
strategy:
matrix:
target: ['glibc', 'musl']
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER_NAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Build and push (ngx-mainline-module-lts-x)
env:
TARGET: ${{ matrix.target }}
NGX_VERSION_NUMBER: ${{ github.event.inputs.ngx_mainline_version_number }}
MODULE_VERSION_NUMBER: ${{ github.event.inputs.module_version_number }}
uses: docker/build-push-action@v2
with:
context: .
file: docker/Dockerfile.${{ env.TARGET }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
build-args: NGX_VER=mainline
push: true
tags: |
${{ secrets.DOCKER_USER_NAME }}/ngx_waf-prebuild:ngx-mainline-module-lts-${{ env.TARGET }}
${{ secrets.DOCKER_USER_NAME }}/ngx_waf-prebuild:ngx-mainline-module-${{ env.MODULE_VERSION_NUMBER }}-${{ env.TARGET }}
${{ secrets.DOCKER_USER_NAME }}/ngx_waf-prebuild:ngx-${{ env.NGX_VERSION_NUMBER }}-module-lts-${{ env.TARGET }}
${{ secrets.DOCKER_USER_NAME }}/ngx_waf-prebuild:ngx-${{ env.NGX_VERSION_NUMBER }}-module-${{ env.MODULE_VERSION_NUMBER }}-${{ env.TARGET }}
platforms: |
linux/amd64
linux/arm64
linux/386
linux/arm/v7
ngx-stable-module-current:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/current' }}
strategy:
matrix:
target: ['glibc', 'musl']
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER_NAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Build and push (ngx-stable-module-current-x)
env:
TARGET: ${{ matrix.target }}
NGX_VERSION_NUMBER: ${{ github.event.inputs.ngx_stable_version_number }}
MODULE_VERSION_NUMBER: ${{ github.event.inputs.module_version_number }}
uses: docker/build-push-action@v2
with:
context: .
file: docker/Dockerfile.${{ env.TARGET }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
build-args: NGX_VER=stable
push: true
tags: |
${{ secrets.DOCKER_USER_NAME }}/ngx_waf-prebuild:ngx-stable-module-current-${{ env.TARGET }}
${{ secrets.DOCKER_USER_NAME }}/ngx_waf-prebuild:ngx-stable-module-${{ env.MODULE_VERSION_NUMBER }}-${{ env.TARGET }}
${{ secrets.DOCKER_USER_NAME }}/ngx_waf-prebuild:ngx-${{ env.NGX_VERSION_NUMBER }}-module-current-${{ env.TARGET }}
${{ secrets.DOCKER_USER_NAME }}/ngx_waf-prebuild:ngx-${{ env.NGX_VERSION_NUMBER }}-module-${{ env.MODULE_VERSION_NUMBER }}-${{ env.TARGET }}
platforms: |
linux/amd64
linux/arm64
linux/386
linux/arm/v7
ngx-mainline-module-current:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/current' }}
strategy:
matrix:
target: ['glibc', 'musl']
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER_NAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Build and push (ngx-mainline-module-current-x)
env:
TARGET: ${{ matrix.target }}
NGX_VERSION_NUMBER: ${{ github.event.inputs.ngx_mainline_version_number }}
MODULE_VERSION_NUMBER: ${{ github.event.inputs.module_version_number }}
uses: docker/build-push-action@v2
with:
context: .
file: docker/Dockerfile.${{ env.TARGET }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
build-args: NGX_VER=mainline
push: true
tags: |
${{ secrets.DOCKER_USER_NAME }}/ngx_waf-prebuild:ngx-mainline-module-current-${{ env.TARGET }}
${{ secrets.DOCKER_USER_NAME }}/ngx_waf-prebuild:ngx-mainline-module-${{ env.MODULE_VERSION_NUMBER }}-${{ env.TARGET }}
${{ secrets.DOCKER_USER_NAME }}/ngx_waf-prebuild:ngx-${{ env.NGX_VERSION_NUMBER }}-module-current-${{ env.TARGET }}
${{ secrets.DOCKER_USER_NAME }}/ngx_waf-prebuild:ngx-${{ env.NGX_VERSION_NUMBER }}-module-${{ env.MODULE_VERSION_NUMBER }}-${{ env.TARGET }}
platforms: |
linux/amd64
linux/arm64
linux/386
linux/arm/v7