From 9d3407a02ce9e94cb8171c11204e5abb1ed2fc6d Mon Sep 17 00:00:00 2001 From: Ian Maia Date: Fri, 22 Dec 2023 21:08:50 +0100 Subject: [PATCH] Test using a single workflow without a reusable one --- .github/workflows/run-danger.yml | 35 ++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-danger.yml b/.github/workflows/run-danger.yml index a744763ea928..6249a3fdaf90 100644 --- a/.github/workflows/run-danger.yml +++ b/.github/workflows/run-danger.yml @@ -2,10 +2,37 @@ name: ☢️ Danger on: pull_request: - types: [opened, synchronize, edited, review_requested, review_request_removed, labeled, unlabeled, milestoned, demilestoned] + types: [opened, edited, review_requested, review_request_removed, labeled, unlabeled, milestoned, demilestoned, synchronize] + +concurrency: + group: danger-${{ github.ref }} + cancel-in-progress: true jobs: dangermattic: - uses: Automattic/dangermattic/.github/workflows/reusable-run-danger.yml@iangmaia/danger-on-gha - secrets: - github-token: ${{ secrets.DANGERMATTIC_GITHUB_API_TOKEN }} + runs-on: ubuntu-latest + env: + DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGERMATTIC_GITHUB_API_TOKEN }} + steps: + - name: "📥 Checkout Repo" + uses: actions/checkout@v4 + - name: "💎 Ruby Setup" + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + - name: "☢️ Danger on GHA" + run: | + echo "--- 🏃 Running Danger: PR Check" + bundle exec danger --fail-on-errors=true --remove-previous-comments --danger_id=pr-check + +# name: ☢️ Danger + +# on: +# pull_request: +# types: [opened, synchronize, edited, review_requested, review_request_removed, labeled, unlabeled, milestoned, demilestoned] + +# jobs: +# dangermattic: +# uses: Automattic/dangermattic/.github/workflows/reusable-run-danger.yml@iangmaia/danger-on-gha +# secrets: +# github-token: ${{ secrets.DANGERMATTIC_GITHUB_API_TOKEN }}