From cb02d963aaefac51ce5afc823a8bb7f367906e5d Mon Sep 17 00:00:00 2001 From: Dongsu Park Date: Fri, 9 Sep 2022 14:52:40 +0200 Subject: [PATCH] .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. --- .../coreos-overlay/.github/workflows/cacerts-apply-patch.sh | 3 ++- .../.github/workflows/containerd-apply-patch.sh | 3 ++- .../coreos-overlay/.github/workflows/docker-apply-patch.sh | 3 ++- .../coreos-overlay/.github/workflows/firmware-apply-patch.sh | 3 ++- .../coreos-overlay/.github/workflows/go-apply-patch.sh | 4 +++- .../coreos-overlay/.github/workflows/kernel-apply-patch.sh | 3 ++- .../coreos-overlay/.github/workflows/runc-apply-patch.sh | 3 ++- .../coreos-overlay/.github/workflows/rust-apply-patch.sh | 3 ++- .../coreos-overlay/.github/workflows/vmware-apply-patch.sh | 3 ++- 9 files changed, 19 insertions(+), 9 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/.github/workflows/cacerts-apply-patch.sh b/sdk_container/src/third_party/coreos-overlay/.github/workflows/cacerts-apply-patch.sh index d74de66f6c..19515ff5dd 100755 --- a/sdk_container/src/third_party/coreos-overlay/.github/workflows/cacerts-apply-patch.sh +++ b/sdk_container/src/third_party/coreos-overlay/.github/workflows/cacerts-apply-patch.sh @@ -3,12 +3,13 @@ set -euo pipefail UPDATE_NEEDED=1 +CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}" . .github/workflows/common.sh prepare_git_repo -if ! checkout_branches "${VERSION_NEW}-${TARGET}"; then +if ! checkout_branches "${VERSION_NEW}-${TARGET}" "${CHECKOUT_SCRIPTS}"; then UPDATE_NEEDED=0 exit 0 fi diff --git a/sdk_container/src/third_party/coreos-overlay/.github/workflows/containerd-apply-patch.sh b/sdk_container/src/third_party/coreos-overlay/.github/workflows/containerd-apply-patch.sh index eafdf2ac38..fa4285b55d 100755 --- a/sdk_container/src/third_party/coreos-overlay/.github/workflows/containerd-apply-patch.sh +++ b/sdk_container/src/third_party/coreos-overlay/.github/workflows/containerd-apply-patch.sh @@ -3,12 +3,13 @@ set -euo pipefail UPDATE_NEEDED=1 +CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}" . .github/workflows/common.sh prepare_git_repo -if ! checkout_branches "containerd-${VERSION_NEW}-${TARGET}"; then +if ! checkout_branches "${VERSION_NEW}-${TARGET}" "${CHECKOUT_SCRIPTS}"; then UPDATE_NEEDED=0 exit 0 fi diff --git a/sdk_container/src/third_party/coreos-overlay/.github/workflows/docker-apply-patch.sh b/sdk_container/src/third_party/coreos-overlay/.github/workflows/docker-apply-patch.sh index 2e953f33f9..75f89b6192 100755 --- a/sdk_container/src/third_party/coreos-overlay/.github/workflows/docker-apply-patch.sh +++ b/sdk_container/src/third_party/coreos-overlay/.github/workflows/docker-apply-patch.sh @@ -3,12 +3,13 @@ set -euo pipefail UPDATE_NEEDED=1 +CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}" . .github/workflows/common.sh prepare_git_repo -if ! checkout_branches "docker-${VERSION_NEW}-${TARGET}"; then +if ! checkout_branches "docker-${VERSION_NEW}-${TARGET}" "${CHECKOUT_SCRIPTS}"; then UPDATE_NEEDED=0 exit 0 fi diff --git a/sdk_container/src/third_party/coreos-overlay/.github/workflows/firmware-apply-patch.sh b/sdk_container/src/third_party/coreos-overlay/.github/workflows/firmware-apply-patch.sh index 430ceec9ba..d8d8ea761b 100755 --- a/sdk_container/src/third_party/coreos-overlay/.github/workflows/firmware-apply-patch.sh +++ b/sdk_container/src/third_party/coreos-overlay/.github/workflows/firmware-apply-patch.sh @@ -3,12 +3,13 @@ set -euo pipefail UPDATE_NEEDED=1 +CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}" . .github/workflows/common.sh prepare_git_repo -if ! checkout_branches "${VERSION_NEW}-${TARGET}"; then +if ! checkout_branches "${VERSION_NEW}-${TARGET}" "${CHECKOUT_SCRIPTS}"; then UPDATE_NEEDED=0 exit 0 fi diff --git a/sdk_container/src/third_party/coreos-overlay/.github/workflows/go-apply-patch.sh b/sdk_container/src/third_party/coreos-overlay/.github/workflows/go-apply-patch.sh index fdd17e680d..b34b28692d 100755 --- a/sdk_container/src/third_party/coreos-overlay/.github/workflows/go-apply-patch.sh +++ b/sdk_container/src/third_party/coreos-overlay/.github/workflows/go-apply-patch.sh @@ -19,13 +19,15 @@ for version_new in ${VERSIONS_NEW}; do VERSIONS["${version_new_trimmed}"]="${version_new}" done +CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}" + . .github/workflows/common.sh prepare_git_repo 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 fi diff --git a/sdk_container/src/third_party/coreos-overlay/.github/workflows/kernel-apply-patch.sh b/sdk_container/src/third_party/coreos-overlay/.github/workflows/kernel-apply-patch.sh index 9846ccc5f8..1dc1dd35c7 100755 --- a/sdk_container/src/third_party/coreos-overlay/.github/workflows/kernel-apply-patch.sh +++ b/sdk_container/src/third_party/coreos-overlay/.github/workflows/kernel-apply-patch.sh @@ -5,12 +5,13 @@ set -euo pipefail # trim the 3rd part in the input semver, e.g. from 5.4.1 to 5.4 VERSION_SHORT=${VERSION_NEW%.*} UPDATE_NEEDED=1 +CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}" . .github/workflows/common.sh prepare_git_repo -if ! checkout_branches "linux-${VERSION_NEW}-${TARGET}"; then +if ! checkout_branches "linux-${VERSION_NEW}-${TARGET}" "${CHECKOUT_SCRIPTS}"; then UPDATE_NEEDED=0 exit 0 fi diff --git a/sdk_container/src/third_party/coreos-overlay/.github/workflows/runc-apply-patch.sh b/sdk_container/src/third_party/coreos-overlay/.github/workflows/runc-apply-patch.sh index 0efc7abd11..8e61e0b073 100755 --- a/sdk_container/src/third_party/coreos-overlay/.github/workflows/runc-apply-patch.sh +++ b/sdk_container/src/third_party/coreos-overlay/.github/workflows/runc-apply-patch.sh @@ -3,12 +3,13 @@ set -euo pipefail UPDATE_NEEDED=1 +CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}" . .github/workflows/common.sh prepare_git_repo -if ! checkout_branches "runc-${VERSION_NEW}-${TARGET}"; then +if ! checkout_branches "runc-${VERSION_NEW}-${TARGET}" "${CHECKOUT_SCRIPTS}"; then UPDATE_NEEDED=0 exit 0 fi diff --git a/sdk_container/src/third_party/coreos-overlay/.github/workflows/rust-apply-patch.sh b/sdk_container/src/third_party/coreos-overlay/.github/workflows/rust-apply-patch.sh index c09ced47ac..3cd5c50a0a 100755 --- a/sdk_container/src/third_party/coreos-overlay/.github/workflows/rust-apply-patch.sh +++ b/sdk_container/src/third_party/coreos-overlay/.github/workflows/rust-apply-patch.sh @@ -3,12 +3,13 @@ set -euo pipefail UPDATE_NEEDED=1 +CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}" . .github/workflows/common.sh prepare_git_repo -if ! checkout_branches "rust-${VERSION_NEW}-${TARGET}"; then +if ! checkout_branches "rust-${VERSION_NEW}-${TARGET}" "${CHECKOUT_SCRIPTS}"; then UPDATE_NEEDED=0 exit 0 fi diff --git a/sdk_container/src/third_party/coreos-overlay/.github/workflows/vmware-apply-patch.sh b/sdk_container/src/third_party/coreos-overlay/.github/workflows/vmware-apply-patch.sh index 20f61d5468..898132ff93 100755 --- a/sdk_container/src/third_party/coreos-overlay/.github/workflows/vmware-apply-patch.sh +++ b/sdk_container/src/third_party/coreos-overlay/.github/workflows/vmware-apply-patch.sh @@ -3,12 +3,13 @@ set -euo pipefail UPDATE_NEEDED=1 +CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}" . .github/workflows/common.sh prepare_git_repo -if ! checkout_branches "${VERSION_NEW}-${TARGET}"; then +if ! checkout_branches "${VERSION_NEW}-${TARGET}" "${CHECKOUT_SCRIPTS}"; then UPDATE_NEEDED=0 exit 0 fi