CI/CD周り
はじめに
MatsuribaTech(祭り場Tech) Advent Calendar 2023 の12/12分です
https://qiita.com/advent-calendar/2023/matsuriba-tech
Github Actionsで使えるCI/CDを纏めました.
使えるもの網羅したと思います.
プロダクションで使えそうなもの
AWS Codeシリーズ
https://zenn.dev/issy/articles/zenn-codexx-overview
actions/labeler
Pull Requestに自動的にPRに合ったラベルを付与をしてくれる
https://github.com/actions/labeler
technote-space/assign-author
Issue や Pull Request に Author を自動アサイン
https://github.com/technote-space/assign-author
k1LoW/setup-tbls
DBのテーブル定義書を自動生成する
https://github.com/k1LoW/setup-tbls
reviewdog/reviewdog
lintとかのエラーをprのメッセージにしてくれる
https://github.com/reviewdog/reviewdog
Taskfile
Makeの代替のタスクランナー
https://taskfile.dev/
secretlint/secretlint
APIトークンや秘密鍵などのコミットを防止する
pre-commitに挟むなどして利用
https://github.com/secretlint/secretlint
renovatebot/renovate
依存関係アップデートを自動で検知してPRを出してくれる
https://github.com/renovatebot/renovate
rhysd/actionlint
GitHub Actions のワークフローをチェック
https://github.com/rhysd/actionlint
Codecov
カバレッジ
https://about.codecov.io/
nektos/act
ローカルでGithub Actions実行
https://github.com/nektos/act
rtCamp/action-slack-notify
Slack通知
https://github.com/rtCamp/action-slack-notify
https://zenn.dev/snowcait/articles/903d86d668fcb7
整形後のコードコミット
evilmartians/lefthook
Git hooks manager
https://github.com/evilmartians/lefthook
actions/cache
キャッシュ
https://github.com/actions/cache
actions/upload-artifact
ジョブ内で作成したファイル,ビルド結果をアップロード(ダウンロード版もあり)
https://docs.docker.com/build/ci/github-actions/
Docker Hubにコンテナアップロード
https://tech.gunosy.io/entry/actions_parallel
テスト並列化
https://github.com/imgbot/Imgbot
画像を最適化PR
https://github.com/snyk/cli
脆弱性スキャン
https://docs.docker.com/build/ci/github-actions/manage-tags-labels/
docker image タグ付け
https://zenn.dev/inaniwaudon/articles/09f20fbec91f27
自動pr merge
https://github.com/docker/setup-qemu-action
QEMUバイナリ動かせる dockerコンテナビルドなど
https://github.com/docker/setup-buildx-action
Buildxのgithub actions
https://github.com/googleapis/release-please
CHANGELOG の生成、GitHub リリースの作成、プロジェクトのバージョン バンプを自動化
https://github.com/apps/auto-merge-bot
ラベルが貼られたPRを自動レビュー&マージするBot
個人系
プロダクションには使え無さそうだけど,個人でなら結構使えるモノ.
coderabbitai/ai-pr-reviewer
ChatGPTがPullRequestをレビューしてくれる
https://github.com/coderabbitai/ai-pr-reviewer
https://github.com/oxsecurity/megalinter
super-linter/super-linter
GitHub Action全てのlinterを実行してくれる
https://github.com/super-linter/super-linter
runforesight/workflow-telemetry-action
Github Actionsの監視可視化 CI/CD パイプラインのデバッグ
https://github.com/runforesight/workflow-telemetry-action
appleboy/ssh-action
sshしてくれる
https://github.com/appleboy/ssh-action
redshoga/site-cat-action
LGTMすると後からヨシしてくれる
https://github.com/redshoga/site-cat-action
https://github.com/marketplace/actions/pull-request-analytics
PRのアナリティクス
CIを高速化する技術
https://product.10x.co.jp/entry/2023/12/01/113134
GitHub Actionsで連続pushした時に止めるアレ
https://zenn.dev/katzumi/articles/using-concurrency-at-github-actions
コミットメッセージ自動
https://github.com/di-sukharev/opencommit
言語系
大抵,linterとか各言語用意されているので,それを利用+reviewdogでメッセージ書いてもらうのが一番いい気がする.
一部紹介.
Go
golangci/golangci-lint
Linter
https://github.com/golangci/golangci-lint
Docker
hadolint/hadolint-action
Dockerfile linter
https://github.com/hadolint/hadolint-action
Laravel
Larastan
levelmax
phpstan-strict-rules
bleeding-edge を有効
PHPstan
php-cs-fixer
phpunit
phpinsights
deptrac
https://techblog.roxx.co.jp/entry/2023/05/19/190254
スマホ
https://bitrise.io/