-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
33d3d28
commit 605d74d
Showing
2 changed files
with
42 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: 'Hermit Environment' | ||
description: 'Activate hermit environment' | ||
inputs: | ||
cache: | ||
description: 'Cache hermit files' | ||
required: false | ||
default: 'true' | ||
runs: | ||
using: composite | ||
steps: | ||
- if: ${{ inputs.cache == 'true' }} | ||
id: hermit-hash | ||
shell: bash | ||
run: | | ||
bin_hashes="${{ hashFiles('./bin/*') }}" | ||
poetry_security_polices="${{ hashFiles('./security-policies/poetry.lock', './security-policies/pyproject.toml') }}" | ||
poetry_tests="${{ hashFiles('./tests/poetry.lock', './tests/pyproject.toml') }}" | ||
hash="$(echo "${bin_hashes} ${poetry_security_polices} ${poetry_tests}" | sha256sum | cut -d' ' -f1)" | ||
echo "hash=$hash" >> "$GITHUB_OUTPUT" | ||
- if: ${{ inputs.cache == 'true' }} | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cache/hermit/pkg | ||
./.hermit | ||
~/.cache/go-build | ||
~/go/pkg/ | ||
key: hermit-env-${{ runner.os }}-${{ steps.hermit-hash.outputs.hash }} | ||
restore-keys: | | ||
hermit-env-${{ runner.os }} | ||
- shell: bash | ||
run: ./bin/hermit env --raw >> "$GITHUB_ENV" | ||
- shell: bash | ||
run: hermit install | ||
- shell: bash | ||
run: go env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters