Skip to content

Commit

Permalink
ci: Experiment with geodesic workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mtweeman committed Sep 10, 2024
1 parent 8c3c2ee commit 4f06afc
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 26 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/static-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ jobs:
terraform-version: ${{ needs.preparation.outputs.terraform-version }}
severity: ${{ needs.preparation.outputs.severity }}

static-analysis-pre-commit-test:
static-analysis-geodesic-test:
needs:
- preparation
name: Static analysis pre-commit
uses: ./.github/workflows/static-analyzers-aggregator-pre-commit.yaml
name: Static analysis geodesic test
uses: ./.github/workflows/static-analyzers-aggregator-geodesic-test.yaml
50 changes: 50 additions & 0 deletions .github/workflows/static-analyzers-aggregator-geodesic-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Static analyzers aggregator geodesic test

on:
workflow_call:

permissions:
contents: read

jobs:
static-analysis-geodesic-test:
name: Static analysis geodesic test
runs-on: ubuntu-latest
container:
image: mtweeman/hajle-silesia_provisioning-ld:latest
options: --rm -it

defaults:
run:
shell:
bash -e -o pipefail {0} # removed --noprofile, --norc options from default bash

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Commands
run: |
echo "PATH: ${PATH}"
for path in $(mise bin-paths); do
export PATH="${path}:${PATH}"
done
echo "MISE: $(mise --version)"
echo "terraform: $(terraform --version)"
echo "TFLint: $(tflint --version)"
echo "TRivy: $(trivy --version)"
echo "pc: $(pre-commit --version)"
echo "PWD: $(pwd)"
pre-commit install
pre-commit run --all --hook-stage manual
# - run: |
# docker run --rm mtweeman/hajle-silesia_provisioning-ld:latest init | bash
# /usr/local/bin/hajle-silesia_provisioning-ld
# cd /
# echo "DYSK: $(ls -la)"
# . conf/.profile
# echo "MISE: $(mise --version)"
# echo "PATH: ${PATH}"
# echo "TRivy: $(trivy --version)"
# echo "TFLint: $(tflint --version)"
# pre-commit install
# pre-commit run --all --hook-stage manual
23 changes: 0 additions & 23 deletions .github/workflows/static-analyzers-aggregator-pre-commit.yaml

This file was deleted.

4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ RUN echo "eval \"\$(${MISE_INSTALL_PATH} activate bash)\"" >> ~/.profile
COPY .mise.toml /etc/mise/config.toml
# source: https://mise.jdx.dev/cli/install.html
RUN mise install --yes
SHELL ["/bin/bash", "-c"]
RUN . /conf/.profile && echo "${PATH}"
RUN eval "$(${MISE_INSTALL_PATH} activate bash)" && echo "${PATH}"
ENV PATH="${PATH}"

0 comments on commit 4f06afc

Please sign in to comment.