Skip to content

Update NGINX to 1.27.3 #41

Update NGINX to 1.27.3

Update NGINX to 1.27.3 #41

Workflow file for this run

name: build
on:
push:
branches: [main]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
env:
NGINX_VERSION: 1.27.3
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: docker login to docker.io
uses: docker/login-action@v2
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
registry: docker.io
username: zengxs
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Setup binfmt-support
uses: docker/setup-qemu-action@v3
- name: Setup docker buildx
uses: docker/setup-buildx-action@v3
- name: Generate push tags
run: >-
python3 .github/workflows/generate-tags.py
--image-name docker.io/zengxs/nginx
--nginx-version ${{ env.NGINX_VERSION }}
--env-name PUSH_TAGS
>> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
tags: ${{ env.PUSH_TAGS }}
# Only build multi-platform images on push to Docker Hub for reducing build time
platforms: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
NGINX_VERSION=${{ env.NGINX_VERSION }}