Skip to content

feat(build): adding multi-platform support #18

feat(build): adding multi-platform support

feat(build): adding multi-platform support #18

Workflow file for this run

name: build-image
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
-
name: Checkout ekgf/gloud-terraform
uses: actions/checkout@v4
-
name: set-env
run: |
echo "FQ_IMAGE_NAME=${{ vars.FQ_IMAGE_NAME }}" >> $GITHUB_ENV
echo "VERSION=$(< ./VERSION)" >> $GITHUB_ENV
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64
-
name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push Docker images
uses: docker/build-push-action@v6
with:
tags: ${{ env.FQ_IMAGE_NAME }}:latest, ${{ env.FQ_IMAGE_NAME }}:${{ env.VERSION }}
pull: true
push: true
platforms: linux/amd64,linux/arm64