Skip to content

Test to investigate why github action image yields 'Illeagal instruct… #19

Test to investigate why github action image yields 'Illeagal instruct…

Test to investigate why github action image yields 'Illeagal instruct… #19

name: Build and Push Dev
on:
workflow_dispatch:
push:
paths:
- 'processing_env/**'
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
# Is set below, because we cannot use expressions in env. Declaring here for clarity
CURRENT_DATE:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Get the current date and time
id: set_current_date
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d-%H-%M-%S')" >> $GITHUB_ENV
# TODO: Enable multi platform build, once python package numcodecs can be built on arm64 using docker buildx (tried without success for version 12.1)
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./processing_env
push: true
provenance: false # Avoid unknown/unknown platform
tags: |
ghcr.io/${{ github.repository }}/processing_env-dev:${{ github.sha }}
ghcr.io/${{ github.repository }}/processing_env-dev:${{ env.CURRENT_DATE }}
platforms: linux/amd64 #,linux/arm64
target: dev
cache-from: type=gha
cache-to: type=gha,mode=max