From: Christian Marangi Date: Wed, 4 Jan 2023 18:26:16 +0000 (+0100) Subject: CI: build: fix external toolchain use with release tag tests X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f655923b362e9f2d70672eee9c1fa82550a145a6;p=openwrt%2Fstaging%2Fjow.git CI: build: fix external toolchain use with release tag tests When a new tag for a release is created, the just checkout repo from github actions will already have such tag locally created. This will result in git fetch --tags failing with error rejecting the remote tag with (would clobber existing tag). Add -f option to overwrite any local tags and always fetch them from remote. Fixes: e24a1e6f6d7f ("CI: build: add support for external toolchains from stable branch") Signed-off-by: Christian Marangi --- diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 42db3669ac..c892857999 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -169,7 +169,7 @@ jobs: fi if [ -n "$major_ver" ]; then - git fetch --tags + git fetch --tags -f latest_tag="$(git tag --sort=-creatordate -l $major_ver* | head -n1)" if [ -n "$latest_tag" ]; then TOOLCHAIN_PATH=releases/$(echo $latest_tag | sed 's/^v//')