Skip to content

Commit 05b3c90

Browse files
Actionsのバージョンをコミットハッシュで固定する (#1587)
* Pin dependencies * super-linterのバージョン取得処理修正 --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1 parent 38a7854 commit 05b3c90

File tree

10 files changed

+23
-22
lines changed

10 files changed

+23
-22
lines changed

.github/workflows/add-to-task-list.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- name: Generate a token
1717
id: generate_token
18-
uses: actions/create-github-app-token@v1.11.0
18+
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
1919
with:
2020
app-id: ${{ secrets.PROJECT_AUTOMATION_APP_ID }}
2121
private-key: ${{ secrets.PROJECT_AUTOMATION_PRIVATE_KEY }}

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ jobs:
4141
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
4242
steps:
4343
- name: Checkout repository
44-
uses: actions/checkout@v4
44+
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
4545
# Initializes the CodeQL tools for scanning.
4646
- name: Initialize CodeQL
47-
uses: github/codeql-action/init@v3
47+
uses: github/codeql-action/init@f779452ac5af1c261dce0346a8f964149f49322b # v3
4848
with:
4949
languages: ${{ matrix.language }}
5050
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -56,7 +56,7 @@ jobs:
5656
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
5757
# queries: security-extended,security-and-quality
5858

59-
uses: github/codeql-action/autobuild@v3
59+
uses: github/codeql-action/autobuild@f779452ac5af1c261dce0346a8f964149f49322b # v3
6060
# - run: |
6161
# echo "Run, Build Application using script"
6262
# ./location_of_script_within_repo/buildscript.sh
@@ -66,6 +66,6 @@ jobs:
6666

6767
# If the Autobuild fails above, remove it and uncomment the following three lines.
6868
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
69-
uses: github/codeql-action/analyze@v3
69+
uses: github/codeql-action/analyze@f779452ac5af1c261dce0346a8f964149f49322b # v3
7070
with:
7171
category: "/language:${{matrix.language}}"

.github/workflows/create-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
create-release:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v4.2.1
17+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
1818
- uses: ./
1919
with:
2020
github-token: ${{secrets.GITHUB_TOKEN}}

.github/workflows/format-json-yml.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ jobs:
1919
steps:
2020
- name: Generate a token
2121
id: generate_token
22-
uses: actions/create-github-app-token@v1.11.0
22+
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
2323
with:
2424
app-id: ${{ secrets.PROJECT_AUTOMATION_APP_ID }}
2525
private-key: ${{ secrets.PROJECT_AUTOMATION_PRIVATE_KEY }}
26-
- uses: actions/checkout@v4.2.1
26+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
2727
if: github.event_name != 'pull_request' || github.event.action != 'closed'
2828
with:
2929
fetch-depth: 0

.github/workflows/github-actions-cache-cleaner.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
github-actions-cache-cleaner:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v4.2.1
15+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
1616
- uses: dev-hato/github-actions-cache-cleaner@223f86272059b9654c86deb72176cc3a484668fb # v0.0.55
1717
with:
1818
github-token: ${{secrets.GITHUB_TOKEN}}

.github/workflows/super-linter.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,20 @@ jobs:
3939
# Checkout the code base #
4040
##########################
4141
- name: Checkout Code
42-
uses: actions/checkout@v4.2.1
42+
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
4343
with:
4444
# Full git history is needed to get a proper list
4545
# of changed files within `super-linter`
4646
fetch-depth: 0
47-
- uses: actions/setup-node@v4.0.4
47+
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
4848
with:
4949
cache: npm
5050
- run: bash "${GITHUB_WORKSPACE}/scripts/super_linter/build/set_path.sh"
5151
################################
5252
# Run Linter against code base #
5353
################################
5454
- name: Lint Code Base
55-
uses: super-linter/super-linter/slim@v7.1.0
55+
uses: super-linter/super-linter/slim@b92721f792f381cedc002ecdbb9847a15ece5bb8 # v7.1.0
5656
env:
5757
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5858
DEFAULT_BRANCH: main

.github/workflows/update-gitleaks.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ jobs:
1717
update-gitleaks:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v4.2.1
20+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
2121
if: github.event_name != 'pull_request' || github.event.action != 'closed'
2222
with:
2323
fetch-depth: 0
2424
ref: ${{ github.event.pull_request.head.sha }}
25-
- uses: actions/setup-node@v4.0.4
25+
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
2626
if: github.event_name != 'pull_request' || github.event.action != 'closed'
2727
with:
2828
cache: npm
2929
- name: Install packages
3030
if: github.event_name != 'pull_request' || github.event.action != 'closed'
3131
run: npm ci
32-
- uses: dev-hato/actions-update-gitleaks@v0.0.79
32+
- uses: dev-hato/actions-update-gitleaks@0e9a2d1c25c0acc3108157714109d94ebecbf7cf # v0.0.79
3333
with:
3434
github-token: ${{secrets.GITHUB_TOKEN}}
3535
concurrency:

.github/workflows/update-package.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ jobs:
1818
update-package:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v4.2.1
21+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
2222
if: github.event_name != 'pull_request' || github.event.action != 'closed'
2323
with:
2424
fetch-depth: 0
2525
ref: ${{ github.event.pull_request.head.sha }}
26-
- uses: actions/setup-node@v4.0.4
26+
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
2727
if: github.event_name != 'pull_request' || github.event.action != 'closed'
2828
with:
2929
cache: npm
3030
- if: github.event_name != 'pull_request' || github.event.action != 'closed'
3131
run: npm install
32-
- uses: dev-hato/actions-diff-pr-management@v1.2.0
32+
- uses: dev-hato/actions-diff-pr-management@e5c78b251a69f44f93b2f1398e06b129bcf151ec # v1.2.0
3333
with:
3434
github-token: ${{secrets.GITHUB_TOKEN}}
3535
branch-name-prefix: fix-package

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ runs:
1010
steps:
1111
- name: Increment version
1212
id: increment_version
13-
uses: actions/github-script@v7.0.1
13+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
1414
env:
1515
SHA: ${{ github.sha }}
1616
with:
@@ -20,7 +20,7 @@ runs:
2020
const script = require('${{ github.action_path }}/scripts/action/increment_version.js')
2121
return await script({github, context})
2222
- name: Create release
23-
uses: actions/github-script@v7.0.1
23+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
2424
env:
2525
GITHUB_REF: ${{env.GITHUB_REF}}
2626
TAG_NAME: ${{ steps.increment_version.outputs.result }}
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env bash
22

33
npm ci
4-
action="$(yq '.jobs.build.steps[-1].uses' .github/workflows/super-linter.yml)"
5-
PATH="$(docker run --rm --entrypoint '' "ghcr.io/${action//\/slim@/:slim-}" /bin/sh -c 'echo $PATH')"
4+
tag_name="$(yq '.jobs.build.steps[-1].uses' .github/workflows/super-linter.yml | sed -e 's;/slim@.*;:slim;g')"
5+
tag_version="$(yq '.jobs.build.steps[-1].uses | line_comment' .github/workflows/super-linter.yml)"
6+
PATH="$(docker run --rm --entrypoint '' "ghcr.io/${tag_name}-${tag_version}" /bin/sh -c 'echo $PATH')"
67
echo "PATH=/github/workspace/node_modules/.bin:${PATH}" >>"$GITHUB_ENV"

0 commit comments

Comments
 (0)