From b5217a6d0fc8980f99943a52e3df7744914981a5 Mon Sep 17 00:00:00 2001 From: Harald Heckmann Date: Mon, 17 Jul 2023 15:01:48 +0200 Subject: [PATCH] Run workflows required for merges when label s:review-needed is set --- .github/workflows/coverage.yml | 5 +++-- .github/workflows/rust.yml | 11 +++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 4087b70ee..f962133b2 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -1,9 +1,9 @@ name: Coverage on: - push: - branches: [ main ] pull_request: + types: [ labeled ] + push: branches: [ main ] env: @@ -12,6 +12,7 @@ env: jobs: coverage: name: Coverage + if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 's:review-needed')) runs-on: ubuntu-latest steps: - name: Checkout repository diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a943202c1..5e6f0bdea 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,9 +1,9 @@ name: Rust on: - push: - branches: [ main ] pull_request: + types: [ labeled ] + push: branches: [ main ] env: @@ -12,6 +12,7 @@ env: jobs: format: name: Format + if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 's:review-needed')) runs-on: ubuntu-latest steps: - name: Checkout repository @@ -32,6 +33,7 @@ jobs: copyright: name: Copyright Notices + if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 's:review-needed')) runs-on: ubuntu-latest steps: - name: Checkout repository @@ -52,6 +54,7 @@ jobs: checks: name: Checks + if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 's:review-needed')) runs-on: ubuntu-latest strategy: matrix: @@ -75,6 +78,7 @@ jobs: benchmark: name: Quick check benchmarks + if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 's:review-needed')) runs-on: ubuntu-latest steps: - name: Checkout repository @@ -87,6 +91,7 @@ jobs: test_standalone: name: Test standalone build + if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 's:review-needed')) runs-on: ubuntu-latest steps: - name: Checkout repository @@ -117,6 +122,7 @@ jobs: test_parachain: name: Test parachain build + if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 's:review-needed')) runs-on: ubuntu-latest steps: - name: Checkout repository @@ -147,6 +153,7 @@ jobs: fuzz: name: Fuzz + if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 's:review-needed')) runs-on: ubuntu-latest steps: - name: Checkout repository