Skip to content

Fix dockerfile for ARM64? #85

Fix dockerfile for ARM64?

Fix dockerfile for ARM64? #85

Workflow file for this run

name: Build, Test, and (if needed) Publish Image
on:
push:
branches:
- master
- dev
release:
types: ['published']
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-22.04
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
contents: read
packages: write
#
steps:
- uses: docker/[email protected]
with:
driver-opts: image=moby/buildkit
- uses: docker/[email protected]
id: meta
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=sha,format=long
type=semver,pattern={{version}}
- uses: docker/[email protected]
if: github.event_name != 'pull_request'
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Build image (X86)
uses: docker/[email protected]
with:
load: true
push: false
tags: pyda_tmp
platforms: linux/amd64
provenance: false
cache-from: type=gha
- name: Test (X86)
run: |
docker run -e PYTHONUNBUFFERED=1 --rm --workdir /opt/pyda/tests --entrypoint python3 pyda_tmp run_tests.py --debug
- name: Build image (ARM64)
uses: docker/[email protected]
with:
load: true
push: false
tags: pyda_tmp
platforms: linux/arm64
provenance: false
cache-from: type=gha
- name: Push image
uses: docker/[email protected]
if: github.event_name != 'pull_request'
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
platforms: linux/amd64,linux/arm64
provenance: false
cache-from: type=gha
cache-to: type=gha,mode=max