mirror of
https://github.com/smittix/intercept.git
synced 2026-04-23 22:30:00 -07:00
Add multi-arch support (amd64 + arm64) to Docker CI workflow
This commit is contained in:
13
.github/workflows/docker-image.yml
vendored
13
.github/workflows/docker-image.yml
vendored
@@ -21,11 +21,15 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Step 2: Set up Docker Buildx for advanced features
|
||||
# Step 2: Set up QEMU for multi-arch builds
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
# Step 3: Set up Docker Buildx for advanced features
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
# Step 3: Log in to GitHub Container Registry
|
||||
# Step 4: Log in to GitHub Container Registry
|
||||
- name: Log in to GHCR
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
@@ -33,7 +37,7 @@ jobs:
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# Step 4: Generate tags and labels from Git metadata
|
||||
# Step 5: Generate tags and labels from Git metadata
|
||||
- name: Extract metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
@@ -50,11 +54,12 @@ jobs:
|
||||
# Tag with short SHA
|
||||
type=sha,prefix=
|
||||
|
||||
# Step 5: Build and push the Docker image
|
||||
# Step 6: Build and push the Docker image
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
# Only push on main branch and tags, not PRs
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
|
||||
Reference in New Issue
Block a user