Skip to content

Commit 6224b92

Browse files
ci: pin third-party GitHub Actions to verified release SHAs
1 parent 4265284 commit 6224b92

3 files changed

Lines changed: 15 additions & 5 deletions

File tree

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,17 @@ 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 # v47.0.6
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"
2838
with:
2939
files: |
3040
**/*.md
@@ -34,7 +44,7 @@ jobs:
3444
- name: Check Broken Links in Changed Markdown Files
3545
id: lychee-check-pr
3646
if: github.event_name == 'pull_request' && steps.changed-markdown-files.outputs.any_changed == 'true'
37-
uses: lycheeverse/lychee-action@v2.8.0
47+
uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2.8.0
3848
with:
3949
args: >
4050
--verbose --no-progress --exclude ^https?://
@@ -47,7 +57,7 @@ jobs:
4757
- name: Check Broken Links in All Markdown Files in Entire Repo (Manual Trigger)
4858
id: lychee-check-manual
4959
if: github.event_name == 'workflow_dispatch'
50-
uses: lycheeverse/lychee-action@v2.8.0
60+
uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2.8.0
5161
with:
5262
args: >
5363
--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
@@ -102,7 +102,7 @@ jobs:
102102
github.event_name == 'pull_request' &&
103103
github.event.pull_request.head.repo.fork == false &&
104104
env.skip_tests == 'false'
105-
uses: MishaKav/pytest-coverage-comment@26f986d2599c288bb62f623d29c2da98609e9cd4 # v1.6.0
105+
uses: MishaKav/pytest-coverage-comment@e48ae95fa406cefacc7fbdd79949122795569961 # v1.8.0
106106
with:
107107
pytest-xml-coverage-path: coverage.xml
108108
junitxml-path: pytest.xml

0 commit comments

Comments
 (0)