Skip to content

fix(ci): upload each package once (#5289) #16

fix(ci): upload each package once (#5289)

fix(ci): upload each package once (#5289) #16

name: docker-builder-packaging-plugins
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
workflow_dispatch:
push:
branches:
- develop
paths:
- ".github/workflows/docker-builder-packaging-plugins.yml"
- ".github/docker/packaging/*"
pull_request:
paths:
- ".github/workflows/docker-builder-packaging-plugins.yml"
- ".github/docker/packaging/*"
jobs:
create-and-push-docker:
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-22.04
dockerfile: packaging-plugins-alma8
image: packaging-plugins-alma8
- runner: ubuntu-22.04
dockerfile: packaging-plugins-alma9
image: packaging-plugins-alma9
- runner: ubuntu-22.04
dockerfile: packaging-plugins-java-alma8
image: packaging-plugins-java-alma8
- runner: ubuntu-22.04
dockerfile: packaging-plugins-java-alma9
image: packaging-plugins-java-alma9
- runner: ubuntu-22.04
dockerfile: packaging-plugins-bullseye
image: packaging-plugins-bullseye
- runner: ["self-hosted", "collect-arm64"]
dockerfile: packaging-plugins-bullseye
image: packaging-plugins-bullseye-arm64
- runner: ubuntu-22.04
dockerfile: packaging-plugins-bookworm
image: packaging-plugins-bookworm
- runner: ubuntu-22.04
dockerfile: packaging-plugins-java-bullseye
image: packaging-plugins-java-bullseye
- runner: ubuntu-22.04
dockerfile: packaging-plugins-java-bookworm
image: packaging-plugins-java-bookworm
- runner: ubuntu-22.04
dockerfile: packaging-plugins-jammy
image: packaging-plugins-jammy
- runner: ubuntu-22.04
dockerfile: packaging-plugins-java-jammy
image: packaging-plugins-java-jammy
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Login to Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}
username: ${{ secrets.HARBOR_CENTREON_PUSH_USERNAME }}
password: ${{ secrets.HARBOR_CENTREON_PUSH_TOKEN }}
- name: Login to proxy registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ${{ vars.DOCKER_PROXY_REGISTRY_URL }}
username: ${{ secrets.HARBOR_CENTREON_PUSH_USERNAME }}
password: ${{ secrets.HARBOR_CENTREON_PUSH_TOKEN }}
- uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
- uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
with:
file: .github/docker/packaging/Dockerfile.${{ matrix.dockerfile }}
context: .
build-args: "REGISTRY_URL=${{ vars.DOCKER_PROXY_REGISTRY_URL }}"
pull: true
push: true
tags: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest