1
0
mirror of synced 2026-03-22 18:26:55 +00:00

Merge pull request #3517 from jooooel/joel/fix-bug-in-action

Fix broken GitHub Action and handle case where VERSION is provided as an input
This commit is contained in:
Stefan Prodan
2023-01-26 16:54:41 +02:00
committed by GitHub

View File

@@ -36,9 +36,9 @@ runs:
# Ref: https://github.com/fluxcd/flux2/issues/3509#issuecomment-1400820992
VERSION_SLUG=$(curl https://api.github.com/repos/fluxcd/flux2/releases/latest --silent --location | grep tag_name)
fi
fi
VERSION=$(echo "${VERSION_SLUG}" | sed -E 's/.*"([^"]+)".*/\1/' | cut -c 2-)
VERSION=$(echo "${VERSION_SLUG}" | sed -E 's/.*"([^"]+)".*/\1/' | cut -c 2-)
fi
BIN_URL="https://github.com/fluxcd/flux2/releases/download/v${VERSION}/flux_${VERSION}_linux_${ARCH}.tar.gz"
curl --silent --fail --location "${BIN_URL}" --output /tmp/flux.tar.gz