extdn / github-actions-m2

137 stars 46 forks source link

Make GitHub Actions inputs consistent #109

Closed fredden closed 8 months ago

fredden commented 8 months ago

While reviewing #101, I noticed that the way that GitHub Actions "inputs" were handled was not consistent across all Actions in this repository. This pull request aims to make them consistent.

Changes include:

Changes are best viewed with "ignore white-space" as my editor has removed trailing white-space in several files. If you would prefer these to remain as-is, please let me know and I will update the pull request accordingly.

Fixes #82 Closes #101

jissereitsma commented 8 months ago

@fredden Awesome work so far. Indeed, the current workflows were initially setup by me and @fooman but we never got into "cleaning" things up. However, as you mention, the magento_version renaming is breaking. I'd rather just have both in there. This could simply mean that both variables are used, one being a fallback of the other. Something like this:

test -z "${MAGENTO_VERSION}" && MAGENTO_VERSION=${INPUT_MAGENTO_VERSION}
test -z "${MAGENTO_VERSION}" && MAGENTO_VERSION=${CE_VERSION}
test -z "${MAGENTO_VERSION}" && MAGENTO_VERSION=${INPUT_CE_VERSION}

It's a bit ugly and also elaborate, but that's what it takes to maintain backwards compatibility.

fredden commented 8 months ago

I will update this pull request to avoid the breaking change. I'll add some comments to show that ce-version and ce_version are deprecated.

jissereitsma commented 8 months ago

Awesome!

fredden commented 8 months ago

@jissereitsma @sprankhub I've made the changes to maintain backwards-compatibility. It was easier than I had expected.

jissereitsma commented 8 months ago

Good stuff! I forgot that some of the entry scripts were JS based (and not bash-based) but you picked up on that :) As far as I see, with this PR, things will not break and will definitely improve. I concur.

jissereitsma commented 8 months ago

Yup, I would say so. @fredden Very good stuff. Let's try to test this asap to see if things break :o