Skip to content

Commit

Permalink
correctl ref inputs everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
jamie zieziula committed Oct 15, 2024
1 parent 03c4039 commit cb82252
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/helm-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,25 @@ jobs:
run: |
# Exit if any commands fail, so git command failures do not result in null versions downstream
set -e
if [ "$MODE" == "main-merge" ]; then
if [ "${{ inputs.mode }}" == "main-merge" ]; then
# append "-dev" to the version so that it's clear that this is a development release
echo "RELEASE_VERSION=$(date +'%Y.%-m.%-d%H%M%S')-dev" >> $GITHUB_ENV
# get the short sha of the latest commit for the operator image
short_sha="$(git rev-parse --short=7 HEAD)"
echo "SHORT_SHA=$short_sha" >> "$GITHUB_ENV"
else
elif [[ "${{ inputs.mode }}" == "release" ]]; then
echo "RELEASE_VERSION=$(date +'%Y.%-m.%-d%H%M%S')" >> $GITHUB_ENV
# This ensures that the latest tag we grab will be of the operator image, and not the helm chart
echo "OPERATOR_VERSION=$(\
git ls-remote --tags --refs --sort="v:refname" \
origin 'v[0-9].[0-9].[0-9]' | tail -n1 | sed 's/.*\///'
)" >> $GITHUB_ENV
else
echo "Invalid mode: ${{ inputs.mode }}"
exit 1
fi
- name: Output versions as GitHub Outputs
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/images-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Build and Push Images on Merge to Main

"on":
workflow_dispatch: {}
push:
branches:
- main
Expand Down

0 comments on commit cb82252

Please sign in to comment.