Skip to content

Container Build

Container Build #442

Workflow file for this run

name: Container Build
on:
release:
types: [published] # Triggered when a release is published
workflow_dispatch: # Allows manual trigger
schedule:
- cron: '0 8 * * *' # 3:00 AM ET during Standard Time (UTC-5)
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Set up QEMU for cross-platform builds
uses: docker/setup-qemu-action@v4
with:
platforms: 'linux/amd64,linux/arm64'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to DockerHub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push Docker image for releases
if: github.event_name == 'release' && github.event.action == 'published'
uses: docker/build-push-action@v7
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
jeffersonlab/japan-moller:latest
jeffersonlab/japan-moller:${{ github.ref_name }}
- name: Build and push Docker image for nightly build
if: github.event_name == 'schedule'
uses: docker/build-push-action@v7
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
jeffersonlab/japan-moller:nightly
- name: Build and push Docker image for manual trigger on main branch
if: github.event_name == 'workflow_dispatch'
uses: docker/build-push-action@v7
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
jeffersonlab/japan-moller:main