Skip to content

Build and Publish Docker Image #57

Build and Publish Docker Image

Build and Publish Docker Image #57

Workflow file for this run

name: Build and Publish Docker Image
on:
push:
pull_request:
workflow_dispatch:
jobs:
build-publish:
strategy:
matrix:
config:
- local # Redirect Pretendo requests to a local server (default)
- wiiu # For Wii U network dumps
- 3ds # For 3DS network dumps
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU for Docker
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up the ${{ matrix.config }} config
run: |
rm ./.mitmproxy/config.yaml
ln -s ../config-${{ matrix.config }}.yaml ./.mitmproxy/config.yaml
- name: Log into the GitHub container registry
if:
${{ github.event != 'pull_request' && github.ref == 'refs/heads/master' }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
flavor: latest=${{ matrix.config == 'local' }}
tags: |
type=ref,event=branch,enable=${{ matrix.config == 'local' }}
type=raw,value=${{ matrix.config }}
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push:
${{ github.event != 'pull_request' && github.ref == 'refs/heads/master' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max