From cc20e4561e549c6f6609900ba68602930c01fb7d Mon Sep 17 00:00:00 2001 From: Marco Ferrari Date: Tue, 16 Jul 2024 13:05:49 +0200 Subject: [PATCH] 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. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7538cd5d..6020d857 100644 --- a/Dockerfile +++ b/Dockerfile @@ -98,7 +98,7 @@ ENV TFLINT_PLUGIN_DIR="/root/.tflint.d/plugins" COPY TEMPLATES/.tflint.hcl /action/lib/.automation/ # Initialize TFLint plugins so we get plugin versions listed when we ask for TFLint version -RUN tflint --init -c /action/lib/.automation/.tflint.hcl +RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_TOKEN=$(cat /run/secrets/GITHUB_TOKEN) tflint --init -c /action/lib/.automation/.tflint.hcl FROM python:3.12.3-alpine3.20 AS lintr-installer