diff --git a/.woodpecker/.build-perls.yml b/.woodpecker/.build-perls.yml index 57cc9e9..fe93ca3 100644 --- a/.woodpecker/.build-perls.yml +++ b/.woodpecker/.build-perls.yml @@ -11,7 +11,8 @@ steps: - tar -xvJf output-${CI_PIPELINE_NUMBER}.tar.xz - cpanm --installdeps . - docker login -u simcop2387 -p $GITEA_DOCKER_TOKEN gitea.simcop2387.info - - perl build.pl --suffix $CI_PIPELINE_CREATED --build_args OS_TAG=-$CI_PIPELINE_CREATED + - docker login -u="simcop2387+perl_debug_robot" -p $QUAY_IO_DOCKER_TOKEN quay.io + - perl build.pl --suffix $CI_PIPELINE_CREATED --build_args OS_TAG=-$CI_PIPELINE_CREATED --push_repo gitea.simcop2387.info/simcop2387/perl-containers --push_repo quay.io/simcop2387/perl-debug-containers secrets: [gitea_docker_token] volumes: - /var/run/docker.sock:/var/run/docker.sock diff --git a/build.pl b/build.pl index 63f22fe..9e1b21d 100755 --- a/build.pl +++ b/build.pl @@ -21,10 +21,10 @@ my @versions = ("5.20.3", "5.22.4", "5.24.4", "5.26.3", "5.28.3", "5.30.3", "5.3 my $max_workers = 8; my $verbose = 1; my $suffix = ""; -my $push_repo = "gitea.simcop2387.info/simcop2387/perl-container"; my $arch = 'amd64'; my %build_args = (); my $skip_build = 0; +my @push_repo = (); my %major_versions = ( 5.10 => '5.10.1', @@ -52,11 +52,11 @@ GetOptions('verbose' => \$verbose, 'quiet' => sub {$verbose = 0}, 'workers=i' => \$max_workers, 'suffix=s' => \$suffix, - 'push_repo=s' => \$push_repo, 'arch=s' => \$arch, 'build_args=s%' => \%build_args, 'skip_build' => \$skip_build, 'filter_tags=s' => \$filter_tags_str, + 'push_repo=s@' => \@push_repo, ); my $filter_tags_re = qr/$filter_tags_str/; @@ -194,7 +194,12 @@ my $builder = IO::Async::Function->new( if ($workdir->exists()) { chdir($workdir); - my @tag_args = map {("-t", "${push_repo}:$_")} @$tags; + my @tag_args = (); + + for my $push_repo (@push_repo) { + push @tag_args, map {("-t", "${push_repo}:$_")} @$tags; + } + my @labels = map {my $k=$_; my $v=$labels{$k}; ("--label", "$k=$v")} keys %labels; my @buildargs = map {my $k=$_; my $v=$build_args{$k}; ("--build-arg", "$k=$v")} keys %build_args;