bci2: Correctly handle default branch w/ manifest

Fix hard-coded default branch name of *main* when pushing multi-arch
image manifests.
bci2-resources
Dustin 2024-01-19 14:40:53 -06:00
parent 1b37d9510d
commit c9eb592e0a
1 changed files with 1 additions and 1 deletions

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 {