diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml index 7d9a0f0..65deb10 100644 --- a/.github/workflows/build-and-push.yml +++ b/.github/workflows/build-and-push.yml @@ -9,11 +9,11 @@ on: - main - "jdk-.*" -env: - cci_src_image: cimg/openjdk:11.0.20-node - jobs: build: + strategy: + matrix: + jdk_version: [11.0.20, 17.0.9] name: Buid and push Docker Images runs-on: ubuntu-latest steps: @@ -26,9 +26,9 @@ jobs: - name: Creating tag from CircleCI image shell: bash run: | - echo "CCI_SRC_IMAGE=${{ env.cci_src_image }}" >> $GITHUB_ENV - echo "JAHIA_TAG=$(echo ${{ env.cci_src_image }} | sed -r 's/[:\/]+/_/g')" >> $GITHUB_ENV - echo "FROM_IMAGE=jahia/cimg-mvn-cache:$(echo ${{ env.cci_src_image }} | sed -r 's/[:\/]+/_/g')" >> $GITHUB_ENV + echo "CCI_SRC_IMAGE=${{ matrix.jdk_version }}" >> $GITHUB_ENV + echo "JAHIA_TAG=$(echo ${{ matrix.jdk_version }} | sed -r 's/[:\/]+/_/g')" >> $GITHUB_ENV + echo "FROM_IMAGE=jahia/cimg-mvn-cache:$(echo ${{ matrix.jdk_version }} | sed -r 's/[:\/]+/_/g')" >> $GITHUB_ENV - name: Printing CircleCI image tags shell: bash run: | diff --git a/README.md b/README.md index faac935..05ee625 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ -# CircleCI Maven Cache images +# CircleCI Maven Cache images -The objective of this repository is to warmup CircleCI maven cache by fetching the most common Jahia dependencies. +The objective of this repository is to provide custom Docker images that are based on the official CircleCI images. +They are used to speed up the build process by providing a pre-warmed maven cache. These images will be rebuilt at regular interval and aim at being used by any of our jobs that would need access to maven artifacts. @@ -18,3 +19,12 @@ The images are updated when changes are pushed to the repository or nightly. Images are being pushed to https://hub.docker.com/repository/docker/jahia/cimg-mvn-cache +## JDK Support + +the `matrix` strategy is used to build images for multiple JDK versions. The [following[.github/workflows/build-and-push.yml#L13-L16] JDK versions are supported: +``` + strategy: + matrix: + jdk_version: [11.0.20, 17.0.9] + ``` +