diff --git a/.github/actions/posthog/action.yml b/.github/actions/posthog/action.yml index f59c728..9844a51 100644 --- a/.github/actions/posthog/action.yml +++ b/.github/actions/posthog/action.yml @@ -34,9 +34,10 @@ runs: -H "Accept: application/vnd.github+json" \ "https://api.github.com/repos/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" || echo "{}") - GHA_SHA=$(echo "$RUN_DATA" | jq -r --arg repo "$GHA_REPOSITORY" \ + GHA_SHA=$(echo "$RUN_DATA" | jq -r --arg repo "${GHA_REPOSITORY}" \ '(.referenced_workflows // [])[] | select(.path | startswith($repo)) | .sha' | head -1) - GHA_REF=$(echo "$RUN_DATA" | jq -r '(.referenced_workflows // [])[] | select(.path | startswith($GHA_REPOSITORY)) | .ref // ""' | head -1) + GHA_REF=$(echo "$RUN_DATA" | jq -r --arg repo "${GHA_REPOSITORY}" \ + '(.referenced_workflows // [])[] | select(.path | startswith($repo)) | .ref // ""' | head -1) WORKFLOW_VERSION="" if [ -n "$GHA_REF" ]; then