Added new input param for RHEL build

This commit is contained in:
Alexey Pustovalov 2024-05-08 16:05:28 +09:00
parent 431bd5a623
commit 39dad999ae

View File

@ -20,6 +20,9 @@ on:
required: true
default: false
type: boolean
trunk_version:
description: 'Specify trunk major version'
type: string
defaults:
run:
@ -139,6 +142,7 @@ jobs:
env:
LATEST_BRANCH: ${{ env.LATEST_BRANCH }}
github_ref: ${{ github.ref }}
TRUNK_MAJOR_VERSION: ${{ inputs.trunk_version }}
run: |
result=false
sha_short=$(git rev-parse --short HEAD)
@ -156,13 +160,21 @@ jobs:
echo "::group::Branch metadata"
echo "is_default_branch - $result"
echo "current_branch - $github_ref"
if [ "${github_ref//.}" == "trunk" ] && [ ! -z "$TRUNK_MAJOR_VERSION" ]; then
echo "secret_prefix=RHEL_${TRUNK_MAJOR_VERSION//.}"
else
echo "secret_prefix=RHEL_${github_ref//.}"
fi
echo "sha_short - $sha_short"
echo "::endgroup::"
echo "is_default_branch=$result" >> $GITHUB_OUTPUT
echo "current_branch=$github_ref" >> $GITHUB_OUTPUT
if [ "${github_ref//.}" == "trunk" ] && [ ! -z "$TRUNK_MAJOR_VERSION" ]; then
echo "secret_prefix=RHEL_${TRUNK_MAJOR_VERSION//.}" >> $GITHUB_OUTPUT
else
echo "secret_prefix=RHEL_${github_ref//.}" >> $GITHUB_OUTPUT
fi
echo "sha_short=$sha_short" >> $GITHUB_OUTPUT
- name: Cleanup existing cache