From 6bcdb43edd0385700445d081e7bcab40dcfb5e68 Mon Sep 17 00:00:00 2001 From: ryanxingql <34084019+ryanxingql@users.noreply.github.com> Date: Tue, 14 May 2024 11:38:15 +0800 Subject: [PATCH] run workflow only in public repo --- .github/workflows/sync_to_private.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync_to_private.yml b/.github/workflows/sync_to_private.yml index 849e44b..3af0453 100644 --- a/.github/workflows/sync_to_private.yml +++ b/.github/workflows/sync_to_private.yml @@ -9,6 +9,8 @@ jobs: sync: runs-on: ubuntu-latest + if: github.repository_visibility == 'public' + steps: - name: Checkout public repository uses: actions/checkout@v2 @@ -23,4 +25,4 @@ jobs: - name: Sync to private repository run: | git remote add private git@github.com:ryanxingql/${{ secrets.PRIVATE_REPO_NAME }}.git - git push private v3 + git push private v3 \ No newline at end of file