mitmproxy-pretendo/.github/workflows/docker.yml
dependabot[bot] 271d00c4c4
Bump docker/build-push-action from 5 to 6
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-17 12:01:22 +00:00

64 lines
1.9 KiB
YAML

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