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 45c7770 commit 6b12288
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/update_dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,13 @@ jobs:
# Check if the dependency exists in package.json
if [[ "$currentVersion" != "null" ]]; then
# Save script inputs to local variable
local inputsJson="${{ toJson(github.event.inputs) }}"
local dependencyKey="UPDATE-$dependencyName"
# Construct the input keys dynamically
local checkedKey="UPDATE-$dependencyName"
local versionKey="VERSION-$dependencyName"
# Debug: Print jq commands
echo ">> jq command for checked: jq -r --arg key \"$dependencyKey\" '.[\$key]'"
echo ">> jq command for version: jq -r --arg key \"$versionKey\" '.[\$key]'"
local checkedValue=$(echo "$inputsJson" | jq -r --arg key "$dependencyKey" '.[$key]')
local versionValue=$(echo "$inputsJson" | jq -r --arg key "$versionKey" '.[$key]')
# Save input values to local variables
local checkedValue="${{ github.event.inputs[$checkedKey] }}"
local versionValue="${{ github.event.inputs[$versionKey] }}"
echo ">> checked $checkedValue"
echo ">> version $versionValue"
Expand Down

0 comments on commit 6b12288

Please sign in to comment.