Remove multi-architecture Docker build workflow configuration

This commit is contained in:
Arunavo Ray
2025-05-19 10:35:28 +05:30
parent c92af8b6b1
commit 05e999cfa1

View File

@@ -1,90 +0,0 @@
name: Build and Push Docker Images (Multi-Arch)
on:
push:
branches: [main]
tags: ['v*']
pull_request:
env:
REGISTRY: ghcr.io
IMAGE: ${{ github.repository }}
jobs:
build:
name: Build ${{ matrix.arch }}
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- arch: amd64
platform: linux/amd64
runner: ubuntu-latest
- arch: arm64
platform: linux/arm64
runner: ubuntu-24.04-arm
permissions:
contents: read
packages: write
services:
redis:
image: redis:7-alpine
ports: ['6379:6379']
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v5
with:
context: .
platforms: ${{ matrix.platform }}
push: ${{ github.event_name != 'pull_request' }}
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ matrix.arch }}-${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
manifest:
name: Create and Push Manifest
runs-on: ubuntu-latest
needs: build
if: github.event_name != 'pull_request'
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create and push manifest
run: |
docker manifest create ${{ env.REGISTRY }}/${{ env.IMAGE }}:latest \
${{ env.REGISTRY }}/${{ env.IMAGE }}:amd64-${{ github.sha }} \
${{ env.REGISTRY }}/${{ env.IMAGE }}:arm64-${{ github.sha }}
docker manifest create ${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ github.sha }} \
${{ env.REGISTRY }}/${{ env.IMAGE }}:amd64-${{ github.sha }} \
${{ env.REGISTRY }}/${{ env.IMAGE }}:arm64-${{ github.sha }}
docker manifest push ${{ env.REGISTRY }}/${{ env.IMAGE }}:latest
docker manifest push ${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ github.sha }}