Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/build-common/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ runs:
sed -i -E 's#^python .*##g' .tool-versions
sed -i -E 's#^pre-commit .*##g' .tool-versions

- name: Install tools from asdf config
- name: Install tools from mise config
if: ${{ hashFiles('**/.tool-versions') }}
uses: ai/asdf-cache-action@d74eacf1ff3bb69ce232d6147c88704a9668db3a
uses: ./.github/actions/mise-cache

- name: cache virtualenv
uses: actions/cache@v4
Expand Down
17 changes: 17 additions & 0 deletions .github/actions/mise-cache/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "mise-cache"
description: "mise cache action, wrapper for mise-action"
inputs:
mise-version:
description: "mise version to install"
default: ""
required: false
runs:
using: "composite"
steps:

- name: Install tools using mise and cache them
if: ${{ hashFiles('**/.tool-versions') }}
uses: jdx/mise-action@d53861813ec96de6a7b18548a2c75ba8f6055fbf
with:
version: ${{ inputs.mise-version }}
cache_key: "odin-mise-{{platform}}-{{version}}-{{file_hash}}" # Override the entire cache key
4 changes: 4 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches:
- develop

concurrency:
group: ${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:

lint:
Expand Down
8 changes: 4 additions & 4 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pre-commit 4.2.0
python 3.12.10
poetry 1.8.5
terraform 1.12.2
trivy 0.69.2
tflint 0.61.0
poetry 2.2.1
terraform 1.15.8
trivy 0.71.2
tflint 0.63.1
7 changes: 3 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@
tools used:
- make
- git
- [asdf version manager](https://asdf-vm.com/guide/getting-started.html)
- mise

## first run ...

### install project tools
use asdf to ensure required tools are installed ... configured tools are in [.tool-versions](.tool-versions)
use mise to ensure required tools are installed ... configured tools are in [.tool-versions](.tool-versions)
```bash
cd ~/work/terraform-aws-metrics-lambda
for plugin in $(grep -E '^\w+' .tool-versions | cut -d' ' -f1); do asdf plugin add $plugin; done
asdf install
mise install
```

### setup git-secrets
Expand Down
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,10 @@ check-secrets-all:

check-secrets-history:
scripts/check-secrets.sh history

clean:
rm -rf ./dist

dist: clean
rsync -av ./ --exclude .git --exclude .venv --exclude .idea --exclude .github --exclude .pytest_cache --exclude .ruff_cache --exclude __pycache__ --exclude .mypy_cache --exclude dist --exclude reports --exclude tests --exclude scripts --exclude Makefile --exclude sonar-project.properties --exclude '.*' --exclude '*.md' --exclude '*.yaml' --exclude '*.toml' ./ ./dist
pushd ./dist && zip -r ../dist.zip . && popd
Loading