Skip to content

Commit 2c1fa27

Browse files
authored
Merge pull request #59 from nanasess/feature/sha-pin
ci: GitHub Actions を commit SHA でピン固定(サプライチェーン対策)
2 parents 17e54d0 + d6771a3 commit 2c1fa27

7 files changed

Lines changed: 32 additions & 32 deletions

File tree

.github/workflows/benchmark-manual.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ jobs:
4444

4545
steps:
4646
- name: Checkout code
47-
uses: actions/checkout@v4
47+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
4848

4949
- name: Setup PHP
50-
uses: shivammathur/setup-php@v2
50+
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # v2
5151
with:
5252
php-version: ${{ matrix.php-version }}
5353
extensions: bcmath
@@ -87,7 +87,7 @@ jobs:
8787
echo "performance_ratio=$RATIO" >> $GITHUB_OUTPUT
8888
8989
- name: Upload benchmark artifacts
90-
uses: actions/upload-artifact@v4
90+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
9191
with:
9292
name: benchmark-results-php${{ matrix.php-version }}
9393
path: |
@@ -136,7 +136,7 @@ jobs:
136136
137137
- name: Post results to PR
138138
if: github.event_name == 'workflow_dispatch' && github.event.inputs.post_comment == 'true' && github.event.inputs.pr_number
139-
uses: actions/github-script@v8
139+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
140140
with:
141141
script: |
142142
const fs = require('fs');

.github/workflows/benchmark-on-merge.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ jobs:
1818

1919
steps:
2020
- name: Checkout code
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
2222
with:
2323
ref: main
2424
fetch-depth: 0
2525

2626
- name: Setup PHP
27-
uses: shivammathur/setup-php@v2
27+
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # v2
2828
with:
2929
php-version: '8.2'
3030
extensions: bcmath
@@ -96,7 +96,7 @@ jobs:
9696
echo "EOF" >> $GITHUB_OUTPUT
9797
9898
- name: Post benchmark results to PR
99-
uses: actions/github-script@v8
99+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
100100
with:
101101
script: |
102102
const fs = require('fs');

.github/workflows/benchmark-pr.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ jobs:
3838
fi
3939
4040
- name: Checkout PR
41-
uses: actions/checkout@v4
41+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
4242
with:
4343
# Checkout the PR branch for pull_request events
4444
# For issue_comment events, checkout the PR's head
4545
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || '' }}
4646

4747
- name: Fetch PR details for comment trigger
4848
if: github.event_name == 'issue_comment'
49-
uses: actions/github-script@v8
49+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
5050
id: pr_details
5151
with:
5252
script: |
@@ -60,12 +60,12 @@ jobs:
6060
6161
- name: Checkout PR for comment trigger
6262
if: github.event_name == 'issue_comment'
63-
uses: actions/checkout@v4
63+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
6464
with:
6565
ref: ${{ steps.pr_details.outputs.head_sha }}
6666

6767
- name: Setup PHP
68-
uses: shivammathur/setup-php@v2
68+
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # v2
6969
with:
7070
php-version: '8.2'
7171
extensions: bcmath
@@ -97,7 +97,7 @@ jobs:
9797
echo "performance_ratio=$RATIO" >> $GITHUB_OUTPUT
9898
9999
- name: Find existing comment
100-
uses: peter-evans/find-comment@v3
100+
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3
101101
id: fc
102102
with:
103103
issue-number: ${{ steps.pr.outputs.number }}
@@ -152,7 +152,7 @@ jobs:
152152
# to avoid issues with multiline strings
153153
154154
- name: Create or update comment
155-
uses: peter-evans/create-or-update-comment@v5
155+
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5
156156
with:
157157
comment-id: ${{ steps.fc.outputs.comment-id }}
158158
issue-number: ${{ steps.pr.outputs.number }}

