From 492f81885530ca9b1a8af06627e53e1e7e0d7f9f Mon Sep 17 00:00:00 2001 From: mtweeman Date: Tue, 10 Sep 2024 21:31:04 +0200 Subject: [PATCH] ci: System-wide PATH --- ...tic-analyzers-aggregator-geodesic-test.yaml | 18 ++++++++---------- Dockerfile | 12 +++++++++--- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/workflows/static-analyzers-aggregator-geodesic-test.yaml b/.github/workflows/static-analyzers-aggregator-geodesic-test.yaml index 83a04704..c790b7c1 100644 --- a/.github/workflows/static-analyzers-aggregator-geodesic-test.yaml +++ b/.github/workflows/static-analyzers-aggregator-geodesic-test.yaml @@ -11,20 +11,18 @@ jobs: name: Static analysis geodesic test runs-on: ubuntu-latest container: - image: mtweeman/hajle-silesia_provisioning-ld:sha-2387ca9 - - defaults: - run: - shell: - bash -il -e -o pipefail {0} + image: mtweeman/hajle-silesia_provisioning-ld:sha-fe33102 steps: - name: Checkout uses: actions/checkout@v4 - - name: Commands + - name: Configure git run: | - echo "PATH: ${PATH}" - . ~/.profile - echo "PATH: ${PATH}" git config --global --add safe.directory $GITHUB_WORKSPACE + - name: Run static analysis + run: | + echo "TF: $(terraform -version)" + echo "Trivy: $(trivy --version)" + echo "TFlint: $(tflint --version)" + echo "pre-commit: $(pre-commit --version)" pre-commit run --all-files --hook-stage manual diff --git a/Dockerfile b/Dockerfile index 75919f62..7945df16 100755 --- a/Dockerfile +++ b/Dockerfile @@ -18,10 +18,16 @@ ENV DOCKER_TAG="latest" # source: https://mise.jdx.dev/getting-started.html ARG MISE_VERSION ARG MISE_INSTALL_PATH="/usr/local/bin/mise" -RUN curl https://mise.run | MISE_INSTALL_PATH="${MISE_INSTALL_PATH}" MISE_VERSION="${MISE_VERSION}" sh -#RUN echo "eval \"\$(${MISE_INSTALL_PATH} activate bash)\"" >> ~/.profile -RUN mise activate bash --shims >> ~/.profile +ARG MISE_DATA_DIR="/usr/share/xdg_data_home/mise" +RUN curl https://mise.run | \ + MISE_VERSION="${MISE_VERSION}" \ + MISE_INSTALL_PATH="${MISE_INSTALL_PATH}" \ + MISE_DATA_DIR="${MISE_DATA_DIR}" \ + sh +ENV PATH="${MISE_DATA_DIR}/shims:$PATH" +# defaults for all users # source: https://mise.jdx.dev/configuration.html#system-config-etc-mise-config-toml COPY .mise.toml /etc/mise/config.toml +# install tools # source: https://mise.jdx.dev/cli/install.html RUN mise install --yes