Skip to content

Commit

Permalink
run workflow only in public repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanxingql committed May 14, 2024
1 parent f7ff81e commit 6bcdb43
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/sync_to_private.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ jobs:
sync:
runs-on: ubuntu-latest

if: github.repository_visibility == 'public'

steps:
- name: Checkout public repository
uses: actions/checkout@v2
Expand All @@ -23,4 +25,4 @@ jobs:
- name: Sync to private repository
run: |
git remote add private [email protected]:ryanxingql/${{ secrets.PRIVATE_REPO_NAME }}.git
git push private v3
git push private v3

0 comments on commit 6bcdb43

Please sign in to comment.