Skip to content

Commit

Permalink
CI protection
Browse files Browse the repository at this point in the history
  • Loading branch information
anakinxc committed Jan 4, 2024
1 parent d25ea6b commit 3b02a9b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/circleci_pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Trigger CircleCI
on:
pull_request_target:
types: [assigned]
jobs:
approve: # First step
runs-on: ubuntu-latest
steps:
- name: Approve
run: echo For security reasons, all pull requests need to be approved first before running any automated CI.
trigger-circleci:
runs-on: ubuntu-latest
needs: [approve] # Require the first step to finish
environment:
name: CI Check # Our dummy environment
steps:
- name: secretflow-yacl-ci
id: secretflow-yacl-ci
uses: CircleCI-Public/trigger-circleci-pipeline-action@v1.1.0
env:
CCI_TOKEN: ${{ secrets.CCI_TOKEN }}
TARGET_BRANCH: ${{ github.event.pull_request.head.ref }}
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
---
name: Trigger CircleCI
on:
push:
branches:
- main
pull_request:
branches:
- main
push
jobs:
trigger-circleci:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 3b02a9b

Please sign in to comment.