Skip to content

CI not triggered automatically for dependency update PRs #15

@toshi0806

Description

@toshi0806

問題

dependency-update.yml ワークフローで作成された PR に対して、CI が自動で起動しない。

原因

GitHub の仕様として、GITHUB_TOKEN で作成されたコミットや PR は、無限ループ防止のためワークフローをトリガーしない。

When you use the repository's GITHUB_TOKEN to perform tasks, events triggered by the GITHUB_TOKEN will not create a new workflow run. This prevents you from accidentally creating recursive workflow runs.

参考: https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow

現在の回避策

手動で PR を close/reopen して CI をトリガーしている。

解決策の候補

  1. Personal Access Token (PAT) を使用

    • Secrets に PAT を登録し、PR 作成時に使用
    • 欠点: トークン管理が必要
  2. GitHub App を使用

    • GitHub App を作成し、そのトークンで PR を作成
    • 欠点: 設定が複雑
  3. workflow_run トリガーを使用

    • dependency-update ワークフロー完了後に CI を起動
    • 欠点: ワークフロー構成が複雑になる
  4. pull_request_target トリガーを追加

    • bot 作成の PR でもトリガーされる
    • 欠点: セキュリティ上の注意が必要

影響を受けるリポジトリ

  • tenbin_dns
  • tenbin_ex
  • tenbin_cache
  • tdig
  • その他 dependency-update.yml を使用する全リポジトリ

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions