Closed f1ames closed 4 years ago
And this is how it looks with inined script - https://github.com/f1ames/ckeditor4-presets/actions/runs/61845576.
IMHO it is a little unreadable (due to lack of syntax highlighting) and harder to edit/test so I was thinking if script could reside inside separate .sh
file and then just inlined into workflow file (manually or just by running some script).
I have inlined the script, let's see how it works.
I wonder if we need to create the workflow ourselves. There are already some ready-made GHAs that update submodules, e.g. https://github.com/textbook/git-checkout-submodule-action
I wonder if we need to create the workflow ourselves. There are already some ready-made GHAs that update submodules, e.g. https://github.com/textbook/git-checkout-submodule-action
Good idea :+1: I covered it in https://github.com/f1ames/ckeditor4-presets/blob/f63fb33f6e482791d61fc16a7b87c503e5854e36/.github/workflows/update.yml, it looks better now (see in Actions), however it has another issue now. We need to use --remote
flag to update to latest remote hash, however this will also update SCYAT/WSC submodules which we don't want to do... And I don't see any ready to use action which allows to update only selected submodules...
So we still need some custom code but thanks to submodule update action I was able to reduce it significantly.
And then it turns out, this action fetches submodules as root (textbook/git-checkout-submodule-action#2) and custom script cannot update them https://github.com/f1ames/ckeditor4-presets/runs/591631852?check_suite_focus=true#step:5:13...
I could use git Actions instead as suggested, but it's still longer than simply calling git submodules update --init --recursive
in run
, so back to custom code :shrug:
Here is action where everything is up-to-date (so nothing happens) - https://github.com/f1ames/ckeditor4-presets/actions/runs/79692945 and here where both master
and major
gets updated - https://github.com/f1ames/ckeditor4-presets/actions/runs/79686870.
I have added workflow file and script for updating
ckeditor4
submodule regularly. It can be seen on the fork how and if it works - https://github.com/f1ames/ckeditor4-presets/actions/runs/58312837.One important thing already mentioned in the parent task is that scheduled workflows are only run for default branch which means:
master
in our case) branch.master
andmajor
.~Well, point 2 and 3 are not entirely true. These will be true if the whole script would be inlined into workflow file. Now, since part of the script is in branch itself as a regular file there may be changes syncing issue. There are 3 solutions:
master
andmajor
(problematic IMHO and easy to forget).master
and use also formajor
branch while running the workflow (looks kind of overcomplicated).I'm for 2nd option, WDYT?