From 78afc69f736a09fd789d6c326f81636344614b33 Mon Sep 17 00:00:00 2001 From: Moritz Date: Tue, 20 Aug 2024 14:16:41 +0200 Subject: [PATCH 1/2] Add PR Health workflow --- .github/workflows/health.yaml | 14 ++++++++++++++ .github/workflows/post_summaries.yaml | 17 +++++++++++++++++ .github/workflows/publish.yaml | 2 ++ 3 files changed, 33 insertions(+) create mode 100644 .github/workflows/health.yaml create mode 100644 .github/workflows/post_summaries.yaml diff --git a/.github/workflows/health.yaml b/.github/workflows/health.yaml new file mode 100644 index 0000000000..b234a99c7d --- /dev/null +++ b/.github/workflows/health.yaml @@ -0,0 +1,14 @@ +name: Health +on: + pull_request: + branches: [ main ] + types: [opened, synchronize, reopened, labeled, unlabeled] + +jobs: + health: + uses: dart-lang/ecosystem/.github/workflows/health.yaml@main + with: + ignore_license: "**.g.dart" + sdk: dev + permissions: + pull-requests: write diff --git a/.github/workflows/post_summaries.yaml b/.github/workflows/post_summaries.yaml new file mode 100644 index 0000000000..e082efe95a --- /dev/null +++ b/.github/workflows/post_summaries.yaml @@ -0,0 +1,17 @@ +name: Comment on the pull request + +on: + # Trigger this workflow after the Health workflow completes. This workflow will have permissions to + # do things like create comments on the PR, even if the original workflow couldn't. + workflow_run: + workflows: + - Health + - Publish + types: + - completed + +jobs: + upload: + uses: dart-lang/ecosystem/.github/workflows/post_summaries.yaml@main + permissions: + pull-requests: write diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index f0cc574ccc..151e5e4d16 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -12,6 +12,8 @@ jobs: publish: if: ${{ github.repository_owner == 'dart-lang' }} uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main + with: + write-comments: false permissions: id-token: write # Required for authentication using OIDC pull-requests: write # Required for writing the pull request note From 39129b6d59ad80379dd83fbcca7cb4b3129efeb5 Mon Sep 17 00:00:00 2001 From: Moritz Date: Tue, 20 Aug 2024 14:23:25 +0200 Subject: [PATCH 2/2] Run on master branch --- .github/workflows/health.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/health.yaml b/.github/workflows/health.yaml index b234a99c7d..1c904405a2 100644 --- a/.github/workflows/health.yaml +++ b/.github/workflows/health.yaml @@ -1,7 +1,7 @@ name: Health on: pull_request: - branches: [ main ] + branches: [ master ] types: [opened, synchronize, reopened, labeled, unlabeled] jobs: