This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to branch feature/docker-multi-arch-support-snapshot-only in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-starter.git
commit d0c04968670a63b4e602136392226775ac4ac08a Author: Robert Munteanu <[email protected]> AuthorDate: Wed Apr 12 20:23:46 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 | 16 ++-------------- pom.xml | 5 +++-- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index 25fcf73..415dd85 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -18,14 +18,7 @@ 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 jobs: sling-starter-push-image: @@ -47,14 +40,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 7cad107..161e9b4 100644 --- a/pom.xml +++ b/pom.xml @@ -56,6 +56,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 --> @@ -331,8 +333,7 @@ <build> <buildx> <platforms> - <platform>linux/amd64</platform> - <platform>linux/arm64</platform> + <platform>${docker.platforms}</platform> </platforms> </buildx> <dockerFile>Dockerfile</dockerFile>
