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.
This commit is contained in:
Marco Ferrari 2024-07-16 13:05:49 +02:00 committed by GitHub
parent 913bd0dd47
commit cc20e4561e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -98,7 +98,7 @@ ENV TFLINT_PLUGIN_DIR="/root/.tflint.d/plugins"
COPY TEMPLATES/.tflint.hcl /action/lib/.automation/ COPY TEMPLATES/.tflint.hcl /action/lib/.automation/
# Initialize TFLint plugins so we get plugin versions listed when we ask for TFLint version # 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 FROM python:3.12.3-alpine3.20 AS lintr-installer