Skip to content

Commit 61a0042

Browse files
committed
build: cache only after editorconfig-checker has been downloaded
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent bd0050a commit 61a0042

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/lint_changed_files.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ jobs:
7272
node-version: '20' # 'lts/*'
7373
timeout-minutes: 5
7474

75-
# Cache dependencies:
76-
- name: 'Cache dependencies'
75+
# Restore cache if up-to-date:
76+
- name: 'Restore cache if up-to-date'
7777
# Pin action to full length commit SHA
78-
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
78+
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
7979
id: cache
8080
with:
8181
path: |
@@ -135,6 +135,14 @@ jobs:
135135
run: |
136136
make lint-editorconfig-files EDITORCONFIG_FORMAT=github-actions FILES="${{ steps.changed-files.outputs.files }}"
137137
138+
# Save cache after editorconfig-checker binary has been downloaded:
139+
- name: 'Save cache after editorconfig-checker binary has been downloaded'
140+
if: always() && steps.cache.outputs.cache-hit != 'true'
141+
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
142+
with:
143+
path: ${{ github.workspace }}/node_modules
144+
key: ${{ steps.cache.outputs.cache-primary-key }}
145+
138146
# Lint Markdown files:
139147
- name: 'Lint Markdown files'
140148
if: success() || failure()

0 commit comments

Comments
 (0)