From 728a7aa4842294a42861dd93850523e212c0c84d Mon Sep 17 00:00:00 2001 From: thehedhly Date: Sun, 21 Jan 2024 12:17:32 +0100 Subject: [PATCH] Set build matrix --- .github/workflows/ci.yml | 9 ++++++++- Dockerfile | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b391e14..45c8d78 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,11 @@ on: jobs: build: + strategy: + matrix: + data: + - package: ansible-core + version: 2.16 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -28,7 +33,7 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: thehedhly/ansible + images: thehedhly/${{ matrix.data.package }} - name: 'Build and push' uses: docker/build-push-action@v5 with: @@ -38,5 +43,7 @@ jobs: file: Dockerfile tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + build-args: | + ANSIBLE_INSTALL_REFS=${{ matrix.data.package }}==${{ matrix.data.version }} # labels: # - "$BUILD_TIME" diff --git a/Dockerfile b/Dockerfile index aacaa4d..db748f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,8 @@ ARG SYS_ZONEINFO="Europe/Berlin" ARG ANSIBLE_HOME="/usr/share/ansible" ARG ANSIBLE_GALAXY_CLI_COLLECTION_OPTS="-v" ARG ANSIBLE_GALAXY_CLI_ROLE_OPTS="" -ARG ANSIBLE_INSTALL_REFS="ansible-core==2.16.0" +ARG ANSIBLE_INSTALL_REFS="" +# ARG ANSIBLE_INSTALL_REFS="ansible-core==2.16.0" # ARG ANSIBLE_INSTALL_REFS="ansible-core" # ARG ANSIBLE_INSTALL_REFS="ansible==9" # ARG ANSIBLE_INSTALL_REFS="ansible"