Skip to content

Commit

Permalink
Fix variable expansion in curl JSON object
Browse files Browse the repository at this point in the history
  • Loading branch information
xwang2713 committed Oct 4, 2024
1 parent b8a79e1 commit cc428de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,12 @@ jobs:
run: |
community_tag=$( echo ${{ github.ref }} | cut -d'/' -f3 )
hpcc_version=$( echo $community_tag | sed 's/community_//' | sed 's/-[0-9]$//' )
data="{\"ref\":\"main\", \"inputs\": { \"hpccVersion\":\"$hpcc_version\",\"hpccSrcBranch\":\"$community_tag\" }}"
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GAHT_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/xwang2713/github-action-hpcc-terraform/actions/workflows/$WF_YAML_FILE/dispatches \
-d '{"ref":"main", "inputs": { "hpccVersion":"$hpcc_version", "hpccSrcBranch":"$community_tag" }}'
-d "${data}"

0 comments on commit cc428de

Please sign in to comment.