Skip to content

build-alb-nginx-base #32

build-alb-nginx-base

build-alb-nginx-base #32

name: build-alb-nginx-base
# only trigger it manually
on:
workflow_dispatch:
inputs:
do_release:
type: boolean
description: sync alb-nginx-base image to dockerhub
required: true
default: false
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
build-openresty:
name: Build Openresty
runs-on: ubuntu-22.04
strategy:
matrix:
platform:
- linux/amd64
- linux/arm64
steps:
- uses: actions/checkout@v4
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- uses: docker/setup-buildx-action@v3
- name: build
env:
MATRIX_PLATFORM: "${{ matrix.platform }}"
run: |
./scripts/run-like-github-actions.sh build-nginx
- name: Upload alb-nginx-base images to artifact
uses: actions/upload-artifact@v3
with:
name: alb-nginx-base-{{ matrix.platform }}
path: alb-nginx-base-{{ matrix.platform }}.tar
- name: release
if: ${{ inputs.do_release }}
env:
RELEASE_ME: "${{ github.event.inputs.do_release == 'true' }}"
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_CLI_EXPERIMENTAL: enabled
run: |
env
./scripts/run-like-github-actions.sh release-nginx