Skip to content

Commit 154fe4e

Browse files
ci: pin third-party GitHub Actions to verified release SHAs
1 parent cd4b24e commit 154fe4e

3 files changed

Lines changed: 15 additions & 8 deletions

File tree

.github/workflows/broken-links-checker.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,24 @@ jobs:
2424
- name: Get changed markdown files (PR only)
2525
id: changed-markdown-files
2626
if: github.event_name == 'pull_request'
27-
uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v46
28-
with:
29-
files: |
30-
**/*.md
27+
env:
28+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
29+
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
30+
run: |
31+
changed_files=$(git diff --name-only --diff-filter=ACMR "$BASE_SHA" "$HEAD_SHA" -- '*.md' | tr '\n' ' ' | sed 's/ *$//')
32+
if [ -n "$changed_files" ]; then
33+
echo "any_changed=true" >> "$GITHUB_OUTPUT"
34+
else
35+
echo "any_changed=false" >> "$GITHUB_OUTPUT"
36+
fi
37+
echo "all_changed_files=$changed_files" >> "$GITHUB_OUTPUT"
3138
3239
3340
# For PR: Check broken links only in changed files
3441
- name: Check Broken Links in Changed Markdown Files
3542
id: lychee-check-pr
3643
if: github.event_name == 'pull_request' && steps.changed-markdown-files.outputs.any_changed == 'true'
37-
uses: lycheeverse/lychee-action@v2.8.0
44+
uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2.8.0
3845
with:
3946
args: >
4047
--verbose --no-progress --exclude ^https?://
@@ -47,7 +54,7 @@ jobs:
4754
- name: Check Broken Links in All Markdown Files in Entire Repo (Manual Trigger)
4855
id: lychee-check-manual
4956
if: github.event_name == 'workflow_dispatch'
50-
uses: lycheeverse/lychee-action@v2.8.0
57+
uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2.8.0
5158
with:
5259
args: >
5360
--verbose --no-progress --exclude ^https?://

.github/workflows/pr-title-checker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ jobs:
1717
runs-on: ubuntu-latest
1818
if: ${{ github.event_name != 'merge_group' }}
1919
steps:
20-
- uses: amannn/action-semantic-pull-request@v6
20+
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
2121
env:
2222
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ jobs:
123123
github.event_name == 'pull_request' &&
124124
github.event.pull_request.head.repo.fork == false &&
125125
env.skip_backend_tests == 'false'
126-
uses: MishaKav/pytest-coverage-comment@26f986d2599c288bb62f623d29c2da98609e9cd4 # v1.6.0
126+
uses: MishaKav/pytest-coverage-comment@e48ae95fa406cefacc7fbdd79949122795569961 # v1.8.0
127127
with:
128128
pytest-xml-coverage-path: src/coverage.xml
129129
junitxml-path: src/pytest.xml

0 commit comments

Comments
 (0)