mirror of
https://github.com/aserper/masto-rss.git
synced 2025-12-17 05:15:25 +00:00
- Implement multiarch Dockerfile supporting linux/amd64 and linux/arm64 - Optimize Dockerfile with better layer caching and reduced image size - Update CI/CD pipeline to use Docker Buildx for multiarch builds - Add GitHub Container Registry (GHCR) as second publishing target - Configure automatic tagging (latest, branch name, commit SHA) - Add QEMU emulation support for cross-platform builds - Enable GitHub Actions layer caching for faster builds - Completely revamp README with comprehensive documentation - Add professional badges (build status, Docker Hub, GHCR, license, Python) - Include detailed setup instructions for Docker Hub and GHCR - Add Docker Compose example and configuration table - Document multiarch build process and state persistence
60 lines
1.4 KiB
YAML
60 lines
1.4 KiB
YAML
name: Masto-rss
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
steps:
|
|
- 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: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: amitserper
|
|
password: ${{ secrets.DH_PASSWORD }}
|
|
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Extract metadata
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: |
|
|
amitserper/masto-rss
|
|
ghcr.io/aserper/masto-rss
|
|
tags: |
|
|
type=ref,event=branch
|
|
type=sha,prefix={{branch}}-
|
|
type=raw,value=latest,enable={{is_default_branch}}
|
|
|
|
- name: Build and push multiarch image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
platforms: linux/amd64,linux/arm64
|
|
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
|