Skip to content

Build Docker Images #1365

Build Docker Images

Build Docker Images #1365

Workflow file for this run

name: Build Docker Images
on:
schedule:
- cron: '0 0 * * *' # Run Daily
workflow_dispatch:
env:
DOCKER_ORG: cormorack
GITHUB_SHA: ${{ github.sha }}
jobs:
docker-build:
name: ${{ matrix.image_name }}-build
runs-on: ubuntu-20.04
strategy:
matrix:
image_name: ["minioci", "http"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Retrieve test data
if: matrix.image_name == 'http'
uses: ./.github/actions/gdrive-rclone
env:
GOOGLE_SERVICE_JSON: ${{ secrets.GOOGLE_SERVICE_JSON }}
ROOT_FOLDER_ID: ${{ secrets.TEST_DATA_FOLDER_ID }}
- name: Set Docker Image Spec
run: |
DATE_TAG="$( date -u '+%Y.%m.%d' )"
IMAGE_SPEC="${{ env.DOCKER_ORG }}/${{ matrix.image_name }}"
echo "IMAGE_SPEC=${IMAGE_SPEC}" >> $GITHUB_ENV
echo "DATE_TAG=${DATE_TAG}" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push
id: docker_build_push
uses: docker/build-push-action@v6
with:
context: ./
file: ./.ci_helpers/docker/${{ matrix.image_name }}.dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: |
${{ env.IMAGE_SPEC }}:${{ env.DATE_TAG }}
${{ env.IMAGE_SPEC }}:latest