Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 44 additions & 43 deletions .github/workflows/build_docker_images.yml
Original file line number Diff line number Diff line change
@@ -1,73 +1,74 @@
name: Build Docker Images

on:
# Allows manual run from the Actions tab
workflow_dispatch:
push:
branches:
- main
paths:
- 'Ubuntu/Dockerfile.buildenv.ubuntu'
- 'Ubuntu/Dockerfile.testenv.ubuntu'
- 'Ubuntu/Dockerfile.runtime.ubuntu'
inputs:
os_name:
description: 'Container OS'
required: true
default: 'ubuntu'
type: choice
options:
- 'ubuntu'
type:
description: 'Container type'
required: true
default: 'buildenv'
type: choice
options:
- 'buildenv'
- 'testenv'
- 'runtime'

env:
REGISTRY: ghcr.io
ORG_NAME: emod-hub # Must be lowercase

jobs:
build:
name: Build ${{ matrix.name }}
name: Build and push Docker image
runs-on: ubuntu-latest
env:
DFILE_NAME: ${{ format('Dockerfile.{0}.{1}', inputs.type, inputs.os_name) }}
IMAGE_NAME: ${{ format('emod-{0}-{1}', inputs.os_name, inputs.type) }}
permissions:
contents: read
artifact-metadata: write
attestations: write
id-token: write
packages: write
strategy:
fail-fast: false
matrix:
include:
- name: buildenv
dockerfile: Dockerfile.buildenv.ubuntu
image: emod-ubuntu-buildenv
context: Ubuntu
- name: testenv
dockerfile: Dockerfile.testenv.ubuntu
image: emod-ubuntu-testenv
context: Ubuntu
- name: runtime
dockerfile: Dockerfile.runtime.ubuntu
image: emod-ubuntu-runtime
context: Ubuntu

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set lower-case image ref
id: image
run: |
OWNER=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
echo "ref=${{ env.REGISTRY }}/${OWNER}/${{ matrix.image }}" >> $GITHUB_OUTPUT

uses: actions/checkout@v6
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
images: ${{ steps.image.outputs.ref }}
images: ${{ env.REGISTRY }}/${{ env.ORG_NAME }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=sha,prefix=sha-

- name: Build and push
uses: docker/build-push-action@v6
id: push
uses: docker/build-push-action@v7
with:
context: ${{ matrix.context }}
file: Ubuntu/${{ matrix.dockerfile }}
context: ./${{ inputs.os_name}}
file: ${{ inputs.os_name}}/${{ env.DFILE_NAME }}
push: true
tags: ${{ steps.meta.outputs.tags }}
sbom: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Generate artifact attestation
uses: actions/attest@v4
with:
subject-name: ${{ env.REGISTRY }}/${{ env.ORG_NAME }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
File renamed without changes.
5 changes: 5 additions & 0 deletions centos/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# CentOS Docker Images

This directory contains legacy Dockerfile image definitions for building and running EMOD on CentOS 7.

CentOS is a discontinued Linux distribution; these image definitions are deprecated.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.