.github: make each apply script take parameters CHECKOUT_SCRIPTS

To make Github Actions of LTS-2021 work with SDK containers,
checkout_branches needs to take an additional parameter
CHECKOUT_SCRIPTS. That defaults to true, but false only for LTS-2021.
This commit is contained in:
Dongsu Park 2022-09-09 14:52:40 +02:00
parent 51912fd7be
commit cb02d963aa
9 changed files with 19 additions and 9 deletions

View File

@ -3,12 +3,13 @@
set -euo pipefail set -euo pipefail
UPDATE_NEEDED=1 UPDATE_NEEDED=1
CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}"
. .github/workflows/common.sh . .github/workflows/common.sh
prepare_git_repo prepare_git_repo
if ! checkout_branches "${VERSION_NEW}-${TARGET}"; then if ! checkout_branches "${VERSION_NEW}-${TARGET}" "${CHECKOUT_SCRIPTS}"; then
UPDATE_NEEDED=0 UPDATE_NEEDED=0
exit 0 exit 0
fi fi

View File

@ -3,12 +3,13 @@
set -euo pipefail set -euo pipefail
UPDATE_NEEDED=1 UPDATE_NEEDED=1
CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}"
. .github/workflows/common.sh . .github/workflows/common.sh
prepare_git_repo prepare_git_repo
if ! checkout_branches "containerd-${VERSION_NEW}-${TARGET}"; then if ! checkout_branches "${VERSION_NEW}-${TARGET}" "${CHECKOUT_SCRIPTS}"; then
UPDATE_NEEDED=0 UPDATE_NEEDED=0
exit 0 exit 0
fi fi

View File

@ -3,12 +3,13 @@
set -euo pipefail set -euo pipefail
UPDATE_NEEDED=1 UPDATE_NEEDED=1
CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}"
. .github/workflows/common.sh . .github/workflows/common.sh
prepare_git_repo prepare_git_repo
if ! checkout_branches "docker-${VERSION_NEW}-${TARGET}"; then if ! checkout_branches "docker-${VERSION_NEW}-${TARGET}" "${CHECKOUT_SCRIPTS}"; then
UPDATE_NEEDED=0 UPDATE_NEEDED=0
exit 0 exit 0
fi fi

View File

@ -3,12 +3,13 @@
set -euo pipefail set -euo pipefail
UPDATE_NEEDED=1 UPDATE_NEEDED=1
CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}"
. .github/workflows/common.sh . .github/workflows/common.sh
prepare_git_repo prepare_git_repo
if ! checkout_branches "${VERSION_NEW}-${TARGET}"; then if ! checkout_branches "${VERSION_NEW}-${TARGET}" "${CHECKOUT_SCRIPTS}"; then
UPDATE_NEEDED=0 UPDATE_NEEDED=0
exit 0 exit 0
fi fi

View File

@ -19,13 +19,15 @@ for version_new in ${VERSIONS_NEW}; do
VERSIONS["${version_new_trimmed}"]="${version_new}" VERSIONS["${version_new_trimmed}"]="${version_new}"
done done
CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}"
. .github/workflows/common.sh . .github/workflows/common.sh
prepare_git_repo prepare_git_repo
branch_name="go-$(join_by '-and-' ${VERSIONS_NEW})-${TARGET}" branch_name="go-$(join_by '-and-' ${VERSIONS_NEW})-${TARGET}"
if ! checkout_branches "${branch_name}"; then if ! checkout_branches "${branch_name}" "${CHECKOUT_SCRIPTS}"; then
exit 0 exit 0
fi fi

View File

@ -5,12 +5,13 @@ set -euo pipefail
# trim the 3rd part in the input semver, e.g. from 5.4.1 to 5.4 # trim the 3rd part in the input semver, e.g. from 5.4.1 to 5.4
VERSION_SHORT=${VERSION_NEW%.*} VERSION_SHORT=${VERSION_NEW%.*}
UPDATE_NEEDED=1 UPDATE_NEEDED=1
CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}"
. .github/workflows/common.sh . .github/workflows/common.sh
prepare_git_repo prepare_git_repo
if ! checkout_branches "linux-${VERSION_NEW}-${TARGET}"; then if ! checkout_branches "linux-${VERSION_NEW}-${TARGET}" "${CHECKOUT_SCRIPTS}"; then
UPDATE_NEEDED=0 UPDATE_NEEDED=0
exit 0 exit 0
fi fi

View File

@ -3,12 +3,13 @@
set -euo pipefail set -euo pipefail
UPDATE_NEEDED=1 UPDATE_NEEDED=1
CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}"
. .github/workflows/common.sh . .github/workflows/common.sh
prepare_git_repo prepare_git_repo
if ! checkout_branches "runc-${VERSION_NEW}-${TARGET}"; then if ! checkout_branches "runc-${VERSION_NEW}-${TARGET}" "${CHECKOUT_SCRIPTS}"; then
UPDATE_NEEDED=0 UPDATE_NEEDED=0
exit 0 exit 0
fi fi

View File

@ -3,12 +3,13 @@
set -euo pipefail set -euo pipefail
UPDATE_NEEDED=1 UPDATE_NEEDED=1
CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}"
. .github/workflows/common.sh . .github/workflows/common.sh
prepare_git_repo prepare_git_repo
if ! checkout_branches "rust-${VERSION_NEW}-${TARGET}"; then if ! checkout_branches "rust-${VERSION_NEW}-${TARGET}" "${CHECKOUT_SCRIPTS}"; then
UPDATE_NEEDED=0 UPDATE_NEEDED=0
exit 0 exit 0
fi fi

View File

@ -3,12 +3,13 @@
set -euo pipefail set -euo pipefail
UPDATE_NEEDED=1 UPDATE_NEEDED=1
CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}"
. .github/workflows/common.sh . .github/workflows/common.sh
prepare_git_repo prepare_git_repo
if ! checkout_branches "${VERSION_NEW}-${TARGET}"; then if ! checkout_branches "${VERSION_NEW}-${TARGET}" "${CHECKOUT_SCRIPTS}"; then
UPDATE_NEEDED=0 UPDATE_NEEDED=0
exit 0 exit 0
fi fi