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"
9
9
LABEL "homepage" ="http://github.com/hashicorp/terraform-github-actions"
10
10
LABEL "maintainer" =
"HashiCorp Terraform Team <[email protected] >"
11
11
12
- RUN apk --no-cache add jq curl
12
+ RUN apk --update -- no-cache add jq curl bash
13
13
14
14
COPY entrypoint.sh /entrypoint.sh
15
15
ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change 46
46
47
47
# If PR_DATA is null, then this is not a pull request event and so there's
48
48
# 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)
50
50
if [ " $TF_ACTION_COMMENT " = " 1" ] || [ " $TF_ACTION_COMMENT " = " false" ] || [ " $PR_DATA " = " null" ]; then
51
51
exit $SUCCESS
52
52
fi
70
70
71
71
# Post the comment.
72
72
PAYLOAD=$( 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)
74
74
curl -s -S -H " Authorization: token $GITHUB_TOKEN " --header " Content-Type: application/json" --data " $PAYLOAD " " $COMMENTS_URL " > /dev/null
75
75
76
76
exit $SUCCESS
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ LABEL "repository"="https://github.com/hashicorp/terraform-github-actions"
9
9
LABEL "homepage" ="http://github.com/hashicorp/terraform-github-actions"
10
10
LABEL "maintainer" =
"HashiCorp Terraform Team <[email protected] >"
11
11
12
- RUN apk --no-cache add jq curl
12
+ RUN apk --update -- no-cache add jq curl bash
13
13
14
14
COPY entrypoint.sh /entrypoint.sh
15
15
ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ $COMMENT
47
47
*Workflow: \` $GITHUB_WORKFLOW \` , Action: \` $GITHUB_ACTION \` *
48
48
"
49
49
PAYLOAD=$( 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)
51
51
curl -s -S -H " Authorization: token $GITHUB_TOKEN " --header " Content-Type: application/json" --data " $PAYLOAD " " $COMMENTS_URL " > /dev/null
52
52
53
53
exit $SUCCESS
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ LABEL "repository"="https://github.com/hashicorp/terraform-github-actions"
9
9
LABEL "homepage" ="http://github.com/hashicorp/terraform-github-actions"
10
10
LABEL "maintainer" =
"HashiCorp Terraform Team <[email protected] >"
11
11
12
- RUN apk --no-cache add jq curl
12
+ RUN apk --update -- no-cache add jq curl bash
13
13
14
14
COPY entrypoint.sh /entrypoint.sh
15
15
ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ $OUTPUT
31
31
\`\`\`
32
32
*Workflow: \` $GITHUB_WORKFLOW \` , Action: \` $GITHUB_ACTION \` *"
33
33
PAYLOAD=$( 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)
35
35
curl -s -S -H " Authorization: token $GITHUB_TOKEN " --header " Content-Type: application/json" --data " $PAYLOAD " " $COMMENTS_URL " > /dev/null
36
36
37
37
exit $SUCCESS
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ LABEL "repository"="https://github.com/hashicorp/terraform-github-actions"
9
9
LABEL "homepage" ="http://github.com/hashicorp/terraform-github-actions"
10
10
LABEL "maintainer" =
"HashiCorp Terraform Team <[email protected] >"
11
11
12
- RUN apk --no-cache add jq curl
12
+ RUN apk --update -- no-cache add jq curl bash
13
13
14
14
COPY entrypoint.sh /entrypoint.sh
15
15
ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change 79
79
80
80
# Post the comment.
81
81
PAYLOAD=$( 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)
83
83
curl -s -S -H " Authorization: token $GITHUB_TOKEN " --header " Content-Type: application/json" --data " $PAYLOAD " " $COMMENTS_URL " > /dev/null
84
84
85
85
exit $SUCCESS
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ LABEL "repository"="https://github.com/hashicorp/terraform-github-actions"
9
9
LABEL "homepage" ="http://github.com/hashicorp/terraform-github-actions"
10
10
LABEL "maintainer" =
"HashiCorp Terraform Team <[email protected] >"
11
11
12
- RUN apk --no-cache add jq curl
12
+ RUN apk --update -- no-cache add jq curl bash
13
13
14
14
COPY entrypoint.sh /entrypoint.sh
15
15
ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ $OUTPUT
26
26
\`\`\`
27
27
*Workflow: \` $GITHUB_WORKFLOW \` , Action: \` $GITHUB_ACTION \` *"
28
28
PAYLOAD=$( 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)
30
30
curl -s -S -H " Authorization: token $GITHUB_TOKEN " --header " Content-Type: application/json" --data " $PAYLOAD " " $COMMENTS_URL " > /dev/null
31
31
32
32
exit $SUCCESS
You can’t perform that action at this time.
0 commit comments