Skip to content

feat: multi-platform image with self-built GCC toolchains #15

feat: multi-platform image with self-built GCC toolchains

feat: multi-platform image with self-built GCC toolchains #15

Workflow file for this run

name: Build and Push Multi-Platform Docker Image
on:
push:
branches:
- main
pull_request: {}
workflow_dispatch:
jobs:
build-multiplatform:
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
env:
IMAGE_NAME: ${{ github.event.repository.name }}
IMAGE_OWNER: ${{ github.repository_owner }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in 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: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=modernize
- name: Build and push multi-platform Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max