Change push CI to run on workflow_run event (#17692)

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
Yih-Dar
2022-06-15 17:43:31 +02:00
committed by GitHub
parent d453ea6120
commit b76290f44c
2 changed files with 8 additions and 13 deletions

View File

@@ -1,3 +1,4 @@
# Used to trigger self-push CI
name: Self-hosted runner (push-caller) name: Self-hosted runner (push-caller)
on: on:
@@ -13,17 +14,8 @@ on:
jobs: jobs:
run_push_ci: run_push_ci:
name: Run Push CI name: Trigger Push CI
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout transformers - name: Trigger push CI via workflow_run
uses: actions/checkout@v2 run: echo "Trigger push CI via workflow_run"
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

@@ -1,9 +1,12 @@
name: Self-hosted runner (push) name: Self-hosted runner (push)
on: on:
workflow_run:
workflows: ["Self-hosted runner (push-caller)"]
branches: ["main"]
types: [completed]
push: push:
branches: branches:
- push-ci
- ci_* - ci_*
- ci-* - ci-*
paths: paths: