-
Notifications
You must be signed in to change notification settings - Fork 95
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
ci: Add workflow to update node dist files on main #4749
Conversation
I was fearing some endless loop, but it seems that the git operation by default uses GITHUB_TOKEN which would block any follow up workflow triggered by that push. Meaning CI wouldn't run for the main branch on the compile commit, but i think that is fine since it runs on the previous and next one. https://docs.github.com/en/actions/security-guides/automatic-token-authentication |
Yes. For me that's even a plus as it will save a considerable amount of CI time. |
This looks very interesting - I'm all for trying it out. I have some follow up questions / ideas:
|
Not from my perspective, maybe @skjnldsv had one as the original author of it in the server draft nextcloud/server#39674?
Not until we build during release as there are also nightly packages built from master/main for the server release. |
Also improved the concurrency block to work with pushes as head_ref is only there for prs |
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.
One small change - other than that looks good to me.
Nice! Haven't found the time to keep looking deeper for nextcloud/server#39674 I don't see why that would be of any issue. |
5b72f29
to
6677f9a
Compare
.github/workflows/node.yml
Outdated
- name: Check webpack build changes | ||
run: | | ||
bash -c "[[ \"`git status --porcelain `\" ]] || (echo 'Do NOT commit changes in js/ as those will be built automatically once merged' && exit 1)" | ||
|
||
- name: Show changes on failure | ||
if: failure() | ||
run: | | ||
git status | ||
git --no-pager diff | ||
exit 1 # make it red to grab attention | ||
|
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 don't think this does what you think it does.
git status --porcelain
will not find anything as no compilation was run yet.
I see two alternatives:
git diff {name of base branch} js
and then fail if it has some output- use the github mechanism to run tasks on changed files in js. (Maybe even in a separate task)
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.
Yes indeed. I moved to a separate workflow and used https://github.com/tj-actions/changed-files which uses the API instead of a local git clone to keep the action simple.
b7a2188
to
e676d6f
Compare
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.
🚀
Signed-off-by: Julius Härtl <[email protected]> fix: Check build changes Signed-off-by: Julius Härtl <[email protected]> fix: use CYPRESS_INSTALL_BINARY Signed-off-by: Julius Härtl <[email protected]> fix: ref for push Signed-off-by: Julius Härtl <[email protected]> ci(node): Block merge if js/ was changed Signed-off-by: Julius Härtl <[email protected]> tmp: remove test branch to see if node check works Signed-off-by: Julius Härtl <[email protected]>
29d27e0
to
9dcd2aa
Compare
Adapting nextcloud/server#39674 for the text app to give it a test run on this branch