.github/workflows/ci.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v5
13+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
1414
- name: Install dependencies
15-
uses: php-actions/composer@v6
15+
uses: php-actions/composer@8a65f0d3c6a1d17ca4800491a40b5756a4c164f3 # v6
1616
with:
1717
php_version: '8.1'
1818
- name: Run PHP-CS-Fixer
@@ -24,13 +24,13 @@ jobs:
2424
runs-on: ubuntu-latest
2525
steps:
2626
- name: Checkout
27-
uses: actions/checkout@v5
27+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
2828
- name: Install dependencies
29-
uses: php-actions/composer@v6
29+
uses: php-actions/composer@8a65f0d3c6a1d17ca4800491a40b5756a4c164f3 # v6
3030
with:
3131
php_version: '8.1'
3232
- name: Run PHPStan
33-
uses: php-actions/phpstan@v3
33+
uses: php-actions/phpstan@d8f8887acaac249b05ac11909c4cdbb018f52211 # v3
3434
with:
3535
php_version: '8.1'
3636

@@ -41,9 +41,9 @@ jobs:
4141
runs-on: ${{ matrix.os }}
4242
steps:
4343
- name: Checkout
44-
uses: actions/checkout@v5
44+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
4545
- name: Setup PHP
46-
uses: shivammathur/setup-php@v2
46+
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # v2
4747
with:
4848
php-version: ${{ matrix.php-version }}
4949
- name: Composer Install
@@ -63,9 +63,9 @@ jobs:
6363
runs-on: ubuntu-latest
6464
steps:
6565
- name: Checkout
66-
uses: actions/checkout@v5
66+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
6767
- name: Setup PHP
68-
uses: shivammathur/setup-php@v2
68+
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # v2
6969
with:
7070
php-version: ${{ matrix.php-version }}
7171
extensions: :bcmath # ubuntu only
@@ -85,9 +85,9 @@ jobs:
8585
runs-on: ubuntu-latest
8686
steps:
8787
- name: Checkout
88-
uses: actions/checkout@v5
88+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
8989
- name: Checkout php-src repository
90-
uses: actions/checkout@v5
90+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
9191
with:
9292
repository: php/php-src
9393
path: php-src

.github/workflows/claude-code-review.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ jobs:
2727

2828
steps:
2929
- name: Checkout repository
30-
uses: actions/checkout@v5
30+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
3131
with:
3232
fetch-depth: 1
3333

3434
- name: Run Claude Code Review
3535
id: claude-review
36-
uses: anthropics/claude-code-action@v1
36+
uses: anthropics/claude-code-action@787c5a0ce96a9a6cfb050ea0c8f4c05f2447c251 # v1
3737
with:
3838
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
3939
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'

.github/workflows/claude.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ jobs:
2929
actions: read # Required for Claude to read CI results on PRs
3030
steps:
3131
- name: Checkout repository
32-
uses: actions/checkout@v5
32+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
3333
with:
3434
fetch-depth: 1
3535

3636
- name: Run Claude Code
3737
id: claude
38-
uses: anthropics/claude-code-action@v1
38+
uses: anthropics/claude-code-action@787c5a0ce96a9a6cfb050ea0c8f4c05f2447c251 # v1
3939
with:
4040
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
4141

.github/workflows/rector.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,25 @@ jobs:
1111
steps:
1212
-
1313
if: github.event.pull_request.head.repo.full_name == github.repository
14-
uses: actions/checkout@v5
14+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
1515
with:
1616
# Must be used to trigger workflow after push
1717
token: ${{ secrets.ACCESS_TOKEN }}
1818

1919
-
20-
uses: shivammathur/setup-php@v2
20+
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # v2
2121
with:
2222
php-version: 8.1
2323
coverage: none
2424

25-
- uses: "ramsey/composer-install@v3"
25+
- uses: "ramsey/composer-install@a8d0d959dab41457692a5e2041bd9b757a119e3f" # v3
2626

2727
- run: vendor/bin/rector --ansi
2828
# @todo apply coding standard if used
2929

3030
-
3131
# commit only to core contributors who have repository access
32-
uses: stefanzweifel/git-auto-commit-action@v6
32+
uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0 # v6
3333
with:
3434
commit_message: '[rector] Rector fixes'
3535
commit_author: 'GitHub Action <actions@github.com>'

0 commit comments

Comments
 (0)