Skip to content

Commit

Permalink
Workflow fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
jhiemstrawisc committed Dec 9, 2024
1 parent 2c5045b commit c72532a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 20 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/build-and-remove-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: Build And Remove Docker Image
# A workflow template that handles building+removing SPRAS containers.

# Required inputs are:
# - path: The path to a container's Dockerfile directory, relative to the repo root
# - container: The registry/container to be built, without a tag
# - tag: The tag to be built
# - always-build: A boolean indicating whether the action should condition whether it builds the container
# on any detected changes
# - path: The path to a container's Dockerfile directory, relative to the repo root.
# - container: The registry/container to be built, without a tag.
# - tag: The tag to be built.
# - always_build: A boolean indicating whether the action should condition the container build
# on detected changes.
# - context: The optional build context path, relative to the repo root.
on:
workflow_call:
Expand All @@ -20,9 +20,10 @@ on:
tag:
required: true
type: string
always-build:
required: true
always_build:
required: false
type: boolean
default: false
context:
required: false
type: string
Expand All @@ -38,7 +39,7 @@ jobs:
# check whether anything at that path has been modified relative to master's head.
# If so, we'll set `env.changed=true` to trigger the build in a later step
- name: Check for changes
if: ${{ inputs.always-build }} == 'false'
if: ${{ inputs.always_build }}
id: check_changes
run: |
if git fetch origin master && git diff --name-only origin/master | grep -q "$(basename ${{ inputs.path }})"; then
Expand All @@ -49,10 +50,10 @@ jobs:
echo "changed=false" >> $GITHUB_ENV
fi
- name: Set changed to true for always-build
if: ${{ inputs.always-build }} == 'true'
- name: Toggle container build if 'always_build'
if: ${{ inputs.always_build }}
run: |
echo "Input for job 'always-build' is true -- building regardless of detected changes."
echo "Input for job 'always_build' is true -- building regardless of detected changes."
echo "changed=true" >> $GITHUB_ENV
- name: Build Docker image
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/build-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,56 +9,48 @@ jobs:
path: docker-wrappers/OmicsIntegrator1
container: reedcompbio/omics-integrator-1
tag: latest
always-build: false
build-and-remove-omics2:
uses: "./.github/workflows/build-and-remove-template.yml"
with:
path: docker-wrappers/OmicsIntegrator2
container: reedcompbio/omics-integrator-2
tag: latest
always-build: false
build-and-remove-pathlinker:
uses: "./.github/workflows/build-and-remove-template.yml"
with:
path: docker-wrappers/PathLinker
container: reedcompbio/pathlinker
tag: v2
always-build: false
build-and-remove-meo:
uses: "./.github/workflows/build-and-remove-template.yml"
with:
path: docker-wrappers/MEO
container: reedcompbio/meo
tag: latest
always-build: false
build-and-remove-mincostflow:
uses: "./.github/workflows/build-and-remove-template.yml"
with:
path: docker-wrappers/MinCostFlow
container: reedcompbio/mincostflow
tag: latest
always-build: false
build-and-remove-allpairs:
uses: "./.github/workflows/build-and-remove-template.yml"
with:
path: docker-wrappers/AllPairs
container: reedcompbio/allpairs
tag: v2
always-build: false
build-and-remove-domino:
uses: "./.github/workflows/build-and-remove-template.yml"
with:
path: docker-wrappers/DOMINO
container: reedcompbio/domino
tag: latest
always-build: false
build-and-remove-cytoscape:
uses: "./.github/workflows/build-and-remove-template.yml"
with:
path: docker-wrappers/Cytoscape
container: reedcompbio/py4cytoscape
tag: v3
always-build: false
build-and-remove-spras:
uses: "./.github/workflows/build-and-remove-template.yml"
with:
Expand All @@ -68,5 +60,5 @@ jobs:
# Since any change to the SPRAS codebase would constitute a change to
# the container we produce in this step, build the container regardless
# of detected changes.
always-build: true
always_build: true
context: ./

0 comments on commit c72532a

Please sign in to comment.