chore(deps): bump docker/setup-buildx-action from 3.12.0 to 4.1.0 #612
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: | |
| dependency-scan: | |
| uses: centreon/security-tools/.github/workflows/dependency-analysis.yml@main | |
| get-environment: | |
| needs: [dependency-scan] | |
| uses: ./.github/workflows/get-environment.yml | |
| dockerize: | |
| needs: [get-environment] | |
| if: | | |
| needs.get-environment.outputs.skip_workflow == 'false' && | |
| needs.get-environment.outputs.stability != 'stable' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - runner: ubuntu-24.04 | |
| dockerfile: packaging-plugins-alma8 | |
| image: packaging | |
| distrib: alma8 | |
| arch: amd64 | |
| - runner: ubuntu-24.04 | |
| dockerfile: packaging-plugins-alma9 | |
| image: packaging | |
| distrib: alma9 | |
| arch: amd64 | |
| - runner: ubuntu-24.04 | |
| dockerfile: packaging-plugins-alma10 | |
| image: packaging | |
| distrib: alma10 | |
| arch: amd64 | |
| - runner: ubuntu-24.04 | |
| dockerfile: packaging-plugins-java-alma8 | |
| image: packaging-java | |
| distrib: alma8 | |
| arch: amd64 | |
| - runner: ubuntu-24.04 | |
| dockerfile: packaging-plugins-java-alma9 | |
| image: packaging-java | |
| distrib: alma9 | |
| arch: amd64 | |
| - runner: ubuntu-24.04 | |
| dockerfile: packaging-plugins-java-alma10 | |
| image: packaging-java | |
| distrib: alma10 | |
| arch: amd64 | |
| - runner: ubuntu-24.04 | |
| dockerfile: packaging-plugins-bullseye | |
| image: packaging | |
| distrib: bullseye | |
| arch: amd64 | |
| - runner: ubuntu-24.04-arm | |
| dockerfile: packaging-plugins-bullseye | |
| image: packaging | |
| distrib: bullseye | |
| arch: arm64 | |
| - runner: ubuntu-24.04 | |
| dockerfile: packaging-plugins-bookworm | |
| image: packaging | |
| distrib: bookworm | |
| arch: amd64 | |
| - runner: ubuntu-24.04-arm | |
| dockerfile: packaging-plugins-bookworm | |
| image: packaging | |
| distrib: bookworm | |
| arch: arm64 | |
| - runner: ubuntu-24.04 | |
| dockerfile: packaging-plugins-trixie | |
| image: packaging | |
| distrib: trixie | |
| arch: amd64 | |
| - runner: ubuntu-24.04-arm | |
| dockerfile: packaging-plugins-trixie | |
| image: packaging | |
| distrib: trixie | |
| arch: arm64 | |
| - runner: ubuntu-24.04 | |
| dockerfile: packaging-plugins-java-bullseye | |
| image: packaging-java | |
| distrib: bullseye | |
| arch: amd64 | |
| - runner: ubuntu-24.04 | |
| dockerfile: packaging-plugins-java-bookworm | |
| image: packaging-java | |
| distrib: bookworm | |
| arch: amd64 | |
| - runner: ubuntu-24.04 | |
| dockerfile: packaging-plugins-java-trixie | |
| image: packaging-java | |
| distrib: trixie | |
| arch: amd64 | |
| - runner: ubuntu-24.04 | |
| dockerfile: packaging-plugins-jammy | |
| image: packaging | |
| distrib: jammy | |
| arch: amd64 | |
| - runner: ubuntu-24.04 | |
| dockerfile: packaging-plugins-java-jammy | |
| image: packaging-java | |
| distrib: jammy | |
| arch: amd64 | |
| - runner: ubuntu-24.04 | |
| dockerfile: packaging-plugins-noble | |
| image: packaging | |
| distrib: noble | |
| arch: amd64 | |
| - runner: ubuntu-24.04 | |
| dockerfile: packaging-plugins-java-noble | |
| image: packaging-java | |
| distrib: noble | |
| arch: amd64 | |
| runs-on: ${{ matrix.runner }} | |
| permissions: | |
| packages: write | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Login to proxy registry | |
| uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0 | |
| with: | |
| registry: ${{ vars.DOCKER_PROXY_REGISTRY_URL }} | |
| username: ${{ secrets.HARBOR_CENTREON_PUSH_USERNAME }} | |
| password: ${{ secrets.HARBOR_CENTREON_PUSH_TOKEN }} | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ github.token }} | |
| - uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0 | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0 | |
| with: | |
| images: ghcr.io/${{ github.repository }}/${{ matrix.image }} | |
| labels: | | |
| org.opencontainers.image.description=Packaging image for Centreon Plugins packaging | |
| com.centreon.stability=${{ needs.get-environment.outputs.stability }} | |
| com.centreon.version=${{ needs.get-environment.outputs.version }} | |
| - uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0 | |
| with: | |
| file: .github/docker/packaging/Dockerfile.${{ matrix.dockerfile }} | |
| context: . | |
| build-args: "REGISTRY_URL=${{ vars.DOCKER_PROXY_REGISTRY_URL }}" | |
| pull: true | |
| push: true | |
| tags: ghcr.io/${{ github.repository }}/${{ matrix.image }}:${{ matrix.distrib }}-${{ matrix.arch }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| compute-merge-matrix: | |
| needs: [get-environment] | |
| if: | | |
| needs.get-environment.outputs.skip_workflow == 'false' && | |
| needs.get-environment.outputs.stability != 'stable' | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| matrix: ${{ steps.compute.outputs.matrix }} | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Compute merge matrix | |
| id: compute | |
| shell: bash | |
| run: | | |
| matrix=$(yq -o=json '.jobs.dockerize.strategy.matrix.include' \ | |
| .github/workflows/docker-builder-packaging-plugins.yml | \ | |
| jq -c ' | |
| group_by([.image, .distrib]) | | |
| map({ | |
| image: .[0].image, | |
| distrib: .[0].distrib, | |
| archs: (map(.arch) | join(" ")) | |
| }) | | |
| {include: .} | |
| ') | |
| echo "matrix=$matrix" >> $GITHUB_OUTPUT | |
| merge: | |
| needs: [get-environment, dockerize, compute-merge-matrix] | |
| if: | | |
| needs.get-environment.outputs.skip_workflow == 'false' && | |
| needs.get-environment.outputs.stability != 'stable' | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| packages: write | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.compute-merge-matrix.outputs.matrix) }} | |
| steps: | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ github.token }} | |
| - uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0 | |
| - name: Create multi-platform manifest | |
| shell: bash | |
| run: | | |
| SOURCE="" | |
| for arch in ${{ matrix.archs }}; do | |
| SOURCE="$SOURCE ghcr.io/${{ github.repository }}/${{ matrix.image }}:${{ matrix.distrib }}-$arch" | |
| done | |
| docker buildx imagetools create \ | |
| --tag ghcr.io/${{ github.repository }}/${{ matrix.image }}:${{ matrix.distrib }} \ | |
| $SOURCE | |
| set-skip-label: | |
| needs: [get-environment, merge] | |
| if: | | |
| needs.get-environment.outputs.skip_workflow == 'false' && | |
| ! cancelled() && | |
| ! contains(needs.*.result, 'failure') && | |
| ! contains(needs.*.result, 'cancelled') | |
| uses: ./.github/workflows/set-pull-request-skip-label.yml |