Skip to content

Commit

Permalink
chore: upd dep script
Browse files Browse the repository at this point in the history
  • Loading branch information
semarche-kaltura committed Dec 11, 2023
1 parent 3f9375a commit bc5ac21
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/update_dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,14 @@ jobs:
# Save script inputs to local variable
local inputsJson="${{ toJson(github.event.inputs) }}"
echo ">> inputs $inputsJson"
# Check if the dependency checked in script inputs
if [[ $(echo "$inputsJson" | jq -r --arg key "UPDATE-$dependencyName" '.[$key]') == "true" ]]; then
local latestVersion
local inputName="VERSION-${dependencyName}"
# Use jq to extract the inputs value
local inputValue=$(echo "$inputsJson" | jq -r --arg inputName "$inputName" '.[$inputName]')
local inputValue=$(echo "$inputsJson" | jq -r --arg key "VERSION-${dependencyName}" '.[$key]')
# Check and set version for update
local latestVersion
if [[ $inputValue == "null" ]]; then
echo "Input value is 'null'. Skipping update for $dependencyName"
elif [[ $inputValue == "latest" ]]; then
Expand Down

0 comments on commit bc5ac21

Please sign in to comment.