Skip to content

Commit

Permalink
Merge pull request #2 from tyeth/custom_builds_for_forks_and_branches
Browse files Browse the repository at this point in the history
Custom builds for forks and branches
  • Loading branch information
tyeth authored Jun 1, 2024
2 parents f810f4d + 3414b50 commit 700b0ff
Showing 1 changed file with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Custom board build
name: Build board (custom)

on:
workflow_dispatch:
Expand All @@ -21,6 +21,11 @@ on:
description: 'Flags: Build flags (e.g. CIRCUITPY_WIFI=1)'
required: false
type: string
branch:
description: 'Branch (only if tag="latest" - defaults to main)'
required: false
default: 'main'
type: string
debug:
description: 'Make a debug build'
required: false
Expand All @@ -36,7 +41,18 @@ jobs:
- name: Set up repository
run: |
git clone --filter=tree:0 https://github.com/adafruit/circuitpython.git $GITHUB_WORKSPACE
- name: Checkout head / tag
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 fork --filter=tree:0
- name: branch compatibility
if: inputs.branch != '' && inputs.version == 'latest'
run: |
git checkout -b fork-branch fork/${{inputs.branch}}
- name: Set up identifier
if: inputs.debug || inputs.flags != ''
run: |
Expand Down

0 comments on commit 700b0ff

Please sign in to comment.