Skip to content

Commit e1741e2

Browse files
committed
[skip ci] workflow test
1 parent fbe7890 commit e1741e2

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

.github/workflows/build-board-custom.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,33 @@ jobs:
5151
build:
5252
runs-on: self-hosted
5353
steps:
54-
- uses: actions/checkout@v5
55-
with:
56-
fetch-depth: 0
54+
- name: Set up repository
55+
run: |
56+
git clone --filter=tree:0 https://github.com/adafruit/circuitpython.git $GITHUB_WORKSPACE
5757
- name: Checkout head / tag
5858
env:
5959
TAG: ${{ inputs.version == 'latest' && 'HEAD' || inputs.version }}
6060
run: |
6161
git checkout "$TAG"
62+
- name: fork compatibility
63+
if: github.repository_owner != 'adafruit'
64+
env:
65+
REPO: ${{ github.repository }}
66+
run: |
67+
git remote add fork "https://github.com/$REPO.git"
68+
git fetch fork --filter=tree:0
6269
- name: branch compatibility
63-
if: inputs.branch != '' && inputs.version == 'latest'
70+
if: inputs.branch != 'main' && inputs.version == 'latest' && github.repository_owner == 'adafruit'
71+
env:
72+
BRANCH: ${{ inputs.branch }}
73+
run: |
74+
git checkout "$BRANCH"
75+
- name: branch compatibility (fork)
76+
if: inputs.branch != '' && inputs.version == 'latest' && github.repository_owner != 'adafruit'
6477
env:
6578
BRANCH: ${{ inputs.branch }}
6679
run: |
67-
git checkout -b fork-branch "origin/$BRANCH"
80+
git checkout -b fork-branch "fork/$BRANCH"
6881
- name: Set up identifier
6982
if: inputs.debug || inputs.flags != ''
7083
run: |

0 commit comments

Comments
 (0)