From bffe513a8ee87a7f86ed0f0bf62f01d887ca4ab2 Mon Sep 17 00:00:00 2001 From: Florian Loitsch Date: Fri, 24 May 2024 20:51:25 +0200 Subject: [PATCH] Checkout toit first. --- .github/workflows/build.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) 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: