Skip to content

Commit

Permalink
ci(fork-sync): don't run at all if secret is not setup
Browse files Browse the repository at this point in the history
  • Loading branch information
ThinkChaos committed Apr 2, 2024
1 parent 28f979f commit 98b67db
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions .github/workflows/fork-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,8 @@ jobs:
sync:
name: Sync with Upstream
runs-on: ubuntu-latest
if: github.repository_owner != '0xERR0R'
if: ${{ github.repository_owner != '0xERR0R' && secrets.FORK_SYNC_TOKEN }}
steps:
- name: Enabled Check
id: check
shell: bash
run: |
if [[ "${{ secrets.FORK_SYNC_TOKEN }}" != "" ]]; then
echo "enabled=1" >> $GITHUB_OUTPUT
echo "Workflow is enabled"
else
echo "enabled=0" >> $GITHUB_OUTPUT
echo "Workflow is disabled(create FORK_SYNC_TOKEN secret with repo write permission to enable it)"
fi
- name: Sync
if: ${{ steps.check.outputs.enabled == 1 }}
env:
Expand Down

0 comments on commit 98b67db

Please sign in to comment.