Skip to content

Add auto-update workflow for newt - #20

Open
joe2824 wants to merge 6 commits into
alexmoras:mainfrom
joe2824:main
Open

Add auto-update workflow for newt#20
joe2824 wants to merge 6 commits into
alexmoras:mainfrom
joe2824:main

Conversation

@joe2824

@joe2824 joe2824 commented Apr 29, 2026

Copy link
Copy Markdown

This PR introduces a new GitHub Actions workflow to automatically update Newt to the newest version.
This reduces manual maintenance work for the repository.

Required Repository Changes:
For this workflow to run successfully, the repository settings must be updated. Please ensure the following:

  1. Go to Settings > Actions > General.
  2. Under Workflow permissions, check the box for Allow GitHub Actions to create and approve pull requests.

@Empathies

Copy link
Copy Markdown
Contributor

This would make my PR (and the potential future ones) obsolete.
I like it 😄

@alexmoras alexmoras left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking the time to submit this PR. There are a couple changes I think would be needed before we can merge. Mainly around the fact that the action doesn't have any awareness of the current version, and will create a new PR every time it runs, even if the version hasn't incremented.

Comment thread .github/workflows/update_newt.yml Outdated
' newt/CHANGELOG.md > tmp.md && mv tmp.md newt/CHANGELOG.md

- name: Create Pull Request
uses: peter-evans/create-pull-request@v6

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v8 is the latest, so probably best we implement based on that.

Comment thread .github/workflows/update_newt.yml
@alexmoras

Copy link
Copy Markdown
Owner

Further to the above code review, we need to consider whether automatic version incrementing is appropriate. I appreciate I do not update the versions all that often, but at least we know the add-on is stable. If we allow the action to automatically merge PRs, we risk implementing a version of Newt which isn't compatible with the add-on configuration, without some human changes. This could break people's access to HA.

Also, this PR would not cause a new version of the add-on to be published. Another step would be needed to create a new GitHub Release, since this is what builds the new docker images.

I'm open to suggestions, just wanted to raise a few points of discussion. 😄

@joe2824 joe2824 reopened this Apr 30, 2026
@joe2824

joe2824 commented Apr 30, 2026

Copy link
Copy Markdown
Author

Ah I messed it up :/

Further to the above code review, we need to consider whether automatic version incrementing is appropriate. I appreciate I do not update the versions all that often, but at least we know the add-on is stable.

Yes you are totally right. I added a function that checks for the latest stable release (15 day delay after minor release)
For example the current latest stable version would be 1.11.0

Also, this PR would not cause a new version of the add-on to be published. Another step would be needed to create a new GitHub Release, since this is what builds the new docker images.

I also change it to release and also trigger the build command
I'm not sure about the build. You mentioned that homeassistant have a new build process action #21.
I just copy and paste the action.

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 this pull request may close these issues.

3 participants