tomaszmichalak commented on PR #80: URL: https://github.com/apache/sling-org-apache-sling-starter/pull/80#issuecomment-1368839088
> @tomaszmichalak - we now have the required secrets from Infra to enable GitHub actions, can you provide a PR that does that? > > I think we should do the following: > > * do not try to build multi-arch images locally using Maven > * in the GitHub action, build the project using `mvn package` > * in the GitHub action, login to Docker Hub ( credentials are DOCKERHUB_USER and DOCKERHOB_TOKEN ), build and push the Docker image > > Once we have that, we can disable the DockerHub automated build and drop the code that handles it specifically. Docker Maven Plugin uses Docker CLI to build and push docker images. We can use maven to build and push Docker images (as we need some artifacts from `target`) but we need to authenticate to DockerHub before running maven. Please check https://github.com/tomaszmichalak/sling-org-apache-sling-starter/blob/feature/docker-multi-arch-support/.github/workflows/docker-push.yml. Execution: https://github.com/tomaszmichalak/sling-org-apache-sling-starter/actions/runs/3821998937 Docker images: https://hub.docker.com/layers/tomaszmichalak/sling-starter/13-20230102/images/sha256-f7bd4cc8fee526706191e748bba382b06bb8063915a52b14016353824b05c7f1?context=repo For the example above, I executed command: `mvn --batch-mode clean install -Dmaven.test.skip=true -Ddocker.image.name=tomaszmichalak/sling-starter -Ddocker.image.tag=${{ github.event.inputs.tag }} -Ddocker.skip=false -Ddocker.skip.push=false` to validate it with my DockerHub account. After checking that, I removed: `-Ddocker.image.name=tomaszmichalak/sling-starter -Ddocker.image.tag=${{ github.event.inputs.tag }}` so the default image name is used. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
