Skip to content

Commit 4255e9a

Browse files
Merge pull request #1294 from peacock0803sz/pinact
feat(gha): Enforce commit-ish references in the GitHub Actions
2 parents 6bd544a + 042d92b commit 4255e9a

File tree

7 files changed

+34
-13
lines changed

7 files changed

+34
-13
lines changed

.github/workflows/auto-merge-dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
if: github.actor == 'dependabot[bot]'
1313
steps:
1414
- id: metadata
15-
uses: dependabot/fetch-metadata@v2
15+
uses: dependabot/fetch-metadata@08eff52bf64351f401fb50d4972fa95b9f2c2d1b # v2.4.0
1616
with:
1717
github-token: "${{ secrets.GITHUB_TOKEN }}"
1818

.github/workflows/check-and-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout your repository using git
13-
uses: actions/checkout@v5
13+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
1414
- name: Setup pnpm
15-
uses: pnpm/[email protected]
15+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
1616
- name: Install dependencies
1717
run: pnpm i --frozen-lockfile
1818
- name: Run ESLint

.github/workflows/check-article.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ jobs:
1616
permissions:
1717
issues: 'write'
1818
steps:
19-
- uses: 'actions/checkout@v5'
19+
- uses: 'actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd' # v5.0.1
2020
with:
2121
ref: 'main'
2222
- name: 'Report'
23-
uses: 'actions/github-script@v8'
23+
uses: 'actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd' # v8.0.0
2424
env:
2525
DATE: '${{ inputs.date }}'
2626
with:

.github/workflows/check-pinact.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
on:
2+
pull_request:
3+
paths:
4+
- ".github/**/*.yml"
5+
- ".github/**/*.yaml"
6+
7+
permissions:
8+
pull-requests: write
9+
10+
jobs:
11+
pinact:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
15+
with:
16+
persist-credentials: false
17+
18+
- name: Check GitHub Actions with pinact
19+
uses: suzuki-shunsuke/pinact-action@49cbd6acd0dbab6a6be2585d1dbdaa43b4410133 # v1.0.0
20+
with:
21+
skip_push: "true"

.github/workflows/deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout your repository using git
20-
uses: actions/checkout@v5
20+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
2121
- name: Install, build, and upload your site
22-
uses: withastro/action@v5
22+
uses: withastro/action@9811f9299d5d37ca0416ca85cee333c7c9485cd1 # v5.0.1
2323
env:
2424
TZ: 'Asia/Tokyo'
2525

@@ -32,4 +32,4 @@ jobs:
3232
steps:
3333
- name: Deploy to GitHub Pages
3434
id: deployment
35-
uses: actions/deploy-pages@v4
35+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5

.github/workflows/retry-update-article.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
permissions:
1414
actions: 'write'
1515
steps:
16-
- uses: 'actions/github-script@v8'
16+
- uses: 'actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd' # v8.0.0
1717
with:
1818
script: |
1919
github.rest.actions.reRunWorkflowFailedJobs({

.github/workflows/update-article.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ jobs:
1919
permissions:
2020
issues: 'write'
2121
steps:
22-
- uses: 'actions/checkout@v5'
22+
- uses: 'actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd' # v5.0.1
2323
with:
2424
ref: 'main'
2525
ssh-key: '${{ secrets.ARTICLE_DEPLOY_KEY }}'
26-
- uses: 'denoland/setup-deno@v2'
26+
- uses: 'denoland/setup-deno@e95548e56dfa95d4e1a28d6f422fafe75c4c26fb' # v2.0.3
2727
with:
2828
deno-version: 'v2.0.0'
2929
- name: 'Run script'
@@ -52,7 +52,7 @@ jobs:
5252
echo "COMMIT_HASH=$(git rev-parse HEAD)" >> "${GITHUB_OUTPUT}"
5353
git push
5454
- name: 'Report'
55-
uses: 'actions/github-script@v8'
55+
uses: 'actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd' # v8.0.0
5656
env:
5757
SCRIPT_RESULT: '${{ steps.script.outputs.RESULT }}'
5858
COMMIT_HASH: '${{ steps.push.outputs.COMMIT_HASH }}'
@@ -102,7 +102,7 @@ jobs:
102102
permissions:
103103
actions: 'write'
104104
steps:
105-
- uses: 'actions/github-script@v8'
105+
- uses: 'actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd' # v8.0.0
106106
with:
107107
script: |
108108
github.rest.actions.createWorkflowDispatch({

0 commit comments

Comments
 (0)