Skip to content

Merge pull request #84 from X4BNet/feature/max_conns #301

Merge pull request #84 from X4BNet/feature/max_conns

Merge pull request #84 from X4BNet/feature/max_conns #301

Workflow file for this run

on:
push:
pull_request:
jobs:
analyse:
runs-on: ubuntu-latest
name: Analyse
strategy:
matrix:
imageBase:
- alpine-3.12.0
- ubuntu-focal-20200925
nginxVersion:
- 1.18.0
- 1.20.2
- 1.22.0
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Analyse
uses: ./.github/actions/nginx-module-toolbox
with:
entrypoint: bash ./scripts/analyse.sh
imageBase: ${{ matrix.imageBase }}
nginxVersion: ${{ matrix.nginxVersion }}
lint:
runs-on: ubuntu-latest
name: Lint
strategy:
matrix:
imageBase:
- alpine-3.12.0
- ubuntu-focal-20200925
nginxVersion:
- 1.18.0
- 1.20.2
- 1.22.0
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Lint
uses: ./.github/actions/nginx-module-toolbox
with:
entrypoint: bash ./scripts/lint.sh
imageBase: ${{ matrix.imageBase }}
nginxVersion: ${{ matrix.nginxVersion }}
build:
runs-on: ubuntu-latest
name: Build
strategy:
matrix:
imageBase:
- alpine-3.12.0
- ubuntu-focal-20200925
nginxVersion:
- 1.18.0
- 1.20.2
- 1.22.0
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
uses: ./.github/actions/nginx-module-toolbox
with:
entrypoint: bash ./scripts/build.sh
imageBase: ${{ matrix.imageBase }}
nginxVersion: ${{ matrix.nginxVersion }}
- name: Upload Artifacts
if: ${{ env.GITHUB_ACTIONS_ENVIRONMENT != 'local' }}
uses: actions/upload-artifact@v2
with:
name: nginx-${{ matrix.imageBase }}-${{ matrix.nginxVersion }}
path: bin
test:
runs-on: ubuntu-latest
name: Test
needs: build
strategy:
matrix:
imageBase:
- alpine-3.12.0
- ubuntu-focal-20200925
nginxVersion:
- 1.18.0
- 1.20.2
- 1.22.0
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download Artifacts
if: ${{ env.GITHUB_ACTIONS_ENVIRONMENT != 'local' }}
uses: actions/download-artifact@v2
with:
name: nginx-${{ matrix.imageBase }}-${{ matrix.nginxVersion }}
path: bin
- name: Test
uses: ./.github/actions/nginx-module-toolbox
with:
entrypoint: bash ./scripts/test.sh
imageBase: ${{ matrix.imageBase }}
nginxVersion: ${{ matrix.nginxVersion }}
leak:
runs-on: ubuntu-latest
name: Leak Check
needs: build
strategy:
matrix:
imageBase:
- alpine-3.12.0
- ubuntu-focal-20200925
nginxVersion:
- 1.18.0
- 1.20.2
- 1.22.0
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download Artifacts
if: ${{ env.GITHUB_ACTIONS_ENVIRONMENT != 'local' }}
uses: actions/download-artifact@v2
with:
name: nginx-${{ matrix.imageBase }}-${{ matrix.nginxVersion }}
path: bin
- name: Leak Check
uses: ./.github/actions/nginx-module-toolbox
with:
entrypoint: bash ./scripts/leak.sh
imageBase: ${{ matrix.imageBase }}
nginxVersion: ${{ matrix.nginxVersion }}
tag:
runs-on: ubuntu-latest
name: Tag
needs: [analyse, build, leak, lint, test]
if: ${{ github.ref == 'refs/heads/master' && github.event_name == 'push' && (success() || failure()) }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check semver bump
id: check-semver
run: |
if [[ "${{ github.event.head_commit.message }}" =~ ^Merge\ pull\ request\ #[0-9]+\ from\ [^/]+/patch/.+$ ]]; then
echo ::set-output name=semver::patch
elif [[ "${{ github.event.head_commit.message }}" =~ ^Merge\ pull\ request\ #[0-9]+\ from\ [^/]+/major/.+$ ]]; then
echo ::set-output name=semver::major
else
echo ::set-output name=semver::minor
fi
- name: Bump major version and push tag
if: ${{ steps.check-semver.outputs.semver == 'major' }}
uses: anothrNick/github-tag-action@1.39.0
env:
DEFAULT_BUMP: major
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Bump minor version and push tag
if: ${{ steps.check-semver.outputs.semver == 'minor' }}
uses: anothrNick/github-tag-action@1.39.0
env:
DEFAULT_BUMP: minor
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Bump patch version and push tag
if: ${{ steps.check-semver.outputs.semver == 'patch' }}
uses: anothrNick/github-tag-action@1.39.0
env:
DEFAULT_BUMP: patch
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}