Skip to content

Commit

Permalink
adds option for custom_tag
Browse files Browse the repository at this point in the history
  • Loading branch information
fherreazcue committed Oct 30, 2023
1 parent 7bba8f1 commit 24793c5
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: build-push
run-name: 'build-push: versioned? ${{ github.event.inputs.versioned }} - latest? ${{ github.event.inputs.latest }}'
run-name: |
build-push:
${{ github.event.inputs.versioned == 'true' && 'versioned , ' || ', ' }}
${{ github.event.inputs.latest == 'true' && 'latest , ' || ', ' }}
${{ github.event.inputs.custom_tag != '' && github.event.inputs.custom_tag || '' }}
on:
workflow_dispatch:
Expand All @@ -14,6 +18,11 @@ on:
required: true
type: boolean
default: true
custom_tag:
description: 'Specify a custom tag to push'
required: false
type: string
default: ""

jobs:
build-test-push:
Expand Down Expand Up @@ -80,3 +89,9 @@ jobs:
run: |
docker image tag sandpaper:testing ghcr.io/uomresearchit/sandpaper:latest
docker push ghcr.io/uomresearchit/sandpaper:latest
- name: Push custom_tag
if: github.event.inputs.custom_tag != ''
run: |
docker image tag sandpaper:testing ghcr.io/uomresearchit/sandpaper:${{ github.event.inputs.custom_tag }}
docker push ghcr.io/uomresearchit/sandpaper:${{ github.event.inputs.custom_tag }}

0 comments on commit 24793c5

Please sign in to comment.