-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Context
The shfmt job downloads the shfmt binary on every CI run, taking 10-15 seconds.
Problem
Redundant downloads: Binary is downloaded fresh every time:
- name: Install shfmt
run: |
wget -O shfmt https://github.com/mvdan/sh/releases/download/v3.7.0/shfmt_v3.7.0_linux_amd64
chmod +x shfmt
sudo mv shfmt /usr/local/bin/Impact: Wasted CI time and bandwidth (minor but avoidable)
Recommended Solution
Add GitHub Actions caching:
- name: Cache shfmt binary
uses: actions/cache@v4
id: cache-shfmt
with:
path: ~/.local/bin/shfmt
key: shfmt-v3.7.0-${{ runner.os }}
- name: Install shfmt
if: steps.cache-shfmt.outputs.cache-hit \!= 'true'
run: |
mkdir -p ~/.local/bin
wget -O ~/.local/bin/shfmt https://github.com/mvdan/sh/releases/download/v3.7.0/shfmt_v3.7.0_linux_amd64
chmod +x ~/.local/bin/shfmt
- name: Add shfmt to PATH
run: echo "$HOME/.local/bin" >> $GITHUB_PATHBenefits
- Time savings: 10-15 seconds per CI run (on cache hit)
- Bandwidth reduction: Download only when version changes
- Cost efficiency: Marginal but good practice
Storage Impact
~10MB cached binary (negligible)
Estimated Effort
10-15 minutes (simple YAML change)
Priority
Low - Nice optimization, not critical
References
- Agent: devops-deployment-agent (recommended this optimization)
- File:
.github/workflows/shell-quality.yml
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request