diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f5f610e..6e63341 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -226,6 +226,21 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Set the git version + run: | + echo "TOIT_GIT_VERSION=${{ github.event.inputs.toit-version }}" >> $GITHUB_ENV + + - name: Fetch the Toit repository + run: | + # We allow the workflow dispatch to override the checked out branch. + # Note that we set the TOIT_GIT_VERSION env variable. The checked out branch + # thus doesn't influence the version of the SDK we build. + REF=${{ github.event.inputs.branch }} + if [[ -z "$REF" ]]; then + REF=${{ github.event.inputs.toit-version }} + fi + make TOIT_VERSION=$REF download-toit + - name: Setup build dependencies uses: ./toit/actions/setup-build with: @@ -280,6 +295,21 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Set the git version + run: | + echo "TOIT_GIT_VERSION=${{ github.event.inputs.toit-version }}" >> $GITHUB_ENV + + - name: Fetch the Toit repository + run: | + # We allow the workflow dispatch to override the checked out branch. + # Note that we set the TOIT_GIT_VERSION env variable. The checked out branch + # thus doesn't influence the version of the SDK we build. + REF=${{ github.event.inputs.branch }} + if [[ -z "$REF" ]]; then + REF=${{ github.event.inputs.toit-version }} + fi + make TOIT_VERSION=$REF download-toit + - name: Setup build dependencies uses: ./toit/actions/setup-build with: