Skip to content

Commit

Permalink
Test with Danger on GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
iangmaia committed Dec 18, 2023
1 parent be80731 commit c418489
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 27 deletions.
16 changes: 0 additions & 16 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,6 @@ steps:
# Wait for Gradle Wrapper to be validated before running any other jobs
- wait

- label: "☢️ Danger - PR Check"
key: "danger"
command: .buildkite/commands/danger-pr-check.sh
plugins:
- docker#v5.8.0:
image: "public.ecr.aws/docker/library/ruby:3.2.2"
propagate-environment: true
environment:
- "DANGER_GITHUB_API_TOKEN"
if: "build.pull_request.id != null"
agents:
queue: "default"
retry:
manual:
permit_on_passed: true

- label: "detekt"
command: |
echo "--- 🧹 Linting"
Expand Down
28 changes: 17 additions & 11 deletions .github/workflows/dangermattic.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
name: ☢️ Trigger Danger Rerun
name: ☢️ Danger on GHA

on:
pull_request:
types: [edited, review_requested, review_request_removed, labeled, unlabeled, milestoned, demilestoned]
types: [opened, edited, review_requested, review_request_removed, labeled, unlabeled, milestoned, demilestoned, synchronize]

jobs:
dangermattic:
if: github.event.number > 0
uses: Automattic/dangermattic/.github/workflows/reusable-retry-buildkite-step-on-events.yml@iangmaia/gha-triggering-danger
with:
org-slug: "automattic"
pipeline-slug: "woocommerce-android"
retry-step-key: "danger"
commit-sha: "${{ github.event.pull_request.head.sha }}"
secrets:
buildkite-api-token: ${{ secrets.TRIGGER_BK_BUILD_TOKEN }}
runs-on: ubuntu-latest
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_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

0 comments on commit c418489

Please sign in to comment.