🔘
circle ciとgithub workflowの違い
できること
CircleCI
リポジトリと連携して、テストやデプロイなどジョブを別々のコンテナまたは仮想マシンで実行します。githubだけでなく、bitbucketなどとも連携できるのが特徴です。
コンテナの例
- docker
cimgから始まるイメージが提供されている。
https://hub.docker.com/u/cimg
以下はnodeのコンテナ内で、npm ciを実行する例
jobs:
build:
docker:
- image: cimg/node:16.13
steps:
- checkout # コードのチェックアウト
- restore_npm # キャッシュの復元
- run:
name: Install Dependencies
command: npm ci
仮想マシンの例
- ubuntu
- linux
- android
使えるVMの一覧は以下。
https://circleci.com/developer/images?imageType=machine
github workflow
circle ciとほぼ同様のことができます。githubとの連携のみというのに違いがあります。
こちらもコンテナとVMで実行できます。
コンテナの例
- docker
仮想マシンの例
- ubuntu
- windowsos
- macos
使えるVMの一覧は以下。
https://docs.github.com/ja/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#パブリック-リポジトリの標準の-github-でホストされたランナー
以下はubuntu環境の例。
ubuntu環境には、Node.js やその他の一般的な開発ツールがインストールされています。toshimaru/auto-author-assign は JavaScript で書かれており、GitHub Actions のランナー内の Node.js 環境で動作します。
name: Auto Author Assign
on:
pull_request_target:
types: [ opened, reopened ]
permissions:
pull-requests: write
jobs:
assign-author:
runs-on: ubuntu-latest
steps:
- uses: toshimaru/auto-author-assign@v2.1.1
Discussion