Skip to content

Merge branch 'AlexsLemonade:main' into main #1

Merge branch 'AlexsLemonade:main' into main

Merge branch 'AlexsLemonade:main' into main #1

name: Build Docker image for simulate-sce
concurrency:
# only one run per branch at a time
group: "docker_simulate-sce_${{ github.ref }}"
cancel-in-progress: true
on:
pull_request:
branches:
- main
paths:
- analyses/simulate-sce/Dockerfile
- analyses/simulate-sce/.dockerignore
- analyses/simulate-sce/renv.lock
- analyses/simulate-sce/conda-lock.yml
push:
branches:
- main
paths:
- analyses/simulate-sce/Dockerfile
- analyses/simulate-sce/.dockerignore
- analyses/simulate-sce/renv.lock
- analyses/simulate-sce/conda-lock.yml
workflow_dispatch:
inputs:
push-ecr:
description: "Push to AWS ECR"
type: boolean
required: true
workflow_call:
inputs:
push-ecr:
description: "Push to AWS ECR"
type: boolean
jobs:
test-build:
name: Test Build Docker Image
if: github.event_name == 'pull_request' || (contains(github.event_name, 'workflow_') && !inputs.push-ecr)
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build image
uses: docker/build-push-action@v5
with:
context: "{{defaultContext}}:analyses/simulate-sce"
push: false
cache-from: type=gha
cache-to: type=gha,mode=max
build-push:
name: Build and Push Docker Image
if: github.repository_owner == 'AlexsLemonade' && (github.event_name == 'push' || inputs.push-ecr)
uses: ./.github/workflows/build-push-docker-module.yml
with:
module: simulate-sce
push-ecr: true