File tree Expand file tree Collapse file tree
.github/actions/setup-zizmor-config Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 - name : Ensure default zizmor.yml
77 shell : bash
88 run : |
9- if [[ ! -f zizmor.yml || $(wc -l < zizmor.yml) -eq 1 ]]; then
9+ # Create zizmor config if missing
10+ if [[ ! -f zizmor.yml ]]; then
1011 echo "Creating a custom zizmor.yml configuration file for CI..."
11- cat > zizmor.yml << 'EOF'
12- rules:
13- dependabot-cooldown:
14- disable: true
15- unpinned-uses:
16- config:
17- policies:
18- MiraGeoscience/*: any
19- EOF
20- else
21- echo "⊘ Found existing zizmor.yml configuration file"
12+ echo $'rules:\n' > zizmor.yml
2213 fi
14+
15+ # Patch (merge) with extra config
16+ echo "Patching zizmor.yml configuration file for CI..."
17+ yq -i '
18+ .rules |= (. // {}) |
19+ .rules."dependabot-cooldown" |= (. // {}) |
20+ .rules."dependabot-cooldown".disable |= true |
21+ .rules."unpinned-uses" |= (. // {}) |
22+ .rules."unpinned-uses".config |= (. // {}) |
23+ .rules."unpinned-uses".config.policies |= (. // {}) |
24+ .rules."unpinned-uses".config.policies."MiraGeoscience/*" |= "ref-pin"
25+ ' zizmor.yml
You can’t perform that action at this time.
0 commit comments