change image build to use docker architecture emulation #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker image build - base OS | |
on: | |
push: | |
branches: [ "ngeet-2024" ] | |
pull_request: | |
branches: [ "ngeet-2024" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
platform: [linux/amd64, linux/arm64] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Docker QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Docker Setup Buildx | |
uses: docker/[email protected] | |
env: | |
DOCKER_CONFIG: docker/baseos/gcc1120 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
platform: ${{ matrix.platform }} | |
context: "{{defaultContext}}:docker/baseos/gcc1120" | |
push: true | |
tags: ngeetropics/baseos:testbuild-${{ matrix.platform}} |