Skip to content

Commit cc20e45

Browse files
authored
ci: authenticate tflint init (#5894)
TFLint init might hit an API rate limit, especially when requests to the TFLint backend come from shared tenants, such as GitHub Actions.
1 parent 913bd0d commit cc20e45

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ ENV TFLINT_PLUGIN_DIR="/root/.tflint.d/plugins"
9898
COPY TEMPLATES/.tflint.hcl /action/lib/.automation/
9999

100100
# Initialize TFLint plugins so we get plugin versions listed when we ask for TFLint version
101-
RUN tflint --init -c /action/lib/.automation/.tflint.hcl
101+
RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_TOKEN=$(cat /run/secrets/GITHUB_TOKEN) tflint --init -c /action/lib/.automation/.tflint.hcl
102102

103103
FROM python:3.12.3-alpine3.20 AS lintr-installer
104104

0 commit comments

Comments
 (0)