0
0

Self-hosted GitHub Actions runners in AWS CodeBuild

Posted at

Actions について。

CodeBuild がサポート開始したということで試す。

Trigger の設定が機能するのかが確認したいポイント。filter で build の起動を制御したい。

tl;dr

  • filter の動きは検証中。正常に動いている場合と、怪しい場合がある。要経過観察。
  • その他の Actions 自体の動作に違和感はない。

CodeBuild との連携

Workflow

  • runs-on 1 の設定変更が必要。
    • myProject の部分に build project name を設定する。Actions と連携する build project であることを認識させる。
    • これが間違っていると、GitHub 側の Webhook が失敗する。
name: Hello World
on: [push]
jobs:
  Hello-World-Job:
    runs-on: codebuild-myProject-${{ github.run_id }}-${{ github.run_attempt }}    # Add
    steps:
      - run: echo "Hello World!"

プッシュが特定のファイルに影響を与える場合にのみワークフローを実行する 2

  • Actions の実行履歴を見る限り、 paths filter に指定しているものに反応している。
  • branches filter を追加して様子を見る。

Console

  • WORKFLOW_JOB_QUEUED を選択する。

webhook event

Conclusion

9連休に突入した。

会社の有給取得義務を満たすためやむを得ず。

暇なので、休み中に読める本を探している。最近これといって読みたい本が無い。

「テスト自動化実践ガイド」に興味があるが、買う前に中身に少し目を通したい気持ちもある。

「ドメイン駆動設計をはじめよう」にも興味がある。こちらは、意訳が強すぎて、 DDD ではなく別物になっているという話を聞く。

8月末に数冊、興味のあるタイトルが発売されるため、それを待てという話ではある。

  1. https://docs.github.com/ja/actions/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job

  2. https://docs.github.com/ja/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#running-your-workflow-only-when-a-push-affects-specific-files

0
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
0
0