robburger / terraform-pr-commenter

A GitHub Action that adds opinionated comments to a PR from Terraform fmt/init/plan output
MIT License
129 stars 63 forks source link

Error relocating /usr/bin/curl: curl_easy_nextheader: symbol not found? #50

Closed sheeeng closed 1 year ago

sheeeng commented 1 year ago

The robburger/terraform-pr-commenter@v1 workflow was function properly for me for some time.

Recently, I noticed that it cannot write comments to GitHub Pull Request.

Found the following error under robburger/terraform-pr-commenter@v1 workflow.

Releasing state lock. This may take a few moments...
" "0"
INFO: Looking for an existing plan PR comment.
Error relocating /usr/bin/curl: curl_easy_nextheader: symbol not found
Error relocating /usr/bin/curl: curl_easy_header: symbol not found
INFO: No existing plan PR comment found.
INFO: Adding plan comment to PR.
Error relocating /usr/bin/curl: curl_easy_nextheader: symbol not found
Error relocating /usr/bin/curl: curl_easy_header: symbol not found
sheeeng commented 1 year ago

The following changes fix this issue.

diff --git a/Dockerfile b/Dockerfile
index 0000000..0000000 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,19 +1,22 @@
-FROM hashicorp/terraform:1.0.6
+FROM hashicorp/terraform:1.4.5

-RUN apk add --no-cache -q \
-    bash \
-    curl \
-    jq
+RUN apk add \
+    --no-cache \
+    --quiet \
+    bash=~5 \
+    curl=~8 \
+    jq=~1