Skip to content

Commit b2a350e

Browse files
authored
Merge pull request #9293 from tyeth/custom_builds_for_forks_and_branches
Custom builds for forks and branches
2 parents c581eb9 + 5d1a896 commit b2a350e

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Custom board build
1+
name: Build board (custom)
22

33
on:
44
workflow_dispatch:
@@ -21,6 +21,11 @@ on:
2121
description: 'Flags: Build flags (e.g. CIRCUITPY_WIFI=1)'
2222
required: false
2323
type: string
24+
branch:
25+
description: 'Branch (only if Version="latest")'
26+
required: false
27+
default: 'main'
28+
type: string
2429
debug:
2530
description: 'Make a debug build'
2631
required: false
@@ -36,7 +41,18 @@ jobs:
3641
- name: Set up repository
3742
run: |
3843
git clone --filter=tree:0 https://github.com/adafruit/circuitpython.git $GITHUB_WORKSPACE
44+
- name: Checkout head / tag
45+
run: |
3946
git checkout ${{ inputs.version == 'latest' && 'HEAD' || inputs.version }}
47+
- name: fork compatibility
48+
if: github.repository_owner != 'adafruit'
49+
run: |
50+
git remote add fork https://github.com/${{github.repository}}.git
51+
git fetch fork --filter=tree:0
52+
- name: branch compatibility
53+
if: inputs.branch != '' && inputs.version == 'latest'
54+
run: |
55+
git checkout -b fork-branch fork/${{inputs.branch}}
4056
- name: Set up identifier
4157
if: inputs.debug || inputs.flags != ''
4258
run: |

0 commit comments

Comments
 (0)