1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Github Actions で、特定の文字列をファイルが含んでいる場合に CI を落とす

Posted at

下記は console.log() , FIXME を含んでいたら CI を落とす例。

検索ワードやディでクトリは適宜書き換えてください。

name: NG words

on: [push, pull_request]

jobs:
  check-console:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - run: |
          if grep -rE "console\.log\(" ./src; then
               exit 1
          else
              echo "All good"
          fi
  check-fixme:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - run: |
          if grep -rE "FIXME" ./src; then
               exit 1
          else
              echo "All good"
          fi

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?