From d3409f2cf62ff34936faf742af25ab6dd6b1da9e Mon Sep 17 00:00:00 2001 From: ydshieh Date: Mon, 13 Jun 2022 16:31:51 +0200 Subject: [PATCH] Change push CI to run on workflow_run event --- .github/workflows/self-push-caller.yml | 12 ++---------- .github/workflows/self-push.yml | 5 ++++- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/self-push-caller.yml b/.github/workflows/self-push-caller.yml index 394cfb59ffb4e..450fd02766458 100644 --- a/.github/workflows/self-push-caller.yml +++ b/.github/workflows/self-push-caller.yml @@ -1,3 +1,4 @@ +# Used to trigger self-push CI name: Self-hosted runner (push-caller) on: @@ -17,13 +18,4 @@ jobs: 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 + run: echo "Trigger push CI via workflow_run" \ No newline at end of file diff --git a/.github/workflows/self-push.yml b/.github/workflows/self-push.yml index a40a3b3eace97..4e6bddfb5d153 100644 --- a/.github/workflows/self-push.yml +++ b/.github/workflows/self-push.yml @@ -1,9 +1,12 @@ 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: