Add build args support

This commit is contained in:
Nikolai Rodionov 2024-02-27 16:35:31 +01:00
parent 9fabf0ce6e
commit ff4a98f2ac
Signed by: allanger
GPG Key ID: 0AA46A90E25592AD

View File

@ -42,8 +42,9 @@ my $custom_tag = $ENV{'CUSTOM_TAG'} || "";
my $username = $ENV{'DRONE_USERNAME'} || "allanger";
my $password = $ENV{'GITEA_TOKEN'} || "YOU NOT AUTHORIZED, PAL";
my $containerfile = $ENV{'CONTAINERFILE'} || "Containerfile";
my $args = $ENV{'BUILD_ARGS'};
0 == system ("buildah login --username $username --password $password $container_registry") or die $!;
0 == system ("buildah bud -t $tag -f $containerfile .") or die $!;
0 == system ("buildah bud -t $tag -f $containerfile $args .") or die $!;
0 == system ("buildah push $tag") or die $!;
# ---------------------------------------------------------------------------
# -- Push the latest if the branch is main