bci2: Correctly handle default branch w/ manifest

Fix hard-coded default branch name of *main* when pushing multi-arch
image manifests.
This commit is contained in:
2024-01-19 14:40:53 -06:00
parent 1b37d9510d
commit c9eb592e0a

View File

@@ -71,7 +71,7 @@ def call(args) {
if (archlist.size() > 1) {
sh "buildah manifest push --all ${full_name} docker://${full_name}-${env.BUILD_NUMBER}"
sh "buildah manifest push ${full_name} docker://${full_name}"
if (env.BRANCH_NAME == 'main') {
if (env.BRANCH_NAME == defaultBranch) {
sh "buildah manifest push ${full_name} docker://${repo}:latest"
}
} else {