Build and Push Dev #14
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: Build and Push Dev | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- 'processing_env/**' | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
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: Cache Docker layers | |
uses: actions/cache@v3 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
# 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 }} | |
platforms: linux/amd64 #,linux/arm64 | |
target: dev | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache |