Skip to content

Commit

Permalink
Change push CI to run on workflow_run event
Browse files Browse the repository at this point in the history
  • Loading branch information
ydshieh committed Jun 13, 2022
1 parent 5483388 commit d3409f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/self-push-caller.yml
@@ -1,3 +1,4 @@
# Used to trigger self-push CI
name: Self-hosted runner (push-caller)

on:
Expand All @@ -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"
5 changes: 4 additions & 1 deletion .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:
Expand Down

0 comments on commit d3409f2

Please sign in to comment.