From b40bdec460856ec380e4fe14fd2b961db6436d71 Mon Sep 17 00:00:00 2001 From: bjornoleh <63544115+bjornoleh@users.noreply.github.com> Date: Thu, 13 Jul 2023 11:00:26 +0200 Subject: [PATCH] build_loop.yml: Disable upstream sync with optional repository variable Set an optional "SYNC_UPSTREAM" repository variable to 'false' to disable syncing of fork with the upstream repository --- .github/workflows/build_loop.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_loop.yml b/.github/workflows/build_loop.yml index 35516da0b..a0555441d 100644 --- a/.github/workflows/build_loop.yml +++ b/.github/workflows/build_loop.yml @@ -15,7 +15,7 @@ env: UPSTREAM_BRANCH: ${{ github.ref_name }} # branch on upstream repository to sync from (relpace with specific branch name if needed) TARGET_BRANCH: ${{ github.ref_name }} # target branch on fork to be kept in sync, and target branch on upstream to be kept alive (relpace with specific branch name if needed) ALIVE_BRANCH: alive - SYNC_UPSTREAM: 'true' # set to 'false' or 'true' to disable / enable syncing of fork with upstream repository + SYNC_UPSTREAM: ${{ vars.SYNC_UPSTREAM }} # set an optional "SYNC_UPSTREAM" repository variable to 'false' to disable syncing of fork with the upstream repository jobs: check_latest_from_upstream: @@ -32,7 +32,7 @@ jobs: ref: alive - name: Sync upstream changes - if: ${{ env.SYNC_UPSTREAM == 'true' }} && github.repository_owner != 'LoopKit' # do not run the upstream sync action on the upstream repository + if: ${{ env.SYNC_UPSTREAM != 'false' && github.repository_owner != 'LoopKit' }} # do not run the upstream sync action on the upstream repository id: sync uses: aormsby/Fork-Sync-With-Upstream-action@v3.4 with: @@ -79,7 +79,7 @@ jobs: ref: ${{ env.TARGET_BRANCH }} - name: Sync upstream changes - if: ${{ env.SYNC_UPSTREAM == 'true' }} && github.repository_owner != 'LoopKit' # do not run the upstream sync action on the upstream repository + if: ${{ env.SYNC_UPSTREAM != 'false' && github.repository_owner != 'LoopKit' }} # do not run the upstream sync action on the upstream repository id: sync uses: aormsby/Fork-Sync-With-Upstream-action@v3.4 with: