Skip to content

Commit

Permalink
Add branch + fork compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
tyeth committed Jun 1, 2024
1 parent d9d603a commit 416d0d7
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/custom-board-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ on:
description: 'Flags: Build flags (e.g. CIRCUITPY_WIFI=1)'
required: false
type: string
branch:
description: 'Branch (defaults to main)'
required: false
default: 'main'
type: string
debug:
description: 'Make a debug build'
required: false
Expand All @@ -35,8 +40,20 @@ jobs:
steps:
- name: Set up repository
run: |
git clone --filter=tree:0 https://github.com/tyeth/circuitpython.git $GITHUB_WORKSPACE
git clone --filter=tree:0 https://github.com/adafruit/circuitpython.git $GITHUB_WORKSPACE
- name: Checkout head
if: github.repository_owner == 'adafruit'
run: |
git checkout ${{ inputs.version == 'latest' && 'HEAD' || inputs.version }}
- name: fork compatibility
if: github.repository_owner != 'adafruit'
run: |
git remote add fork https://github.com/${{github.repository}}.git
git fetch --all
- name: branch compatibility
if: inputs.branch != ''
run: |
git checkout fork-branch fork/${{inputs.branch}}
- name: Set up identifier
if: inputs.debug || inputs.flags != ''
run: |
Expand Down

0 comments on commit 416d0d7

Please sign in to comment.