From 8fa068aedeb48852a4955cf8cb5c435d383c47f5 Mon Sep 17 00:00:00 2001 From: Yih-Dar <2521628+ydshieh@users.noreply.github.com> Date: Wed, 15 Jun 2022 17:48:34 +0200 Subject: [PATCH] Revert "Change push CI to run on workflow_run event (#17692)" This reverts commit b76290f44ce432e2ee7678a76036e8509167bae6. --- .github/workflows/self-push-caller.yml | 16 ++++++++++++---- .github/workflows/self-push.yml | 5 +---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/self-push-caller.yml b/.github/workflows/self-push-caller.yml index c6986ddf28a0d..394cfb59ffb4e 100644 --- a/.github/workflows/self-push-caller.yml +++ b/.github/workflows/self-push-caller.yml @@ -1,4 +1,3 @@ -# Used to trigger self-push CI name: Self-hosted runner (push-caller) on: @@ -14,8 +13,17 @@ on: jobs: run_push_ci: - name: Trigger Push CI + name: Run Push CI runs-on: ubuntu-latest steps: - - name: Trigger push CI via workflow_run - run: echo "Trigger push CI via workflow_run" \ No newline at end of file + - 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 4e6bddfb5d153..a40a3b3eace97 100644 --- a/.github/workflows/self-push.yml +++ b/.github/workflows/self-push.yml @@ -1,12 +1,9 @@ name: Self-hosted runner (push) on: - workflow_run: - workflows: ["Self-hosted runner (push-caller)"] - branches: ["main"] - types: [completed] push: branches: + - push-ci - ci_* - ci-* paths: