diff --git a/.circleci/config.yml b/.circleci/config.yml index ea1a430ac44eab635c79ba6eaceebabd9f31d419..f0ec6c9712627cce88d4f190669c6769544fb883 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,26 +26,6 @@ services_steps: &services_steps path: junit jobs: - danger: - docker: - - image: cimg/node:16.15 - steps: - - checkout - - - run: - name: Install dependencies - command: npm ci - environment: - CYPRESS_INSTALL_BINARY: 0 - - - run: - name: Danger - when: always - environment: - # https://github.com/gatsbyjs/gatsby/pull/11555 - NODE_ENV: test - command: npm run danger ci - services: docker: - image: cimg/node:16.15 @@ -77,13 +57,6 @@ workflows: ignore: - master - gh-pages - - danger: - filters: - branches: - ignore: - - master - - gh-pages - - /dependabot\/.*/ # on-commit-with-cache: # jobs: # - npm-install: @@ -102,9 +75,3 @@ workflows: # filters: # branches: # ignore: master - # - danger: - # requires: - # - npm-install - # filters: - # branches: - # ignore: /dependabot\/.*/ diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml new file mode 100644 index 0000000000000000000000000000000000000000..37fafe4a9815ffe5f3ccd6aa473bf1849b302f81 --- /dev/null +++ b/.github/workflows/danger.yml @@ -0,0 +1,29 @@ +name: Danger +on: + pull_request_target: + types: [opened, edited, reopened, synchronize] + +permissions: + checks: write + pull-requests: write + statuses: write + +jobs: + danger: + runs-on: ubuntu-latest + if: github.actor != 'dependabot[bot]' + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup + uses: ./.github/actions/setup + with: + node-version: 16 + + - name: Danger + run: npm run danger ci + env: + # https://github.com/gatsbyjs/gatsby/pull/11555 + NODE_ENV: test + GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'