Skip to content

Merge pull request #838 from UTSouthwesternDSSR/main #54

Merge pull request #838 from UTSouthwesternDSSR/main

Merge pull request #838 from UTSouthwesternDSSR/main #54

# This is a workflow to build the docker image for the cell-type-nonETP-ALL-03 module
#
# Docker modules are run on pull requests when code for files that affect the Docker image have changed.
# If other files are used during the Docker build, they should be added to `paths`
#
# At module initialization, this workflow is inactive, and needs to be activated manually
name: Build docker image for cell-type-nonETP-ALL-03
concurrency:
# only one run per branch at a time
group: "docker_cell-type-nonETP-ALL-03_${{ github.ref }}"
cancel-in-progress: true
on:
pull_request:
branches:
- main
paths:
- "analyses/cell-type-nonETP-ALL-03/Dockerfile"
- "analyses/cell-type-nonETP-ALL-03/.dockerignore"
- "analyses/cell-type-nonETP-ALL-03/renv.lock"
- "analyses/cell-type-nonETP-ALL-03/conda-lock.yml"
push:
branches:
- main
paths:
- "analyses/cell-type-nonETP-ALL-03/Dockerfile"
- "analyses/cell-type-nonETP-ALL-03/.dockerignore"
- "analyses/cell-type-nonETP-ALL-03/renv.lock"
- "analyses/cell-type-nonETP-ALL-03/conda-lock.yml"
workflow_dispatch:
inputs:
push-ecr:
description: "Push to AWS ECR"
type: boolean
required: true
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/cell-type-nonETP-ALL-03"
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: "cell-type-nonETP-ALL-03"
push-ecr: true