Skip to content

ci: pin actions to commit SHAs#5771

Open
yoshinorin wants to merge 1 commit intomasterfrom
chore/ci/pinned-version
Open

ci: pin actions to commit SHAs#5771
yoshinorin wants to merge 1 commit intomasterfrom
chore/ci/pinned-version

Conversation

@yoshinorin
Copy link
Copy Markdown
Member

@yoshinorin yoshinorin commented May 7, 2026

What does it do?

Pin all GitHub Actions in workflows to commit SHAs (with version comments) for supply-chain safety.

Initially I planned to pin only third-party actions. However, mixing pinned and unpinned references across the same workflow files would be confusing.

To keep things consistent and reviewable, I decided to pin every uses: reference, including the official actions ones. Dependabot will automatically open update PRs for the pinned SHAs, so the ongoing maintenance cost stays low once this is set up.

Screenshots

N/A

Pull request tasks

  • Add test cases for the changes.
  • Passed the CI test.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

How to test

git clone -b chore/ci/pinned-version https://github.com/hexojs/hexo.git
cd hexo
npm install
npm test

fail-fast: false
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #6.0.2
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #6.0.2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e #6.4.0
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run: node test/benchmark.js --profiling
- name: Publish flamegraph to https://${{ github.sha }}-${{ matrix.node-version }}-hexo.surge.sh/flamegraph.html
uses: dswistowski/surge-sh-action@v1
uses: dswistowski/surge-sh-action@2ef23bb28f7240e4922a44df1807022af43782bf #1.1.0
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

echo "https://${{ github.sha }}-${{ matrix.node-version }}-hexo.surge.sh/flamegraph.html" > ${{env.comment_file}}

- uses: actions/upload-artifact@v7
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a #7.0.1
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

steps:
- name: Comment PR - How to test
uses: marocchino/sticky-pull-request-comment@v3
uses: marocchino/sticky-pull-request-comment@0ea0beb66eb9baf113663a64ec522f60e49231c0 #3.0.4
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- name: Comment PR - flamegraph
if: ${{env.pr_number!=''}}
uses: marocchino/sticky-pull-request-comment@v3
uses: marocchino/sticky-pull-request-comment@0ea0beb66eb9baf113663a64ec522f60e49231c0 #3.0.4
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI: true
- name: Coveralls
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b #2.3.6
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coveralls
Copy link
Copy Markdown

Coverage Report for CI Build 25502740606

Coverage remained the same at 99.501%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 10018
Covered Lines: 9968
Line Coverage: 99.5%
Relevant Branches: 2538
Covered Branches: 2440
Branch Coverage: 96.14%
Branches in Coverage %: No
Coverage Strength: 59.36 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants