Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions .github/workflows/release-digital-ocean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,18 @@ jobs:
env:
RELEASE_VERSION: ${{ inputs.release_version }}
run: |
VERSION=$(jq -r '.versions.coreVersion' version.json)
if [[ -z "$VERSION" ]]; then
echo "ERROR: Failed to extract coreVersion from version.json"
exit 1
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"

# Use the release version input when dispatched from the release
# pipeline. Fall back to coreVersion for other builds.
if [[ -n "$RELEASE_VERSION" ]]; then
echo "img_version=$RELEASE_VERSION" >> "$GITHUB_OUTPUT"
IMG_VERSION="$RELEASE_VERSION"
else
echo "img_version=$VERSION" >> "$GITHUB_OUTPUT"
IMG_VERSION=$(jq -r '.versions.coreVersion' version.json)
if [[ -z "$IMG_VERSION" || "$IMG_VERSION" == "null" ]]; then
echo "ERROR: Failed to extract coreVersion from version.json"
exit 1
fi
fi
echo "img_version=$IMG_VERSION" >> "$GITHUB_OUTPUT"

- name: Set up Hashicorp Packer
uses: hashicorp/setup-packer@1aa358be5cf73883762b302a3a03abd66e75b232 # v3.1.0
Expand Down Expand Up @@ -131,7 +129,7 @@ jobs:
- name: Add build summary
if: success()
env:
VERSION: ${{ steps.set-version.outputs.version }}
VERSION: ${{ steps.set-version.outputs.img_version }}
working-directory: ./DigitalOceanMarketplace
run: |
echo "## :rocket: Digital Ocean Image Build Complete" >> $GITHUB_STEP_SUMMARY
Expand Down
Loading