mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-18 10:27:00 +02:00
Merge pull request #772 from kinvolk/dongsu/github-actions-envvar-string
.github: fix env vars and sed expressions
This commit is contained in:
commit
4f4a76a1a2
@ -13,14 +13,14 @@ fi
|
|||||||
|
|
||||||
pushd "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" >/dev/null || exit
|
pushd "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" >/dev/null || exit
|
||||||
|
|
||||||
VERSION_OLD=$(sed -n "s/^DIST containerd-\([0-9]*.[0-9]*.[0-9]*\).*/\1/p" app-emulation/containerd/Manifest | sort -ruV | head -n1)
|
VERSION_OLD=$(sed -n "s/^DIST containerd-\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p" app-emulation/containerd/Manifest | sort -ruV | head -n1)
|
||||||
if [[ "${VERSION_NEW}" = "${VERSION_OLD}" ]]; then
|
if [[ "${VERSION_NEW}" = "${VERSION_OLD}" ]]; then
|
||||||
echo "already the latest Containerd, nothing to do"
|
echo "already the latest Containerd, nothing to do"
|
||||||
UPDATE_NEEDED=0
|
UPDATE_NEEDED=0
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DOCKER_VERSION=$(sed -n "s/^DIST docker-\([0-9]*.[0-9]*.[0-9]*\).*/\1/p" app-emulation/docker/Manifest | sort -ruV | head -n1)
|
DOCKER_VERSION=$(sed -n "s/^DIST docker-\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p" app-emulation/docker/Manifest | sort -ruV | head -n1)
|
||||||
|
|
||||||
# we need to update not only the main ebuild file, but also its CONTAINERD_COMMIT,
|
# we need to update not only the main ebuild file, but also its CONTAINERD_COMMIT,
|
||||||
# which needs to point to COMMIT_HASH that matches with $VERSION_NEW from upstream containerd.
|
# which needs to point to COMMIT_HASH that matches with $VERSION_NEW from upstream containerd.
|
||||||
|
@ -14,7 +14,7 @@ jobs:
|
|||||||
id: fetch-latest-release
|
id: fetch-latest-release
|
||||||
run: |
|
run: |
|
||||||
git clone https://github.com/containerd/containerd
|
git clone https://github.com/containerd/containerd
|
||||||
versionMain=$(git -C containerd ls-remote --tags origin | cut -f2 | sed -n "/refs\/tags\/v[0-9]*.[0-9]*.[0-9]*$/s/^refs\/tags\/v//p" | egrep -v -e '(beta|rc)' | sort -ruV | head -n1)
|
versionMain=$(git -C containerd ls-remote --tags origin | cut -f2 | sed -n "/refs\/tags\/v[0-9]*\.[0-9]*\.[0-9]*$/s/^refs\/tags\/v//p" | egrep -v -e '(beta|rc)' | sort -ruV | head -n1)
|
||||||
commitMain=$(git -C containerd rev-parse v${versionMain})
|
commitMain=$(git -C containerd rev-parse v${versionMain})
|
||||||
rm -rf containerd
|
rm -rf containerd
|
||||||
echo ::set-output name=VERSION_MAIN::$(echo ${versionMain})
|
echo ::set-output name=VERSION_MAIN::$(echo ${versionMain})
|
||||||
|
@ -14,7 +14,7 @@ jobs:
|
|||||||
id: fetch-latest-release
|
id: fetch-latest-release
|
||||||
run: |
|
run: |
|
||||||
git clone https://github.com/docker/docker-ce docker
|
git clone https://github.com/docker/docker-ce docker
|
||||||
versionMain=$(git -C docker ls-remote --tags origin | cut -f2 | sed -n "/refs\/tags\/v[0-9]*.[0-9]*.[0-9]*$/s/^refs\/tags\/v//p" | egrep -v -e '(beta|rc)' | sort -ruV | head -n1)
|
versionMain=$(git -C docker ls-remote --tags origin | cut -f2 | sed -n "/refs\/tags\/v[0-9]*\.[0-9]*\.[0-9]*$/s/^refs\/tags\/v//p" | egrep -v -e '(beta|rc)' | sort -ruV | head -n1)
|
||||||
commitMain=$(git -C docker rev-parse --short=7 v${versionMain})
|
commitMain=$(git -C docker rev-parse --short=7 v${versionMain})
|
||||||
rm -rf docker
|
rm -rf docker
|
||||||
echo ::set-output name=VERSION_MAIN::$(echo ${versionMain})
|
echo ::set-output name=VERSION_MAIN::$(echo ${versionMain})
|
||||||
|
@ -13,10 +13,10 @@ jobs:
|
|||||||
- name: Fetch latest Go release
|
- name: Fetch latest Go release
|
||||||
id: fetch-latest-release
|
id: fetch-latest-release
|
||||||
env:
|
env:
|
||||||
GO_VERSION: 1.15
|
GO_VERSION: "1.15"
|
||||||
run: |
|
run: |
|
||||||
git clone --depth=1 --no-checkout https://github.com/golang/go
|
git clone --depth=1 --no-checkout https://github.com/golang/go
|
||||||
versionMain=$(git -C go ls-remote --tags origin | cut -f2 | sed -n "/refs\/tags\/go${GO_VERSION}.[0-9]*$/s/^refs\/tags\/go//p" | egrep -v -e '(beta|rc)' | sort -ruV | head -1)
|
versionMain=$(git -C go ls-remote --tags origin | cut -f2 | sed -n "/refs\/tags\/go${GO_VERSION}\.[0-9]*$/s/^refs\/tags\/go//p" | egrep -v -e '(beta|rc)' | sort -ruV | head -1)
|
||||||
rm -rf go
|
rm -rf go
|
||||||
echo ::set-output name=VERSION_MAIN::$(echo ${versionMain})
|
echo ::set-output name=VERSION_MAIN::$(echo ${versionMain})
|
||||||
echo ::set-output name=BASE_BRANCH_MAIN::main
|
echo ::set-output name=BASE_BRANCH_MAIN::main
|
||||||
|
@ -15,7 +15,7 @@ fi
|
|||||||
|
|
||||||
pushd "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" >/dev/null || exit
|
pushd "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" >/dev/null || exit
|
||||||
|
|
||||||
VERSION_OLD=$(sed -n "s/^DIST patch-\(${VERSION_SHORT}.[0-9]*\).*/\1/p" sys-kernel/coreos-sources/Manifest)
|
VERSION_OLD=$(sed -n "s/^DIST patch-\(${VERSION_SHORT}\.[0-9]*\).*/\1/p" sys-kernel/coreos-sources/Manifest)
|
||||||
if [[ -z "${VERSION_OLD}" ]]; then
|
if [[ -z "${VERSION_OLD}" ]]; then
|
||||||
VERSION_OLD=$(sed -n "s/^DIST linux-\(${VERSION_SHORT}*\).*/\1/p" sys-kernel/coreos-sources/Manifest)
|
VERSION_OLD=$(sed -n "s/^DIST linux-\(${VERSION_SHORT}*\).*/\1/p" sys-kernel/coreos-sources/Manifest)
|
||||||
fi
|
fi
|
||||||
|
@ -17,7 +17,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
KV_MAIN=$(curl -s -S -f -L "https://${CHANNEL}.release.flatcar-linux.net/amd64-usr/current/flatcar_production_image_packages.txt" | grep -o 'coreos-kernel.*' | cut -d '-' -f 3- | cut -d . -f 1-2)
|
KV_MAIN=$(curl -s -S -f -L "https://${CHANNEL}.release.flatcar-linux.net/amd64-usr/current/flatcar_production_image_packages.txt" | grep -o 'coreos-kernel.*' | cut -d '-' -f 3- | cut -d . -f 1-2)
|
||||||
git clone --depth=1 --no-checkout https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux
|
git clone --depth=1 --no-checkout https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux
|
||||||
versionMaintenance=$(git -C linux ls-remote --tags origin | cut -f2 | sed -n "/refs\/tags\/v${KV_MAIN}.[0-9]*$/s/^refs\/tags\/v//p" | sort -ruV | head -1)
|
versionMaintenance=$(git -C linux ls-remote --tags origin | cut -f2 | sed -n "/refs\/tags\/v${KV_MAIN}\.[0-9]*$/s/^refs\/tags\/v//p" | sort -ruV | head -1)
|
||||||
rm -rf linux
|
rm -rf linux
|
||||||
maintenanceBranch=$(curl -s -S -f -L "https://${CHANNEL}.release.flatcar-linux.net/amd64-usr/current/version.txt" | grep -m 1 FLATCAR_BUILD= | cut -d = -f 2-)
|
maintenanceBranch=$(curl -s -S -f -L "https://${CHANNEL}.release.flatcar-linux.net/amd64-usr/current/version.txt" | grep -m 1 FLATCAR_BUILD= | cut -d = -f 2-)
|
||||||
echo ::set-output name=VERSION_MAINTENANCE::$(echo ${versionMaintenance})
|
echo ::set-output name=VERSION_MAINTENANCE::$(echo ${versionMaintenance})
|
||||||
|
@ -17,7 +17,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
KV_MAIN=$(curl -s -S -f -L "https://${CHANNEL}.release.flatcar-linux.net/amd64-usr/current/flatcar_production_image_packages.txt" | grep -o 'coreos-kernel.*' | cut -d '-' -f 3- | cut -d . -f 1-2)
|
KV_MAIN=$(curl -s -S -f -L "https://${CHANNEL}.release.flatcar-linux.net/amd64-usr/current/flatcar_production_image_packages.txt" | grep -o 'coreos-kernel.*' | cut -d '-' -f 3- | cut -d . -f 1-2)
|
||||||
git clone --depth=1 --no-checkout https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux
|
git clone --depth=1 --no-checkout https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux
|
||||||
versionMaintenance=$(git -C linux ls-remote --tags origin | cut -f2 | sed -n "/refs\/tags\/v${KV_MAIN}.[0-9]*$/s/^refs\/tags\/v//p" | sort -ruV | head -1)
|
versionMaintenance=$(git -C linux ls-remote --tags origin | cut -f2 | sed -n "/refs\/tags\/v${KV_MAIN}\.[0-9]*$/s/^refs\/tags\/v//p" | sort -ruV | head -1)
|
||||||
rm -rf linux
|
rm -rf linux
|
||||||
maintenanceBranch=$(curl -s -S -f -L "https://${CHANNEL}.release.flatcar-linux.net/amd64-usr/current/version.txt" | grep -m 1 FLATCAR_BUILD= | cut -d = -f 2-)
|
maintenanceBranch=$(curl -s -S -f -L "https://${CHANNEL}.release.flatcar-linux.net/amd64-usr/current/version.txt" | grep -m 1 FLATCAR_BUILD= | cut -d = -f 2-)
|
||||||
echo ::set-output name=VERSION_MAINTENANCE::$(echo ${versionMaintenance})
|
echo ::set-output name=VERSION_MAINTENANCE::$(echo ${versionMaintenance})
|
||||||
|
@ -13,10 +13,10 @@ jobs:
|
|||||||
- name: Fetch latest Kernel release
|
- name: Fetch latest Kernel release
|
||||||
id: fetch-latest-release
|
id: fetch-latest-release
|
||||||
env:
|
env:
|
||||||
KV_MAIN: 5.10
|
KV_MAIN: "5.10"
|
||||||
run: |
|
run: |
|
||||||
git clone --depth=1 --no-checkout https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux
|
git clone --depth=1 --no-checkout https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux
|
||||||
versionMain=$(git -C linux ls-remote --tags origin | cut -f2 | sed -n "/refs\/tags\/v${KV_MAIN}.[0-9]*$/s/^refs\/tags\/v//p" | sort -ruV | head -1)
|
versionMain=$(git -C linux ls-remote --tags origin | cut -f2 | sed -n "/refs\/tags\/v${KV_MAIN}\.[0-9]*$/s/^refs\/tags\/v//p" | sort -ruV | head -1)
|
||||||
rm -rf linux
|
rm -rf linux
|
||||||
echo ::set-output name=VERSION_MAIN::$(echo ${versionMain})
|
echo ::set-output name=VERSION_MAIN::$(echo ${versionMain})
|
||||||
echo ::set-output name=BASE_BRANCH_MAIN::main
|
echo ::set-output name=BASE_BRANCH_MAIN::main
|
||||||
|
@ -17,7 +17,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
KV_MAIN=$(curl -s -S -f -L "https://${CHANNEL}.release.flatcar-linux.net/amd64-usr/current/flatcar_production_image_packages.txt" | grep -o 'coreos-kernel.*' | cut -d '-' -f 3- | cut -d . -f 1-2)
|
KV_MAIN=$(curl -s -S -f -L "https://${CHANNEL}.release.flatcar-linux.net/amd64-usr/current/flatcar_production_image_packages.txt" | grep -o 'coreos-kernel.*' | cut -d '-' -f 3- | cut -d . -f 1-2)
|
||||||
git clone --depth=1 --no-checkout https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux
|
git clone --depth=1 --no-checkout https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux
|
||||||
versionMaintenance=$(git -C linux ls-remote --tags origin | cut -f2 | sed -n "/refs\/tags\/v${KV_MAIN}.[0-9]*$/s/^refs\/tags\/v//p" | sort -ruV | head -1)
|
versionMaintenance=$(git -C linux ls-remote --tags origin | cut -f2 | sed -n "/refs\/tags\/v${KV_MAIN}\.[0-9]*$/s/^refs\/tags\/v//p" | sort -ruV | head -1)
|
||||||
rm -rf linux
|
rm -rf linux
|
||||||
maintenanceBranch=$(curl -s -S -f -L "https://${CHANNEL}.release.flatcar-linux.net/amd64-usr/current/version.txt" | grep -m 1 FLATCAR_BUILD= | cut -d = -f 2-)
|
maintenanceBranch=$(curl -s -S -f -L "https://${CHANNEL}.release.flatcar-linux.net/amd64-usr/current/version.txt" | grep -m 1 FLATCAR_BUILD= | cut -d = -f 2-)
|
||||||
echo ::set-output name=VERSION_MAINTENANCE::$(echo ${versionMaintenance})
|
echo ::set-output name=VERSION_MAINTENANCE::$(echo ${versionMaintenance})
|
||||||
|
@ -16,7 +16,7 @@ pushd "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" >/dev/null || exit
|
|||||||
# Get the original runc version, including official releases and rc versions.
|
# Get the original runc version, including official releases and rc versions.
|
||||||
# We need some sed tweaks like adding underscore, sort, and trim the underscore again,
|
# We need some sed tweaks like adding underscore, sort, and trim the underscore again,
|
||||||
# so that sort -V can give the newest version including non-rc versions.
|
# so that sort -V can give the newest version including non-rc versions.
|
||||||
VERSION_OLD=$(sed -n "s/^DIST docker-runc-\([0-9]*.[0-9]*.*\)\.tar.*/\1/p" app-emulation/docker-runc/Manifest | sed '/-/!{s/$/_/}' | sort -ruV | sed 's/_$//' | head -n1 | tr '-' '_')
|
VERSION_OLD=$(sed -n "s/^DIST docker-runc-\([0-9]*\.[0-9]*.*\)\.tar.*/\1/p" app-emulation/docker-runc/Manifest | sed '/-/!{s/$/_/}' | sort -ruV | sed 's/_$//' | head -n1 | tr '-' '_')
|
||||||
if [[ "${VERSION_NEW}" = "${VERSION_OLD}" ]]; then
|
if [[ "${VERSION_NEW}" = "${VERSION_OLD}" ]]; then
|
||||||
echo "already the latest Runc, nothing to do"
|
echo "already the latest Runc, nothing to do"
|
||||||
UPDATE_NEEDED=0
|
UPDATE_NEEDED=0
|
||||||
|
@ -17,7 +17,7 @@ jobs:
|
|||||||
# Get the newest runc version, including official releases and rc versions.
|
# Get the newest runc version, including official releases and rc versions.
|
||||||
# We need some sed tweaks like adding underscore, sort, and trim the underscore again,
|
# We need some sed tweaks like adding underscore, sort, and trim the underscore again,
|
||||||
# so that sort -V can give the newest version including non-rc versions.
|
# so that sort -V can give the newest version including non-rc versions.
|
||||||
versionMain=$(git -C runc ls-remote --tags origin | cut -f2 | sed '/-/!{s/$/_/}' | sed -n "/refs\/tags\/v[0-9]*.[0-9]*.[0-9]*/s/^refs\/tags\/v//p" |grep -v '\{\}$' | sort -ruV | sed 's/_$//' | head -n1)
|
versionMain=$(git -C runc ls-remote --tags origin | cut -f2 | sed '/-/!{s/$/_/}' | sed -n "/refs\/tags\/v[0-9]*\.[0-9]*\.[0-9]*/s/^refs\/tags\/v//p" |grep -v '\{\}$' | sort -ruV | sed 's/_$//' | head -n1)
|
||||||
commitMain="$(git -C runc rev-parse v${versionMain})"
|
commitMain="$(git -C runc rev-parse v${versionMain})"
|
||||||
versionMain="${versionMain//-/_}"
|
versionMain="${versionMain//-/_}"
|
||||||
rm -rf runc
|
rm -rf runc
|
||||||
|
@ -13,7 +13,7 @@ fi
|
|||||||
|
|
||||||
pushd "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" >/dev/null || exit
|
pushd "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" >/dev/null || exit
|
||||||
|
|
||||||
VERSION_OLD=$(sed -n "s/^DIST rustc-\(1.[0-9]*.[0-9]*\).*/\1/p" dev-lang/rust/Manifest | sort -ruV | head -n1)
|
VERSION_OLD=$(sed -n "s/^DIST rustc-\(1\.[0-9]*\.[0-9]*\).*/\1/p" dev-lang/rust/Manifest | sort -ruV | head -n1)
|
||||||
if [[ "${VERSION_NEW}" = "${VERSION_OLD}" ]]; then
|
if [[ "${VERSION_NEW}" = "${VERSION_OLD}" ]]; then
|
||||||
echo "already the latest Rust, nothing to do"
|
echo "already the latest Rust, nothing to do"
|
||||||
UPDATE_NEEDED=0
|
UPDATE_NEEDED=0
|
||||||
|
@ -14,7 +14,7 @@ jobs:
|
|||||||
id: fetch-latest-release
|
id: fetch-latest-release
|
||||||
run: |
|
run: |
|
||||||
git clone --depth=1 --no-checkout https://github.com/rust-lang/rust
|
git clone --depth=1 --no-checkout https://github.com/rust-lang/rust
|
||||||
versionMain=$(git -C rust ls-remote --tags origin | cut -f2 | sed -n "/refs\/tags\/1.[0-9]*.[0-9]*$/s/^refs\/tags\///p" | sort -ruV | head -n1)
|
versionMain=$(git -C rust ls-remote --tags origin | cut -f2 | sed -n "/refs\/tags\/1\.[0-9]*\.[0-9]*$/s/^refs\/tags\///p" | sort -ruV | head -n1)
|
||||||
rm -rf rust
|
rm -rf rust
|
||||||
echo ::set-output name=VERSION_MAIN::$(echo ${versionMain})
|
echo ::set-output name=VERSION_MAIN::$(echo ${versionMain})
|
||||||
echo ::set-output name=BASE_BRANCH_MAIN::main
|
echo ::set-output name=BASE_BRANCH_MAIN::main
|
||||||
|
Loading…
Reference in New Issue
Block a user