LoginSignup
1
1

More than 1 year has passed since last update.

CircleCIの設定ファイルメモ

Posted at

GitHub Actionsがリポジトリに変更がないと60日ほどで止まってしまう問題で引っかかってしまったので代替策を検討しています。

最近使ってるCircleCIでは無料でもそういった制限はなさそうなので.circleci/config.ymlをメモっておきます。

# This config is equivalent to both the '.circleci/extended/orb-free.yml' and the base '.circleci/config.yml'
version: 2.1

# Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects.
# See: https://circleci.com/docs/2.0/orb-intro/
orbs:
  node: circleci/node@5.0.2

jobs:
  start: # 普通のテスト
    docker:
      - image: node:18
    steps:
      - checkout
      - run: yarn install
      - run: yarn start

# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows:
  normal_workflow:
    triggers:
      - schedule:
          # Every day, 0421Z.
          cron: "35 * * * *"
          filters:
            branches:
              only:
                - main
    jobs:
      - start

  # sample: # This is the name of the workflow, feel free to change it to better match your workflow.
  #   # Inside the workflow, you define the jobs you want to run.
  #   jobs:
  #     - node/test:
  #         # This is the node version to use for the `cimg/node` tag
  #         # Relevant tags can be found on the CircleCI Developer Hub
  #         # https://circleci.com/developer/images/image/cimg/node
  #         version: '16.10'
  #         # If you are using yarn, change the line below from "npm" to "yarn"
  #         pkg-manager: npm

これで毎時35分に実行されます。

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