diff --git a/.circleci/config.yml b/.circleci/config.yml index 902d67ad5a4..0dc34ad868a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,6 +21,20 @@ version: 2.1 +parameters: + GHA_Actor: + type: string + default: '' + GHA_Action: + type: string + default: '' + GHA_Event: + type: string + default: '' + GHA_Meta: + type: string + default: '' + orbs: browser-tools: circleci/browser-tools@1.4.8 @@ -93,6 +107,10 @@ executors: workflows: version: 2 build-and-test: + # This workflow is set to be conditionally triggered, only when + # the GitHub Action is triggered. + # With no other workflows, normal push events will be ignored currently. + when: << pipeline.parameters.GHA_Action >> jobs: - checkout: context: Pix diff --git a/.github/workflows/trigger-ci.yaml b/.github/workflows/trigger-ci.yaml new file mode 100644 index 00000000000..6074bf7ad8c --- /dev/null +++ b/.github/workflows/trigger-ci.yaml @@ -0,0 +1,19 @@ +name: Trigger CircleCI + +on: + pull_request: + types: [opened, reopened, synchronize, ready_for_review] + push: + branches: dev + +jobs: + trigger-ci: + runs-on: ubuntu-latest + + steps: + - name: Trigger CircleCI + # ensure PR is not draft + if: '! github.event.pull_request.draft' + uses: CircleCI-Public/trigger-circleci-pipeline-action@v1.0.5 + env: + CCI_TOKEN: ${{ secrets.PIX_SERVICE_CIRCLE_CI_TOKEN }}