-
Notifications
You must be signed in to change notification settings - Fork 2
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
GitHub Issue を作成する reusable workflow を作成する #73
Conversation
f546ea9
to
5dc94d1
Compare
2184fd8
to
0b60a37
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ありがとうございます!コメントしました!
# jobs: | ||
# create_issue: | ||
# uses: route06/actions/.github/workflows/create_gh_issue.yml@v2 | ||
# permissions: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
後学の意図も含んだ質問なのですが、permissionsは外側で制御できたほうがよいのでしょうか?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
内側で指定したかったんですが、内側のジョブで外側以上の permissions を設定するとエラーになってしまいました。
🔗 https://github.com/masutaka/sandbox/actions/runs/10829117246
The workflow is not valid. .github/workflows/create_issue.yml (Line: 15, Col: 3): Error calling workflow 'route06/actions/.github/workflows/create_gh_issue.yml@create-issue-workflow'. The nested job 'create_issue' is requesting 'issues: write', but is only allowed 'issues: none'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ほぇ〜〜〜ありがとうございます!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ありがとござましたー!!!
変更概要
動作確認
備考
当初 5dc94d1 は JasonEtco/create-an-issue Action を使いましたが、よく考えたら gh CLI で十分だったので、 0b60a37 でリファクタリングしました。
JasonEtco/create-an-issue はテンプレート中で、環境変数や変数を使えることがメリットですが(下記参照)、一旦シンプルな実装にしました。
🔗 https://github.com/JasonEtco/create-an-issue/tree/56fdd2d6f960e970fa9d5ca3cf3884b6ba5af477?tab=readme-ov-file#usage