-
-
Notifications
You must be signed in to change notification settings - Fork 28
Introduce a new workflow to publish automatically new merged changes into main a :latest #302
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
base: main
Are you sure you want to change the base?
Conversation
That way a tag is published each time a commit is performed on the main branch
That way it will works transparently with other architecture platforms
tpanajott
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay. We are missing one important step in the workflow, to replace placeholders of version number in the files, as per already existing workflow:
- run: |
cp docker/web/nspanelmanager/web/templates/footer_template.html docker/web/nspanelmanager/web/templates/footer.html
sed -i 's/%version%/${{ github.ref_name }}/g' docker/web/nspanelmanager/web/templates/footer.html
cp docs/tex/manual.pdf docker/web/nspanelmanager/manual.pdf
.github/workflows/publish-latest.yml
Outdated
| with: | ||
| context: ./docker # Path to your Dockerfile | ||
| # note: platforms list: https://github.com/docker/setup-qemu-action | ||
| platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v7,qemu-arm,qemu-aarch64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these run in parallel or serially?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to go the simple way first so it is currently: sequential
We can change it later on using a matrix and some mechanisms (the doc also mention that variant but it is slightly more complicated to setup)
Let me know if you want it already in parallel I can give it a shot too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current free tier we are using have a limit of 6 hours per job, so not doing it in parallel it will fail. Also, we are currently building with Home Assistant builder and what is considered armhf in that (I'm guessing that's the qemu-arm thing here) takes about 6-7 hours to build. So, that specific image has to be built at my PC currently and then uploaded.
This is a known issue that I have to fix, unfortunately it requires a bit of work and I don't feel we should do that work before we publish the current beta as stable. Basically, we need to remove the ZMQ and rework the communication between the web interface and the MQTTManager-component.
Okay,thank you for the notice I will integrate that |
|
Also, one thing that's missing here that I forgot to mention (but is probably not something we should implement just know) is the final step to update the |
| push: | ||
| branches: | ||
| - main | ||
| - ci/refactore # TODO: remove it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems the build is failing because sed uses / to determine different parts of the command. It fails on this command sed -i "s/%version%/$VERSION/g" docker/web/***/web/templates/footer.html when trying to update the version shown in the footer, but, because the branch is "ci/refactore" it fails as it tries to parse "refactore" as an option to the sed command s as per sed -i "s/%version%/ci/refactore/g" docker/web/***/web/templates/footer.html My pruposal is to change the sed command to sed -i "s|%version%|$VERSION|g" docker/web/***/web/templates/footer.html (ie. use pipes instead of / as separators, we are much more unlikely to want to have a pipe in the version than a / either way).
Update as per my review, change / to | in sed-command that replaces version on footer.
|
Hmm, we are now getting the error as below but I'm not quite sure why. This is not something I've ever seen before. |
|
I think I figured it out though I'm not quite sure on how to test it. The error above ( Previously we've used the home assistant builder tool to build the images and when using that it sends along the argument |
Changes
graph TD A[Push to main branch] --> B[Checkout Code] B --> C[Set Git Commit Timestamp] C --> D[Set up QEMU] D --> E[Set up Docker Buildx] E --> F[Login to DockerHub] F --> G[Build and Push Multi-Arch Docker Image] G -->|linux/amd64| H([Create Image: nspanelmanager/nspanelmanager:latest]) G -->|linux/386| H G -->|linux/arm64| H G -->|linux/arm/v7| H G -->|qemu-arm| H G -->|qemu-aarch64| H