From 0932adb3e860086dabeee88ebc34f1e6550321b5 Mon Sep 17 00:00:00 2001 From: Yih-Dar <2521628+ydshieh@users.noreply.github.com> Date: Thu, 2 Jun 2022 10:19:26 +0200 Subject: [PATCH] Split push CI into 2 workflows (#17369) Co-authored-by: ydshieh --- .github/workflows/self-push-caller.yml | 29 ++++++++++++++++++++++++++ .github/workflows/self-push.yml | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/self-push-caller.yml diff --git a/.github/workflows/self-push-caller.yml b/.github/workflows/self-push-caller.yml new file mode 100644 index 0000000000..394cfb59ff --- /dev/null +++ b/.github/workflows/self-push-caller.yml @@ -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 diff --git a/.github/workflows/self-push.yml b/.github/workflows/self-push.yml index e78757705d..4ab736618c 100644 --- a/.github/workflows/self-push.yml +++ b/.github/workflows/self-push.yml @@ -3,7 +3,7 @@ name: Self-hosted runner (push) on: push: branches: - - main + - push-ci - ci_* - ci-* paths: