Split push CI into 2 workflows (#17369)

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
Yih-Dar 2022-06-02 10:19:26 +02:00 committed by GitHub
parent 58fb3c9f98
commit 0932adb3e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 1 deletions

29
.github/workflows/self-push-caller.yml vendored Normal file
View File

@ -0,0 +1,29 @@
name: Self-hosted runner (push-caller)
on:
push:
branches:
- main
paths:
- "src/**"
- "tests/**"
- ".github/**"
- "templates/**"
- "utils/**"
jobs:
run_push_ci:
name: Run Push CI
runs-on: ubuntu-latest
steps:
- name: Checkout transformers
uses: actions/checkout@v2
with:
fetch-depth: 2
ssh-key: "${{ secrets.COMMIT_KEY }}"
- name: Checkout to branch push-ci
# A more strict way to make sure`push-ci` is exactly the same as `main` at the push event commit.
run: |
git checkout -b push-ci
git push -u origin push-ci --force

View File

@ -3,7 +3,7 @@ name: Self-hosted runner (push)
on:
push:
branches:
- main
- push-ci
- ci_*
- ci-*
paths: