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

Add autoupdate frontend workflow #133

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wendevlin
Copy link
Contributor

Workflow to automate frontend updates.

For now there is no frontend release with the needed files

echo "Frontend version is up to date"
echo "skip=true" >> $GITHUB_OUTPUT
fi
- name: Check if there is no open PR with this version
Copy link
Member

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:

  1. check-version
  2. create-pr

This way we can consolidate the if statements.

Comment on lines +49 to +55
- 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
Copy link
Member

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

@home-assistant home-assistant bot marked this pull request as draft December 11, 2024 10:38
@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants