108 lines
2.8 KiB
YAML
108 lines
2.8 KiB
YAML
name: Build mitmproxy
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'mitmproxy/**'
|
|
pull_request:
|
|
branches:
|
|
- '!dependabot/**'
|
|
workflow_run:
|
|
workflows:
|
|
- Lint Docker Files
|
|
branches: [ 'master', 'feature/**' ]
|
|
types:
|
|
- completed
|
|
workflow_dispatch:
|
|
|
|
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"
|
|
if: ${{ !env.ACT }}
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
|
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
|
|
|
- name: "Setup: Login to GHCR"
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ secrets.GHCR_USERNAME }}
|
|
password: ${{ secrets.GHCR_PASSWORD }}
|
|
|
|
- name: "Build: Build MITM proxy with healthchecks"
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: mitm-proxy
|
|
build-contexts: |
|
|
mitmproxy/mitmproxy=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: true
|
|
tags: |
|
|
${{ !env.ACT && format('benzine/mitmproxy:{0}',matrix.mitmproxy) || '' }}
|
|
${{ format('ghcr.io/benzine-framework/mitmproxy:{0}', matrix.mitmproxy) }}
|
|
cache-from: ${{ !env.ACT && 'type=gha' || '' }}
|
|
cache-to: ${{ !env.ACT && 'type=gha,mode=max' || '' }}
|
|
|
|
|