LoginSignup
1
0

More than 3 years have passed since last update.

Github Actions の実行結果のブランチ名が変な件

Last updated at Posted at 2020-01-23

Actionsタブを開くと、実行結果の一覧が確認できますが、こちらの表示がちょっと直感的でない、という話です。

前提

masterブランチをプロダクション、stagingブランチをステージングに、それぞれdeploy先を指定して、Github Actionsでdeployしています。

試行A

  • 同じcommit(a4ecff3)までstagingmasterブランチを進めて、同時にpush


スクリーンショット 2020-01-23 12.13.46.png

2つbuild結果が追加されているものの、どちらもmasterになっているが、片方はstagingになっていてほしい…

試行B

  • stagingブランチにpush
  • (少し間をおいて)masterブランチを上記のstagingの先頭(9c7a02b)までリベースして、push


スクリーンショット 2020-01-23 12.01.13.png

矢印部分が本当はmasterになっていてほしい…

結論

pushイベントで実行されているものの、ブランチ名の表示がおかしい。ただし、buildの中でGITHUB_REF#refs/heads/を参照して、ブランチ毎に設定を変えている部分は意図通り動作していたので、大きな問題はないのですが、直感的じゃないな、というお話でした。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0