adamghill / build-docker-and-deploy-to-caprover

MIT License
4 stars 1 forks source link

Support specifying docker image platforms to build for #13

Open Boscop opened 4 days ago

Boscop commented 4 days ago

The docker/build-push-action has a platforms arg (List of target platforms for build): https://github.com/docker/build-push-action/blob/5cd11c3a4ced054e52742c5fd54dca954e0edd85/action.yml#L66-L68

If not specified, the default behavior is to build for the platform that the runner has. But sometimes you might want to build for a different platform: Some CapRover servers are e.g. Arm, but GitHub only supports Arm-based runners on the GitHub Team or GitHub Enterprise Cloud plan.

Could you please add a platforms arg to this action, and pass that on to the docker/build-push-action invocation here? :) https://github.com/adamghill/build-docker-and-deploy-to-caprover/blob/4a1b7fd7ccd1ff1981632ff6ef3aea3405c3dad8/action.yml#L75-L84

adamghill commented 4 days ago

Sure! That seems pretty straight-forward. If I make a PR, can you test it? I don't think I have an easy way to verify it's working as expected.

Boscop commented 4 days ago

@adamghill Yes, I'll test it :)