Skip to content
gha-sha-reference logo

GitHub Actions SHA Reference Skill

gha-sha-reference

ユーザーがGitHub Actionsのタグ参照をSHA参照に変換するよう要求したときに発動してください。uses:フィールドのタグ参照を自動的にSHA参照(コミットハッシュ + コメント付きバージョン)に変換します。

SKILL.md

Full skill instructions

GitHub Actions SHA Reference Skill

目的

このスキルはGitHub Actionsワークフローファイル内のuses:フィールドで使用されているタグ参照(例: @v4)を、セキュリティのベストプラクティスに従ってSHA参照(例: @11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2)に自動変換します。

使用タイミング

<trigger>

以下の場合にこのスキルを発動してください:

  • ユーザーが「GitHub ActionsをSHA参照に変換して」と要求したとき
  • ユーザーが「actionsのusesをSHAに書き換えて」と言及したとき

</​trigger>

実行手順

<procedure>

1. 変更対象を確認

まず --check --diff オプションで、どのファイルが変更されるかを確認します:

pinact run --check --diff

出力例:

ERROR action isn't pinned
.github/​workflows/​ci.yaml:10
-       uses: actions/​checkout@v4
+       uses: actions/​checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
ERROR action isn't pinned
.github/​workflows/​ci.yaml:11
-     - uses: actions/​setup-go@v4
+     - uses: actions/​setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
ERROR action isn't pinned
.github/​workflows/​deploy.yaml:15
-       uses: actions/​checkout@v4
+       uses: actions/​checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0

2. 変換を実行

確認後、pinact run を実行してすべての対象ファイルを一括変換します:

pinact run

pinactは以下を自動的に行います:

  • タグ参照からコミットSHAを取得
  • 最も詳細なバージョンタグ(v4.3.0など)をコメントとして追加
  • .github/​workflows/​*.{yml,yaml} と action.{yml,yaml} を自動検出して変換

</​procedure>

実装例

<examples>

例1: 基本的な使用方法

<example>

ステップ1: 変更対象を確認:

pinact run --check --diff

出力:

ERROR action isn't pinned
.github/​workflows/​ci.yaml:10
-       uses: actions/​checkout@v4
+       uses: actions/​checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
ERROR action isn't pinned
.github/​workflows/​ci.yaml:11
-     - uses: actions/​setup-go@v4
+     - uses: actions/​setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0

ステップ2: 変換を実行:

pinact run

変換後のワークフローファイル (.github/​workflows/​ci.yaml):

name: CI
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/​checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
      - uses: actions/​setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0

</​example>

</​examples>

重要な注意事項

<important>

すべきこと

  • pinactを使用: GitHub Actions SHA参照変換には専用ツールpinactを使用する
  • まず --check --diff で確認: pinact run --check --diff で変更対象を確認する
  • 一括実行: diffで確認した後、pinact run で全ファイルを一括変換する
  • 変換結果を報告: 何が変換されたかユーザーに伝える

してはいけないこと

  • カスタムスクリプトを作成: pinactという専用ツールがあるので、独自スクリプトは不要
  • いきなり実行: --check --diff で確認せずに pinact run を実行しない
  • エラーを無視: pinactの実行でエラーが出た場合は、そのまま進めずユーザーに報告する

実行前チェックリスト

  • pinactがインストールされている(pinact --versionで確認)
  • pinact run --check --diff で変更対象を確認した
  • diffの出力から変換対象のファイル一覧を把握した

</​important>

参考リンク

More DevOps & CI/CD skills

Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.

6K 472.6K
View

Set up tracing, logging, and monitoring for deployed ADK agents across Cloud Trace, BigQuery, and third-party platforms.

6K 472.6K
View

Enterprise Azure infrastructure architect generating Bicep or Terraform from workload descriptions.

1.5K 454.3K
View
azure-kubernetes logo
DevOps & CI/CD

azure-kubernetes

Plan and configure production-ready Azure Kubernetes Service clusters with Day-0 and Day-1 best practices.

1.5K 447.1K
View

Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.

92.7K 354.9K
View
just-scrape logo
DevOps & CI/CD

just-scrape

Web search, scraping, extraction, crawling, and monitoring via ScrapeGraph AI CLI.

69 245K
View

Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.

462 159.7K
View

Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.

462 159.1K
View
deploy-to-vercel logo
DevOps & CI/CD

deploy-to-vercel

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

31.9K 146.6K
View
programmatic-seo logo
DevOps & CI/CD

programmatic-seo

Build SEO-optimized pages at scale using templates, data, and proven playbook patterns.

53.3K 140.1K
View

Design and build isolated, reusable Convex backend components with clear boundaries and app-facing wrappers.

63 123.5K
View

Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".

31.9K 116.1K
View

Coding & apps AI tools

Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View
I
Coding & apps

Imagica

Build a no-code AI app in minutes.

Freemium
View
E
Coding & apps

Emergent.sh

An IDE for code migration from legacy to modern frameworks through coding agents.

Freemium
View
Wonder Dynamics logo
Coding & apps

Wonder Dynamics

Automate CGI animation in live-action scenes

Paid
View
M
Coding & apps

Mixo

Launch a website in seconds with AI.

Paid
View
AI Code Convert logo
Coding & apps

AI Code Convert

Streamline Your Coding Experience with AI Code Helper

Free
View