broad-zoo-34077
12/14/2021, 3:30 PMlittle-author-61621
plain-ocean-92335
12/14/2021, 3:40 PMlittle-author-61621
plain-ocean-92335
12/14/2021, 3:43 PMplain-ocean-92335
12/14/2021, 3:44 PMlittle-author-61621
tag
attribute to the GH comment action, that passes through to the `tag` input in the compost-action do you think that would work for this?crooked-daybreak-55253
12/14/2021, 4:27 PMlittle-author-61621
- name: Post Infracost comment
uses: infracost/actions/comment@comment-tag # Use this branch to test this
with:
path: /tmp/infracost.json
behavior: update # Create a single comment and update
tag: <YOUR_WORKFLOW_IDENTIFIER>
crooked-daybreak-55253
12/14/2021, 7:13 PMinfracost output --format github-comment --path <path-to-breakdown-output.json>
2. post the comment with compost
In step 1 you could modify the comment to add a header or whatever.plain-ocean-92335
12/15/2021, 7:42 AMplain-ocean-92335
12/15/2021, 8:07 AM- name: Post Infracost comment
uses: infracost/actions/comment@comment-tag
with:
path: /tmp/infracost.json
tag: ${{ env.GITHUB_WORKFLOW }}
behavior: update # Create a single comment and update it.
But I don’t see that tag is passed to action in log:
Run infracost/actions/comment@comment-tag
with:
path: /tmp/infracost.json
behavior: update
github-token: ***
thus still same behavior in pull requestlittle-author-61621
little-author-61621
${{ env.GITHUB_WORKFLOW }}
is coming through blank for some reason. But this works:
- run: echo "COMMENT_TAG=$GITHUB_WORKFLOW" >> $GITHUB_ENV
- name: Post Infracost comment
id: infracost-comment
uses: infracost/actions/comment@comment-tag
with:
path: /tmp/infracost.json
tag: ${{ env.COMMENT_TAG }}
behavior: update
Not sure why yet, though.plain-ocean-92335
12/15/2021, 8:45 AMplain-ocean-92335
12/15/2021, 9:15 AMlittle-author-61621
@comment-tag
back to @v1
.plain-ocean-92335
12/15/2021, 9:19 AMlittle-author-61621
little-author-61621
[//]: <> (your_tag)
which won't appear.little-author-61621
@comment-tag
back to @v1
.