Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: botが作成したPullRequestではskipする #13

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/secrets-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
jobs:
filter:
runs-on: ubuntu-latest
if: ${{ !contains(github.actor, '[bot]') }} # [bot]を含む場合は除外する
Copy link
Contributor Author

@mutao-net mutao-net Jan 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

worflowをトリガーした username に [bot] が含まれていたらskipさせます。

GitHub.com のユーザー アカウントのユーザー名には、英数字とダッシュ ( -) のみを含めることができます。

https://docs.github.com/en/enterprise-cloud@latest/admin/identity-and-access-management/iam-configuration-reference/username-considerations-for-external-authentication

とのことなので一般ユーザーは [] を含むusername を設定できません。
renovate depandabot ... のように列挙せず [bot] を含むかどうかのみで判定しています。

outputs:
workdirs: ${{ steps.dirs.outputs.workdirs }}
steps:
Expand All @@ -29,6 +30,7 @@ jobs:
scan:
needs: filter
runs-on: ubuntu-latest
if: ${{ !contains(github.actor, '[bot]') }} # [bot]を含む場合は除外する
strategy:
matrix:
workdir: ${{ fromJSON(needs.filter.outputs.workdirs) }}
Expand Down