diff --git a/.github/workflows/maestro.yml b/.github/workflows/maestro.yml index ad13d5ecc7..5ae475767e 100644 --- a/.github/workflows/maestro.yml +++ b/.github/workflows/maestro.yml @@ -1,11 +1,10 @@ name: Maestro -# Run this flow only on pull request, and only when the pull request has been approved, to limit our usage of maestro cloud. -# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-a-workflow-when-a-pull-request-is-approved +# Run this flow only on pull request, and only when the pull request has the Run-Maestro label, to limit our usage of maestro cloud. on: workflow_dispatch: - pull_request_review: - types: [submitted] + pull_request: + types: [labeled] # Enrich gradle.properties for CI/CD env: @@ -16,7 +15,7 @@ jobs: maestro-cloud: name: Maestro test suite runs-on: ubuntu-latest - if: github.event.review.state == 'approved' || github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event.label.name == 'Run-Maestro' strategy: fail-fast: false # Allow one per PR. @@ -24,6 +23,11 @@ jobs: group: ${{ format('maestro-{0}', github.ref) }} cancel-in-progress: true steps: + - name: Remove Run-Maestro label + if: ${{ github.event.label.name == 'Run-Maestro' }} + uses: actions-ecosystem/action-remove-labels@v1 + with: + labels: Run-Maestro - uses: actions/checkout@v4 with: # Ensure we are building the branch and not the branch after being merged on develop