Skip to content

Commit 512f8a1

Browse files
committed
Add Zizmor linting
Disable hook
1 parent a9aee67 commit 512f8a1

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

.pre-commit-config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ repos:
99
- id: check-json
1010
types: [text]
1111
files: \.(json|ipynb)$
12+
# - repo: https://github.com/zizmorcore/zizmor-pre-commit
13+
# rev: v1.23.1
14+
# hooks:
15+
# - id: zizmor
1216
- repo: https://github.com/rbubley/mirrors-prettier # Update mirror as official mirror is deprecated
1317
rev: v3.6.2
1418
hooks:

create-and-cache/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,12 @@ runs:
2727
- name: Get cache key
2828
id: cache-key
2929
shell: bash
30+
env:
31+
PIXI_VERSION: ${{ inputs.pixi-version }}
32+
HASH_FILES: ${{ hashFiles(inputs.hash-files) }}
3033
run: |
3134
today=$(date +'%Y-%m-%d')
32-
key="pixi-lock_${{ inputs.pixi-version }}_${{ hashFiles(inputs.hash-files) }}_${today}"
35+
key="pixi-lock_${PIXI_VERSION}_${HASH_FILES}_${today}"
3336
echo "key=${key}" >> "$GITHUB_OUTPUT"
3437
3538
- name: Restore pixi.lock from cache

restore/action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,21 @@ runs:
1111
steps:
1212
- name: Check cache-key
1313
shell: bash
14+
env:
15+
CACHE_KEY: ${{ inputs.cache-key }}
1416
run: |
15-
if [[ -z "${{ inputs.cache-key }}" ]]; then
17+
if [[ -z "${CACHE_KEY}" ]]; then
1618
echo "::error::cache-key cannot be an empty string"
1719
exit 1
1820
fi
1921
2022
- name: Calculate fallback key
2123
id: fallback
2224
shell: bash
25+
env:
26+
CACHE_KEY: ${{ inputs.cache-key }}
2327
run: |
24-
cache_key="${{ inputs.cache-key }}"
28+
cache_key="${CACHE_KEY}"
2529
# Extract base (everything before the last _) and date (after the last _)
2630
base="${cache_key%_*}"
2731
current_date="${cache_key##*_}"

0 commit comments

Comments
 (0)