mirror of
https://github.com/aserper/masto-rss.git
synced 2025-12-17 13:25:25 +00:00
Add multiarch Docker support and GHCR publishing
- 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
This commit is contained in:
55
.github/workflows/masto-rss.yml
vendored
55
.github/workflows/masto-rss.yml
vendored
@@ -5,16 +5,55 @@ on:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Build & Push Image
|
||||
run: |
|
||||
echo "${{ secrets.DH_PASSWORD }}" | docker login -u "amitserper" --password-stdin
|
||||
docker build -t amitserper/masto-rss .
|
||||
docker push amitserper/masto-rss
|
||||
- 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
|
||||
|
||||
Reference in New Issue
Block a user