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..893453538c 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 @@ -2,14 +2,13 @@ set -euo pipefail -UPDATE_NEEDED=1 - . .github/workflows/common.sh +BRANCH_NAME="cacerts-${VERSION_NEW}-${TARGET}" + prepare_git_repo -if ! checkout_branches "${VERSION_NEW}-${TARGET}"; then - UPDATE_NEEDED=0 +if ! checkout_branches "${BRANCH_NAME}"; then exit 0 fi @@ -19,7 +18,6 @@ pushd "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" >/dev/null || exit VERSION_OLD=$(sed -n "s/^DIST nss-\([0-9]*\.[0-9]*\).*$/\1/p" app-misc/ca-certificates/Manifest | sort -ruV | head -n1) if [[ "${VERSION_NEW}" = "${VERSION_OLD}" ]]; then echo "already the latest ca-certificates, nothing to do" - UPDATE_NEEDED=0 exit 0 fi @@ -37,5 +35,6 @@ generate_patches app-misc ca-certificates ca-certificates apply_patches -echo ::set-output name=VERSION_OLD::"${VERSION_OLD}" -echo ::set-output name=UPDATE_NEEDED::"${UPDATE_NEEDED}" +echo "VERSION_OLD=${VERSION_OLD}" >>"${GITHUB_OUTPUT}" +echo "UPDATE_NEEDED=1" >>"${GITHUB_OUTPUT}" +echo "BRANCH_NAME=${BRANCH_NAME}" >>"${GITHUB_OUTPUT}" diff --git a/sdk_container/src/third_party/coreos-overlay/.github/workflows/cacerts-release.yml b/sdk_container/src/third_party/coreos-overlay/.github/workflows/cacerts-release.yml index 5450f0b7e9..e30def30df 100644 --- a/sdk_container/src/third_party/coreos-overlay/.github/workflows/cacerts-release.yml +++ b/sdk_container/src/third_party/coreos-overlay/.github/workflows/cacerts-release.yml @@ -47,7 +47,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} base: ${{ steps.figure-out-branch.outputs.BRANCH }} - branch: cacerts-${{ steps.fetch-latest-release.outputs.NSS_VERSION }}-${{ steps.figure-out-branch.outputs.BRANCH }} + branch: ${{ steps.apply-patch.outputs.BRANCH_NAME }} author: Flatcar Buildbot committer: Flatcar Buildbot title: Upgrade ca-certificates in ${{ steps.figure-out-branch.outputs.BRANCH }} from ${{ steps.apply-patch.outputs.VERSION_OLD }} to ${{ steps.fetch-latest-release.outputs.NSS_VERSION }}