From ffb83e52208997f1bbd2493e3dfef458bef98675 Mon Sep 17 00:00:00 2001 From: Max Murphy Date: Wed, 15 Nov 2023 10:56:25 +0100 Subject: [PATCH] By default, upgrade to the latest release --- .github/workflows/update-ic.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-ic.yml b/.github/workflows/update-ic.yml index 050cf9028..583243b86 100644 --- a/.github/workflows/update-ic.yml +++ b/.github/workflows/update-ic.yml @@ -20,11 +20,20 @@ jobs: steps: - name: Checkout ic-js uses: actions/checkout@v3 + - name: Choose IC ref + id: choose_ic_ref + run: | + ref="${{ inputs.ic_ref }}" + if [[ "${requested_ref:-}" == "" ]] + then # Use the latest release + ref="$(gh release --repo dfinity/ic view --json tagName -q .tagName)" + fi + echo "ic_ref=$ref" >> "$GITHUB_OUTPUT" - name: Checkout ic repo uses: actions/checkout@v3 with: repository: dfinity/ic - ref: ${{ inputs.ic_ref }} # Defaults to the default IC branch, currently "master". + ref: ${{ steps.choose_ic_ref.outputs.ic_ref }} path: ic - name: Check new IC commit id: update