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

[ci] allow pushes from any branch #30

Merged
merged 2 commits into from
Oct 23, 2023
Merged

Conversation

jameslamb
Copy link
Collaborator

To test changes in this project today, you have to do the following:

  1. push commits to the dev or dev2 branch
  2. wait for that automatically-triggered build(s) to complete
  3. open a PR over in LightGBM switching the image(s) over to the new ones from that branch (e.g. lightgbm/vsts-agent:ubuntu-14.04-dev)
  4. if all goes well, merge dev into master here

This PR proposes a different pattern that I think will make testing easier. It introduces a GitHub Actions workflow_dispatch event to trigger the workflow that builds and pushes images. That way, anyone who can create branches here (which should only be LightGBM maintainers) can just push changes to that branch and click a button to build new images. Those new images will then be tagged with that branch name, e.g. lightgbm/vsts-agent:ubuntu-14.04-some-branch.

This also proposes updating all third-party actions used here to their latest versions.

Why I'm confident this will work

We do the same thing for the link-checker job over in LightGBM.

https://github.com/microsoft/LightGBM/blob/8ed371cee49cf86740b25dd9a4b985a75c9f2dba/.github/workflows/linkchecker.yml#L4-L5

Screen Shot 2023-10-20 at 11 23 33 PM

Notes for Reviewers

@guolinke could you make me an admin in this repo and add me to the lightgbm DockerHub organization (https://hub.docker.com/u/lightgbm)?

So that I can modify permissions and delete temporary testing images pushed to DockerHub.

@guolinke
Copy link
Owner

@jameslamb can you give me your docker hub id ?

@jameslamb
Copy link
Collaborator Author

It's jameslamb

Sorry, should have mentioned that. Thank you for the help!

@jameslamb jameslamb deleted the misc/workflow-dispatch branch October 23, 2023 03:22
@guolinke
Copy link
Owner

guolinke commented Oct 23, 2023

BTW, it seems we need to create an organization to have multiple admins for a (GitHub) project.

@guolinke
Copy link
Owner

It's jameslamb

Sorry, should have mentioned that. Thank you for the help!q

invitation sent

@jameslamb
Copy link
Collaborator Author

Thanks @guolinke ! I'm back from traveling now and able to devote more time to LightGBM again.

I just accepted the DockerHub invitation.

it seems we need to create an organization to have multiple admins for a (GitHub) project.

Oh interesting, I didn't realize it wasn't possible to add admins in a personal repo. It's ok, I tested and having Collaborator access here (where I can create/delete branches and trigger workflow_dispatch GitHub Actions) is enough. Thank you for checking!

I put up #32 with some additional proposed changes.

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

Successfully merging this pull request may close these issues.

2 participants