Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unconditionally use the GitHub workflow run ID as build ID. #29

Merged
merged 1 commit into from
Jan 2, 2024
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
12 changes: 1 addition & 11 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ runs:
env:
AUTOBUILD: autobuild # Expected by some 3p build scripts
AUTOBUILD_ADDRSIZE: ${{ inputs.addrsize }}
AUTOBUILD_BUILD_ID: ${{ github.run_id }}
AUTOBUILD_CONFIG_FILE: ${{ inputs.file }}
AUTOBUILD_GITHUB_TOKEN: ${{ inputs.token }}
AUTOBUILD_INSTALLABLE_CACHE: ${{ github.workspace }}/.autobuild-installables
Expand All @@ -196,17 +197,6 @@ runs:
use_scm_version="$(autobuild print --json | jq -j .package_description.use_scm_version)"
use_scm_version="$(echo $use_scm_version | tr '[:upper:]' '[:lower:]')"

# Set AUTOBUILD_BUILD_ID
if [[ "$BUILD_ID" == "SHA" ]]; then
# Only default build ID to SHA if SCM version is disabled
if [[ "$use_scm_version" != "true" ]]; then
export AUTOBUILD_BUILD_ID="$SHORT_SHA"
fi
elif [[ ! -z "$BUILD_ID" ]]; then
# Allow an explicitly set build ID to be used
export AUTOBUILD_BUILD_ID="$BUILD_ID"
fi

if [[ ! -z "$CONFIGURATION" ]]; then
export AUTOBUILD_CONFIGURATION="$CONFIGURATION"
fi
Expand Down