From cde35d0f1fa7381cc9eb364ed16f414128f19690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lorber?= Date: Fri, 30 Jun 2023 18:12:46 +0200 Subject: [PATCH] chore: optimize Argos CI setup (#9115) --- .github/workflows/argos.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/argos.yml b/.github/workflows/argos.yml index 9f38fa3330..580a60dacf 100644 --- a/.github/workflows/argos.yml +++ b/.github/workflows/argos.yml @@ -5,9 +5,25 @@ on: branches: [main] pull_request: branches: [main] + types: + # Those 3 are the default PR workflow activity types, + # see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request + - opened + - synchronize + - reopened + # We want trigger workflow on labeled too! + - labeled + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true jobs: take-screenshots: + # Argos is heavy to run + # We only want to trigger Argos on PRs with the 'Argos' label + # See https://stackoverflow.com/questions/62325286/run-github-actions-when-pull-requests-have-a-specific-label + if: ${{ github.ref_name == 'main' || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'Argos')) }} runs-on: ubuntu-latest steps: - name: Check out repository code