Skip to content

Fix tests and update deps (#11354) #201

Fix tests and update deps (#11354)

Fix tests and update deps (#11354) #201

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ master, develop ]
env:
PLATFORMS: linux/amd64,linux/arm/v7,linux/arm64
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: ${{ env.PLATFORMS }}
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
install: true
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ github.repository_owner }}/medusa
# tag with master or develop
tags: |
type=ref,event=branch
# also tag master as latest
flavor: latest=${{ github.ref_name == 'master' }}
- name: Log into Dockerhub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Docker image
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
platforms: ${{ env.PLATFORMS }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push: true
pull: true
build-args: |
GIT_COMMIT=${{ github.sha }}
GIT_BRANCH=${{ github.ref_name }}
BUILD_DATE=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}