-
Notifications
You must be signed in to change notification settings - Fork 0
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
Setup github action to sync external plugins #1
Conversation
@urwrstkn8mare awesome, brilliant! I'm excited 🚀 I'll test it for sure. Sadly - won't test in a next few days. Tuesday is more realistic, so if you have time - feel free to close PR in hubmle bundle fork and setup synchronizer there BTW If I understand github action versioning correctly I can test it before merging by specyfing |
Oh I almost forgot I have my own plugin to test with, although it isn't in built-in search I hope you guys don't mind me forking it to the org to at least test. |
For whatever reason the workflow isn't running so if someone is able to check what's going on I'd greatly appreciate (see https://github.com/GOG-Nebula/galaxy-riot-integration) |
The yml is not valid. If you would like a more detailed answer let me know and I can look at it more later when I feel better. An example of how you can check this locally. $ python -c 'import yaml, sys; print(yaml.safe_load(sys.stdin))' < action.yml Traceback (most recent call last): |
Ok so there is an issue with this. I'm not sure whats wrong but I gotta fix it later. I think the create-pull-request action doesn't work as I thought it did. If you guys have any suggestions please feel free. |
Now I rewrote it as a typescript GitHub actions which theoretically is more efficient and straightforward. But now the jobs are returning this error: https://github.com/GOG-Nebula/galaxy-riot-integration/runs/6637836565?check_suite_focus=true. I don't know how to trace the error so this is quite annoying. I've setup a test branch in my personal repo and forked the master branch here. So its ready to test. Any help would be greatly appreciated (also feel free to directly commit to the master branch of the forked riot plugin as its just there for testing for now). |
oooooooooooooh my god it works. see https://github.com/GOG-Nebula/galaxy-riot-integration/pull/1 (don't actually merge lol). The commits are messy but maybe its time to try out that squash and merge functionality. Also this could still use alot of polishing:
So I'd appreciate any help with that as I shall now sleep. EDIT: moved to readme as it is not something that needs to be done ASAP. |
Co-authored-by: Mesco <mieszkoziemowit@gmail.com>
@UncleGoogle I've got it working now, see: GOG-Nebula/galaxy-integration-humblebundle#4 I've also made it readable and added plenty of logging while I was at it. (and renamed the repo) So personally I think it is ready to merge but please have a look and let me know your thoughts.
Sorry I'm not sure what you mean here. @AndrewDWhite could you elaborate? |
Since some of the files are simply automatically generated; instead of the file being checked into the repo we would store a file that looks like the lock files for the dependencies. (There is probably something that already exists for this since it effectively duplicates the lock files but instead of dependencies it does it for the generated files.) Here is an example entry for In the process, you would hash and append all of the other generated files cryptographically secure hashes into the file.
In the processing what you would do is generate these files normally using the automatic process. Instead of checking the hash against the hash of the file directly stored by git, instead you can check the hash against the corresponding value in the file. The advantage here is that there is less code in the repo for anyone to review for changes, and changes would be updated in that file and still validated. An example of how to get the example hash value is the following. |
Oh I see. Correct me if I'm wrong but doesn't github already only check in changed files? |
Oh @AndrewDWhite I think I understand what you mean, storing the hashes of |
Looks like github actions API does not support typescript natievly (like browsers) so that people advice commiting dist each time: https://github.com/actions/typescript-action#publish-to-a-distribution-branch If you want to takle a risk of not being able to review minified raw dist files, what about having that check in pipeline? Basically either generate and commit it another commit by bot or guard in CI (simpler option): fail pipeline if committed |
Yep there's alr a workflow doing that. |
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.
Manually reviewed all but the following automatically generated files:
-
dist/index.js
-
dist/index.js.map
-
dist/licenses.txt
-
dist/sourcemap-register.js
-
yarn.lock
If the first four files end up being unmanageable with this approach we can look at adding the processing steps described in the discussion into the workflow.
For the |
I just wrote this up after looking at various GitHub actions documentation and combining some GitHub actions. Haven't gotten the time to test it yet but I think it would be easier for @UncleGoogle to test this anyway. Please have a look and will appreciate any suggestions.
PS. Then we can use the same workflow that is used for all plugins (internally maintained or otherwise) to create releases and update
current_version.json
, etc. In fact, I suggest we create another custom GitHub action that abstracts some of the repetitive stuff out of said workflow.PSS. github codespaces is pretty cool