This repository was archived by the owner on May 6, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 10 files changed +11
-11
lines changed
Expand file tree Collapse file tree 10 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ LABEL "repository"="https://github.com/hashicorp/terraform-github-actions"
99LABEL "homepage" ="http://github.com/hashicorp/terraform-github-actions"
1010LABEL "maintainer" =
"HashiCorp Terraform Team <[email protected] >" 1111
12- RUN apk --no-cache add jq curl
12+ RUN apk --update -- no-cache add jq curl bash
1313
1414COPY entrypoint.sh /entrypoint.sh
1515ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change 4646
4747# If PR_DATA is null, then this is not a pull request event and so there's
4848# no where to comment.
49- PR_DATA=$( cat /github/workflow/event.json | jq -r .pull_request)
49+ PR_DATA=$( cat $GITHUB_EVENT_PATH | jq -r .pull_request)
5050if [ " $TF_ACTION_COMMENT " = " 1" ] || [ " $TF_ACTION_COMMENT " = " false" ] || [ " $PR_DATA " = " null" ]; then
5151 exit $SUCCESS
5252fi
7070
7171# Post the comment.
7272PAYLOAD=$( echo ' {}' | jq --arg body " $COMMENT " ' .body = $body' )
73- COMMENTS_URL=$( cat /github/workflow/event.json | jq -r .pull_request.comments_url)
73+ COMMENTS_URL=$( cat $GITHUB_EVENT_PATH | jq -r .pull_request.comments_url)
7474curl -s -S -H " Authorization: token $GITHUB_TOKEN " --header " Content-Type: application/json" --data " $PAYLOAD " " $COMMENTS_URL " > /dev/null
7575
7676exit $SUCCESS
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ LABEL "repository"="https://github.com/hashicorp/terraform-github-actions"
99LABEL "homepage" ="http://github.com/hashicorp/terraform-github-actions"
1010LABEL "maintainer" =
"HashiCorp Terraform Team <[email protected] >" 1111
12- RUN apk --no-cache add jq curl
12+ RUN apk --update -- no-cache add jq curl bash
1313
1414COPY entrypoint.sh /entrypoint.sh
1515ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ $COMMENT
4747*Workflow: \` $GITHUB_WORKFLOW \` , Action: \` $GITHUB_ACTION \` *
4848"
4949PAYLOAD=$( echo ' {}' | jq --arg body " $COMMENT_WRAPPER " ' .body = $body' )
50- COMMENTS_URL=$( cat /github/workflow/event.json | jq -r .pull_request.comments_url)
50+ COMMENTS_URL=$( cat $GITHUB_EVENT_PATH | jq -r .pull_request.comments_url)
5151curl -s -S -H " Authorization: token $GITHUB_TOKEN " --header " Content-Type: application/json" --data " $PAYLOAD " " $COMMENTS_URL " > /dev/null
5252
5353exit $SUCCESS
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ LABEL "repository"="https://github.com/hashicorp/terraform-github-actions"
99LABEL "homepage" ="http://github.com/hashicorp/terraform-github-actions"
1010LABEL "maintainer" =
"HashiCorp Terraform Team <[email protected] >" 1111
12- RUN apk --no-cache add jq curl
12+ RUN apk --update -- no-cache add jq curl bash
1313
1414COPY entrypoint.sh /entrypoint.sh
1515ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ $OUTPUT
3131\`\`\`
3232*Workflow: \` $GITHUB_WORKFLOW \` , Action: \` $GITHUB_ACTION \` *"
3333PAYLOAD=$( echo ' {}' | jq --arg body " $COMMENT " ' .body = $body' )
34- COMMENTS_URL=$( cat /github/workflow/event.json | jq -r .pull_request.comments_url)
34+ COMMENTS_URL=$( cat $GITHUB_EVENT_PATH | jq -r .pull_request.comments_url)
3535curl -s -S -H " Authorization: token $GITHUB_TOKEN " --header " Content-Type: application/json" --data " $PAYLOAD " " $COMMENTS_URL " > /dev/null
3636
3737exit $SUCCESS
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ LABEL "repository"="https://github.com/hashicorp/terraform-github-actions"
99LABEL "homepage" ="http://github.com/hashicorp/terraform-github-actions"
1010LABEL "maintainer" =
"HashiCorp Terraform Team <[email protected] >" 1111
12- RUN apk --no-cache add jq curl
12+ RUN apk --update -- no-cache add jq curl bash
1313
1414COPY entrypoint.sh /entrypoint.sh
1515ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change 7979
8080# Post the comment.
8181PAYLOAD=$( echo ' {}' | jq --arg body " $COMMENT " ' .body = $body' )
82- COMMENTS_URL=$( cat /github/workflow/event.json | jq -r .pull_request.comments_url)
82+ COMMENTS_URL=$( cat $GITHUB_EVENT_PATH | jq -r .pull_request.comments_url)
8383curl -s -S -H " Authorization: token $GITHUB_TOKEN " --header " Content-Type: application/json" --data " $PAYLOAD " " $COMMENTS_URL " > /dev/null
8484
8585exit $SUCCESS
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ LABEL "repository"="https://github.com/hashicorp/terraform-github-actions"
99LABEL "homepage" ="http://github.com/hashicorp/terraform-github-actions"
1010LABEL "maintainer" =
"HashiCorp Terraform Team <[email protected] >" 1111
12- RUN apk --no-cache add jq curl
12+ RUN apk --update -- no-cache add jq curl bash
1313
1414COPY entrypoint.sh /entrypoint.sh
1515ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ $OUTPUT
2626\`\`\`
2727*Workflow: \` $GITHUB_WORKFLOW \` , Action: \` $GITHUB_ACTION \` *"
2828PAYLOAD=$( echo ' {}' | jq --arg body " $COMMENT " ' .body = $body' )
29- COMMENTS_URL=$( cat /github/workflow/event.json | jq -r .pull_request.comments_url)
29+ COMMENTS_URL=$( cat $GITHUB_EVENT_PATH | jq -r .pull_request.comments_url)
3030curl -s -S -H " Authorization: token $GITHUB_TOKEN " --header " Content-Type: application/json" --data " $PAYLOAD " " $COMMENTS_URL " > /dev/null
3131
3232exit $SUCCESS
You can’t perform that action at this time.
0 commit comments