Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: auto-update shopware versions in build-docker-images.yaml #14

Open
cngJo opened this issue Aug 24, 2022 · 1 comment · May be fixed by #25
Open

feat: auto-update shopware versions in build-docker-images.yaml #14

cngJo opened this issue Aug 24, 2022 · 1 comment · May be fixed by #25

Comments

@cngJo
Copy link
Contributor

cngJo commented Aug 24, 2022

Please describe the feature you would like to see implemented.

As mentioned in #13 (comment) the process of adding new shopware versions could be automated.

I guess the easiest way would be to:

  • setup a scheduled GH-Action that:
    • fetches the latest release from github.com/shopware/platform
    • compares the minor versions against the matrix configuration
    • adds the minor version tag of the found release to the matrix configuration if there is a newer release
    • creates a pull request against master

All that should be possible with GH-Actions running JavaScript code and the GitHub API.
If you'd be willing to accept that (or a different suggested approach), I'd be willing to put time into this and figure that out.

@aragon999
Copy link
Member

Thank you for taking the initiative, that sounds like a good plan.

I once already started a similar thing, but never finished it, or published it. As I have very little time at the moment, I would be grateful if you work on it.

You probably already know that, but the tags can be obtained as you suggested via the Github API, e.g.

curl -X GET https://api.github.com/repos/shopware/platform/git/refs/tags -o shopware-tags.json

Another thing I was thinking about is that we do not really need to store the matrix, but could generate it dynamically using a job in the GH actions, as for example seen here: https://github.blog/changelog/2020-04-15-github-actions-new-workflow-features/#new-fromjson-method-in-expressions

echo "::set-output name=matrix::<encoded-matrix-json>"

Than we run these jobs regularly. The problem there might be that we would like to detect if we really need to rebuild the image or not (to not rebuild the image every night).

But feel free to choose whatever approach you prefer :-) if it works, I will merge it :-D

@cngJo cngJo linked a pull request May 23, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants