Skip to content

Commit

Permalink
Update image-build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
georgepstaylor authored Nov 11, 2024
1 parent cd21833 commit ddc59f7
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ name: "Image Build"

on:
workflow_dispatch:
push:
tags:
- '*'
workflow_call:
inputs:
tag:
required: true
type: string
pull_request:
types:
- opened
Expand Down Expand Up @@ -32,7 +34,7 @@ jobs:
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "SAFE_TAG=$(echo ${{ github.event.pull_request.head.ref }} | sed 's/[^a-zA-Z0-9.]/-/g')-${{ github.run_id }}-${{ github.run_number }}" >> $GITHUB_OUTPUT
else
echo "SAFE_TAG=$(echo ${{ github.ref_name }} | sed 's/[^a-zA-Z0-9.]/-/g')" >> $GITHUB_OUTPUT
echo "SAFE_TAG=$(echo ${{ inputs.tag }} | sed 's/[^a-zA-Z0-9.]/-/g')" >> $GITHUB_OUTPUT
fi
- name: Output VERSION_REF
Expand All @@ -42,7 +44,7 @@ jobs:
# if on a PR we need to get the current branch name
echo "VERSION_REF=${{ github.event.pull_request.head.ref }}" >> $GITHUB_OUTPUT
else
echo "VERSION_REF=${{ github.ref_name }}" >> $GITHUB_OUTPUT
echo "VERSION_REF=${{ inputs.tag }}" >> $GITHUB_OUTPUT
fi
- name: Set up Docker Buildx
Expand Down

0 comments on commit ddc59f7

Please sign in to comment.