Skip to content

Commit dae9ec1

Browse files
authoredSep 23, 2024
[TECH] Essai de déclenchement de la CI via une Github Action, uniquement pour les Pull Requests.
#10133
2 parents c9c90c0 + 18546f4 commit dae9ec1

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed
 

Diff for: ‎.circleci/config.yml

+18
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,20 @@
2121

2222
version: 2.1
2323

24+
parameters:
25+
GHA_Actor:
26+
type: string
27+
default: ''
28+
GHA_Action:
29+
type: string
30+
default: ''
31+
GHA_Event:
32+
type: string
33+
default: ''
34+
GHA_Meta:
35+
type: string
36+
default: ''
37+
2438
orbs:
2539
browser-tools: circleci/browser-tools@1.4.8
2640

@@ -93,6 +107,10 @@ executors:
93107
workflows:
94108
version: 2
95109
build-and-test:
110+
# This workflow is set to be conditionally triggered, only when
111+
# the GitHub Action is triggered.
112+
# With no other workflows, normal push events will be ignored currently.
113+
when: << pipeline.parameters.GHA_Action >>
96114
jobs:
97115
- checkout:
98116
context: Pix

Diff for: ‎.github/workflows/trigger-ci.yaml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Trigger CircleCI
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, synchronize, ready_for_review]
6+
push:
7+
branches: dev
8+
9+
jobs:
10+
trigger-ci:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Trigger CircleCI
15+
# ensure PR is not draft
16+
if: '! github.event.pull_request.draft'
17+
uses: CircleCI-Public/trigger-circleci-pipeline-action@v1.0.5
18+
env:
19+
CCI_TOKEN: ${{ secrets.PIX_SERVICE_CIRCLE_CI_TOKEN }}

0 commit comments

Comments
 (0)