-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add autoupdate frontend workflow #133
base: main
Are you sure you want to change the base?
Conversation
echo "Frontend version is up to date" | ||
echo "skip=true" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Check if there is no open PR with this version |
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.
Since all steps below here check for steps.check_version.outputs.skip != 'true'
, how about making this a workflow with two dependent jobs:
- check-version
- create-pr
This way we can consolidate the if statements.
- name: Close existing PRs of older version | ||
if: steps.check_version.outputs.skip != 'true' && steps.check_existing_pr.outputs.skip != 'true' && steps.get_old_prs.outputs.old_prs_found == 'true' | ||
run: | | ||
apt-get install -y jq | ||
for pr_number in $(jq -r '.[] | .number' <<< $OLD_PRS); do | ||
gh pr close $pr_number --delete-branch --comment "Closed automatically because a newer frontend version is available" | ||
done |
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.
Is this required?
I use the same GitHub action here: https://github.com/home-assistant-libs/chip-wheels/blob/main/.github/workflows/dependency-update.yaml#L43-L58
And the outcome is a continuously updated PR, which to me looks fine: home-assistant-libs/chip-wheels#117
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Workflow to automate frontend updates.
For now there is no frontend release with the needed files