diff --git a/.github/workflows/build-board-custom.yml b/.github/workflows/build-board-custom.yml index 2e73d49de0ed..e479540be63a 100644 --- a/.github/workflows/build-board-custom.yml +++ b/.github/workflows/build-board-custom.yml @@ -50,7 +50,11 @@ jobs: git remote add fork https://github.com/${{github.repository}}.git git fetch fork --filter=tree:0 - name: branch compatibility - if: inputs.branch != '' && inputs.version == 'latest' + if: inputs.branch != 'main' && inputs.version == 'latest' && github.repository_owner == 'adafruit' + run: | + git checkout ${{inputs.branch}} + - name: branch compatibility (fork) + if: inputs.branch != '' && inputs.version == 'latest' && github.repository_owner != 'adafruit' run: | git checkout -b fork-branch fork/${{inputs.branch}} - name: Set up identifier