Skip to content

Commit

Permalink
add workflow_dispatch conditional build-publish
Browse files Browse the repository at this point in the history
  • Loading branch information
momentmaker committed Aug 13, 2024
1 parent 78a0fbc commit 3a93e0c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build-publish-develop-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
git_ref:
description: "The git ref to check out"
required: true
build-publish:
description: "Whether to build and publish - defaults to just build"
required: false
default: "false"

env:
GIT_REF: ${{ github.event.inputs.git_ref || github.ref }}

Expand Down Expand Up @@ -42,6 +47,9 @@ jobs:
echo "image-tag=develop-${short_sha}" | tee -a $GITHUB_OUTPUT
echo "build-publish=true" | tee -a $GITHUB_OUTPUT
fi
elif [[ ${{ github.event_name }} == 'workflow_dispatch' ]]; then
echo "image-tag=${short_sha}" | tee -a $GITHUB_OUTPUT
echo "build-publish=${{ github.event.inputs.build-publish }}" | tee -a $GITHUB_OUTPUT
else
if [[ ${{ github.event }} == "pull_request" ]]; then
echo "image-tag=pr-${{ github.event.number }}-${short_sha}" | tee -a $GITHUB_OUTPUT
Expand Down

0 comments on commit 3a93e0c

Please sign in to comment.