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

ワークフローを手動で実行できるようにする #1789

Merged
2 commits merged into from Feb 9, 2022
Merged

ワークフローを手動で実行できるようにする #1789

2 commits merged into from Feb 9, 2022

Conversation

ghost
Copy link

@ghost ghost commented Feb 6, 2022

PR の目的

GitHub Actionsワークフローを手動で実行できるようにします。

カテゴリ

  • ビルド関連
    • GitHub Actions

PR の背景

一時的なネットワークトラブルなどの外的要因でCIの実行に失敗することがあります。
こういう時にAppVeyorやAzure Pipelinesでは手動で再実行することができますが、GitHub Actionsではできません。

幸い、2020年7月にworkflow_dispatchイベントとして手動トリガーが実装されているので、ワークフローをこのイベントに対応させて手動実行できるようにしたいです。

PR のメリット

何らかの要因でワークフローが失敗したとき、任意のタイミングで再実行できるようになります。

PR のデメリット (トレードオフとかあれば)

仕様・動作説明

workflow_dispatchイベントに対応させます。
デフォルトブランチのワークフロー設定ファイルにこのイベントへの対応があると、ワークフローの実行一覧ページに「Run workflow」ボタンが表示されて手動実行できるようになります。
なお、このイベントではパス例外は指定できません。
また、デフォルトブランチ以外は当該ブランチのワークフロー設定でイベントに対応している必要があります。

PR の影響範囲

  • GitHub Actions で実行されるすべてのジョブ

テスト内容

PR前にこのブランチをデフォルトブランチに設定して、ボタンが表示され手動実行できることを確認済みです。
https://github.com/kazasaku/sakura/actions/runs/1801203191
https://github.com/kazasaku/sakura/actions/runs/1801203384

関連 issue, PR

#1787

参考資料

2020-07-06付: GitHub Actions: Manual triggers with workflow_dispatch | GitHub Changelog
Manually running a workflow - GitHub Docs

@ghost ghost added the GitHub Actions GitHub Actions関連 label Feb 6, 2022
@ghost ghost marked this pull request as ready for review February 6, 2022 03:59
berryzplus
berryzplus previously approved these changes Feb 6, 2022
Copy link
Contributor

@berryzplus berryzplus left a comment

Choose a reason for hiding this comment

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

細かい指摘してますが、PRとしては賛同します。

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 6, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ghost
Copy link
Author

ghost commented Feb 9, 2022

レビューありがとうございました。マージします。

@ghost ghost merged commit 7f96b2c into sakura-editor:master Feb 9, 2022
@ghost ghost deleted the feature/change_ci_trigger_by_manually_dispatch branch February 9, 2022 00:25
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GitHub Actions GitHub Actions関連
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant