Files
Maskarr/.github/workflows/docker-publish.yml
Dasemu 0e5ab6af1c
All checks were successful
Build and Publish Docker Images / build-and-push (push) Successful in 3m17s
Initial commit: Maskarr - Tracker proxy for *arr apps
- HTTP proxy server to modify User-Agent and headers for private trackers
  - Web UI with collapsible tracker cards and real-time validation
  - Multi-tracker support with persistent JSON configuration
  - Thread-safe configuration management
  - Full HTTP methods support (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS)
  - REST API for tracker management
  - Docker support with multi-architecture builds (amd64, arm64, arm/v7)
  - CI/CD workflows for GitHub Actions and Gitea Actions
  - Automatic publishing to GitHub Container Registry and Gitea Registry
2026-01-01 13:52:11 +01:00

82 lines
2.3 KiB
YAML

name: Build and Publish Docker Images
on:
push:
branches:
- main
- master
tags:
- 'v*.*.*'
pull_request:
branches:
- main
- master
workflow_dispatch:
env:
REGISTRY: ghcr.io
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest,enable={{is_default_branch}}
labels: |
org.opencontainers.image.title=Maskarr
org.opencontainers.image.description=Tracker Proxy for *arr Applications
org.opencontainers.image.vendor=Maskarr
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Image summary
if: github.event_name != 'pull_request'
run: |
echo "### Docker Image Published :rocket:" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**GitHub Container Registry:**" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo "ghcr.io/${{ github.repository }}:latest" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY