Docker-Swarm-Loadbalancer/.github/workflows/mitm-proxy.yml
Matthew Baggett 6db6395f66
Trunk linter ()
* linting is fun

* mis-detection of missing healthcheck staements.

* typo

* disable tagging vanity tags on non-main branch

* Unbugger node build?

* Add gitleaks detector, remove an expired secret.

* More linting-derived cleanup

* Fiddle with trivy

* Fiddle with trivy

* add a readme

* Fix build bug with php flavours

* Marshall should build other flavours of ubuntu.

* Fiddle with act cache location.

* Add concurrency checks

* Composer version gubbins for 7.0/7.1

* ubuntu is just a label, and injected over the top of.

* Composer version gubbins for 7.0/7.1

* Run when workflow is altered too please.

* Hopefully fix composer stage.

* setup tooling meta-tooling.

* Add trunk

* Disable mirror mode, its being problematic, and increase retries to 5.

* Revisit how ghcr login works.

* Add trunk checks.

* All hail the linter

* Heavilly revise workflow

* Fettling

* Fettling

* Fettling

* Fettling

* Fettling

* Cleanup

* Cleanup

* Fettling.. Why does mitm build but not redis?

* Fettling.. Why does mitm build but not redis?

* Debuggin

* Fettling.

* Fix build?

* Permissions are a pain

* Switch around some should_push logic because envs aren't available that early.

* Permissionssssss

* Trivy, bane of my life

* Fix merge?

* Fix labels

* Help node along, among other things

* Redis 6.1 & 7.1 aren't a thing any more.

* Ffff USER nonsense

* latest-openssl doesn't exist.

* fixup mysqlproxy.

* Fix labels

* uurrgh

* uurrgh

* Didn't need to add the mitmproxy user, it exists

* Missing ghcr login

* Missing backtick

* Fix build?

* Add validate build step to bouncer.

* Fix bouncer build

* Disable laravel build

* Missing env

* Fix swarm mon build

* Scout just doesn't seem to work.
2024-02-07 16:21:14 +01:00

100 lines
2.7 KiB
YAML

name: Build mitmproxy
permissions:
contents: read
packages: write
on:
workflow_call:
workflow_dispatch:
env:
should_push: ${{ github.ref == 'refs/heads/main' }}
jobs:
mitmproxy-build:
name: "MITM proxy with Healthchecks"
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 15
matrix:
mitmproxy:
- latest
- 10.2.2
- 10.2.1
- 10.2.0
- 10.1.6
- 10.1.5
- 10.1.4
- 10.1.3
- 10.1.2
- 10.1.1
- 10.1.0
- 10.0.0
- 9.0.1
- 9.0.0
- 8.1.1
- 8.1.0
- 8.0.0
- 7.0.4
- 7.0.3
- 7.0.2
- 7.0.1
- 7.0.0
- 6.0.2
- 6.0.1
- 6.0.0
- 5.3.0
- 5.2
- 5.1.1
- 5.1.0
- 5.0.1
- 5.0.0
steps:
- name: "Setup: Setup QEMU"
uses: docker/setup-qemu-action@v2
- name: "Setup: Expose GitHub Runtime"
uses: crazy-max/ghaction-github-runtime@v3
- name: "Setup: Setup Docker Buildx"
uses: docker/setup-buildx-action@v2
- name: "Setup: Checkout Source"
uses: actions/checkout@v4
with:
sparse-checkout: |
mitm-proxy
- name: "Setup: Login to Docker Hub"
uses: docker/login-action@v3
with:
username: matthewbaggett
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: "Setup: Login to GHCR"
uses: docker/login-action@v3
with:
registry: ghcr.io
username: matthewbaggett
password: ${{ secrets.GHCR_PASSWORD }}
- name: "Build: Build MITM proxy with healthchecks"
uses: docker/build-push-action@v5
with:
context: mitm-proxy
build-contexts: |
mitmproxy:version=docker-image://mitmproxy/mitmproxy:${{ matrix.mitmproxy }}
build-args: |
MITMPROXY_VERSION=${{ matrix.mitmproxy }}
GIT_SHA=${{ github.sha }}
BUILD_DATE=${{ github.event.repository.pushed_at }}
platforms: ${{ (!env.ACT && !(startsWith('6.',matrix.mitmproxy) || startsWith('5.', matrix.mitmproxy))) && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
pull: true
push: ${{ env.should_push && !env.ACT }}
tags: |
${{ format('benzine/mitmproxy:{0}', matrix.mitmproxy) }}
${{ env.should_push && format('ghcr.io/benzine-framework/mitmproxy:{0}', matrix.mitmproxy) }}
cache-from: ${{ !env.ACT && 'type=gha' || '' }}
cache-to: ${{ !env.ACT && 'type=gha,mode=max' || '' }}