chore(ci): package lua-curl (#1557) (#1562) #1000
Workflow file for this run
This file contains 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 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- develop | |
- dev-[2-9][0-9].[0-9][0-9].x | |
paths: | |
- '.github/docker/Dockerfile.centreon-collect-*' | |
pull_request: | |
paths: | |
- '.github/docker/Dockerfile.centreon-collect-*' | |
jobs: | |
get-version: | |
uses: ./.github/workflows/get-version.yml | |
with: | |
version_file: CMakeLists.txt | |
create-and-push-docker: | |
needs: [get-version] | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- runner: collect | |
dockerfile: centreon-collect-alma8 | |
image: centreon-collect-alma8 | |
tag: ${{ needs.get-version.outputs.img_version }} | |
- runner: collect | |
dockerfile: centreon-collect-alma9 | |
image: centreon-collect-alma9 | |
tag: ${{ needs.get-version.outputs.img_version }} | |
- runner: collect | |
dockerfile: centreon-collect-alma9-test | |
image: centreon-collect-alma9-test | |
tag: ${{ needs.get-version.outputs.test_img_version }} | |
- runner: collect | |
dockerfile: centreon-collect-mysql-alma9 | |
image: centreon-collect-mysql-alma9 | |
tag: ${{ needs.get-version.outputs.img_version }} | |
- runner: collect | |
dockerfile: centreon-collect-mysql-alma9-test | |
image: centreon-collect-mysql-alma9-test | |
tag: ${{ needs.get-version.outputs.test_img_version }} | |
- runner: collect | |
dockerfile: centreon-collect-debian-bullseye | |
image: centreon-collect-debian-bullseye | |
tag: ${{ needs.get-version.outputs.img_version }} | |
- runner: collect | |
dockerfile: centreon-collect-debian-bullseye-test | |
image: centreon-collect-debian-bullseye-test | |
tag: ${{ needs.get-version.outputs.test_img_version }} | |
runs-on: ${{ fromJson(format('["self-hosted", "{0}"]', matrix.runner)) }} | |
name: build container ${{ matrix.image }} | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Login to Registry | |
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0 | |
with: | |
registry: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }} | |
username: ${{ secrets.DOCKER_REGISTRY_ID }} | |
password: ${{ secrets.DOCKER_REGISTRY_PASSWD }} | |
- name: Login to Proxy Registry | |
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0 | |
with: | |
registry: ${{ vars.DOCKER_PROXY_REGISTRY_URL }} | |
username: ${{ secrets.DOCKER_REGISTRY_ID }} | |
password: ${{ secrets.DOCKER_REGISTRY_PASSWD }} | |
- uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 | |
- name: Build image ${{ matrix.image }}:${{ matrix.tag }} | |
uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0 | |
with: | |
file: .github/docker/Dockerfile.${{ matrix.dockerfile }} | |
context: . | |
build-args: "REGISTRY_URL=${{ vars.DOCKER_PROXY_REGISTRY_URL }}" | |
platforms: ${{ contains(matrix.runner, 'arm') && 'linux/arm64' || 'linux/amd64' }} | |
pull: true | |
push: true | |
tags: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:${{ matrix.tag }} |