This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-starter.git
commit 135c0937ddeff4da114e9c88186c397430755438 Author: Robert Munteanu <[email protected]> AuthorDate: Wed Apr 12 20:34:55 2023 +0300 SLING-11714 - Multi-arch support for Docker images Restrict pushes to master pushes, for now. This simplifies testing. --- .github/workflows/docker-push.yml | 18 ++++-------------- pom.xml | 7 ++++--- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index 25fcf73..7ae465b 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -18,14 +18,9 @@ name: Push Sling Starter Docker images on: - workflow_dispatch: - inputs: - git_tag: - description: 'Git tag name' - required: true - image_tag: - description: 'Docker image tag name' - required: true + push: + branches: + - master jobs: sling-starter-push-image: @@ -47,14 +42,9 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Checkout latest tag - run: | - git fetch --all - git fetch --tags - git checkout tags/${{ github.event.inputs.git_tag }} - name: Set up QEMU # https://github.com/docker/buildx/issues/499 uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - name: Push Docker image - run: mvn --batch-mode clean install -Ddocker.image.tag=${{ github.event.inputs.image_tag }} -Dmaven.test.skip=true -Ddocker.skip=false -Ddocker.skip.push=false \ No newline at end of file + run: mvn --batch-mode clean install -Ddocker.platforms=linux/amd64,linux/arm64 -Dmaven.test.skip=true -Ddocker.skip=false -Ddocker.skip.push=false diff --git a/pom.xml b/pom.xml index f108389..808abb2 100644 --- a/pom.xml +++ b/pom.xml @@ -63,6 +63,8 @@ <docker.skip.push>true</docker.skip.push> <docker.image.name>apache/sling</docker.image.name> <docker.image.tag>snapshot</docker.image.tag> + <!-- pass a list of platforms to enable multi-arch builds: linux/amd64,linux/arm64 --> + <docker.platforms></docker.platforms> <mongo.container.image>mongo:4.4.6</mongo.container.image> <it.startTimeoutSeconds>60</it.startTimeoutSeconds> <!-- used for reproducible builds (https://maven.apache.org/guides/mini/guide-reproducible-builds.htm), automatically updated during release --> @@ -265,7 +267,7 @@ <plugin> <groupId>io.fabric8</groupId> <artifactId>docker-maven-plugin</artifactId> - <version>0.40.3</version> + <version>0.42.1</version> <configuration> <skip>${docker.skip}</skip> <containerNamePattern>%e</containerNamePattern> @@ -338,8 +340,7 @@ <build> <buildx> <platforms> - <platform>linux/amd64</platform> - <platform>linux/arm64</platform> + <platform>${docker.platforms}</platform> </platforms> </buildx> <dockerFile>Dockerfile</dockerFile>
