Skip to content

added platform arm64 #109

added platform arm64

added platform arm64 #109

name: Docker
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
IMAGE_NAME: bigdatainbiomedicine/needl
TEST_TAG: test
LATEST_TAG: latest
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
- name: Build test image
uses: docker/build-push-action@v6
with:
context: .
file: docker/NeEDL/Dockerfile
tags: ${{ env.IMAGE_NAME }}:${{ env.TEST_TAG }}
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Test
run: ./test/e2e/test_container.sh ${{ env.IMAGE_NAME }}:${{ env.TEST_TAG }}
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push final image
id: build-and-push
uses: docker/build-push-action@v6
with:
context: .
file: docker/NeEDL/Dockerfile
target: release
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ env.IMAGE_NAME }}:${{ env.LATEST_TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64