Skip to content

Commit

Permalink
Add manual dispatch for publish docker workflow for testing. (#578)
Browse files Browse the repository at this point in the history
  • Loading branch information
savente93 authored Oct 12, 2023
1 parent f66c17b commit 47a7284
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ on:
types:
- published

workflow_dispatch:
inputs:
publish:
description: 'Actually push images'
required: true
type: boolean
default: false


jobs:
publish-docker-image:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -37,29 +46,28 @@ jobs:

#build should be cached from previous steps
- name: Build and push full image
if: ${{ github.event_name == 'release' || github.event.act }}
uses: docker/build-push-action@v4
with:
context: .
load: true
target: full
push: ${{ !github.event.act }}
tags: deltares/hydromt
push: ${{ inputs.publish }}
tags: deltares/hydromt:full

- name: Build and push min image
if: ${{ github.event_name == 'release' || github.event.act }}
uses: docker/build-push-action@v4
with:
context: .
load: true
target: min
push: ${{ !github.event.act }}
push: ${{ inputs.publish }}
tags: deltares/hydromt:min

- name: Build and push slim image
if: ${{ github.event_name == 'release' || github.event.act }}
uses: docker/build-push-action@v4
with:
context: .
load: true
target: slim
push: ${{ !github.event.act }}
tags: deltares/hydromt
push: ${{ inputs.publish }}
tags: deltares/hydromt:slim

0 comments on commit 47a7284

Please sign in to comment.