shardingsphere icon indicating copy to clipboard operation
shardingsphere copied to clipboard

Realizing automatic standard process through github actions.

Open avalon5666 opened this issue 5 years ago • 6 comments

  • [x] Automatically publish docs to shardingsphere-doc repository when released.
  • [x] Automate the issue standard handling process.
  • [x] Automatically publish image to docker registry when released.

avalon5666 avatar Mar 17 '21 03:03 avalon5666

Hi! I'm a student from Summer 2021. I would like to do this project as the Summer 2021 Project.

For automatically publish docs to shardingsphere-doc repository when released, I have a workflow which helps me automaticly sync repos from GitHub to Gitee: https://github.com/HollowMan6/LZU-Auto-COVID-Health-Report/blob/main/.github/workflows/repo-sync.yml , the mechanism behind this is such code: https://github.com/wearerequired/git-mirror-action/blob/master/git-mirror.sh . So I think such a logic can be used for realizing this feature, too. Just generate those docs then auto push commits to shardingsphere-doc repository.

For automating the issue standard handling process, I guess a workflow may not be the best way? Why not try some bots in GitHub Apps for this, such as https://github.com/marketplace/issue-label-bot . If such kind of bot can't be found, I can also help to make one. I'm the author of the LZU COVID Health Report: https://github.com/marketplace/lzu-covid-health-report , which now ranks first in GitHub MarketPlace Trending.

image

For automatically publish image to docker registry when released, I actually have a project that has realized this feature to push image to docker hub and also GitHub Container Registry with multiple architecture support realized by docker buildx: every time when I push a new commit, the workflow will automatically push the image with tag latest, and when I release a version, the released version's image will be automatically pushed to the registry tagged correctly. The workflow also supports a manual dispatch specifying the tag. image

Here's the link of my workflow file for automatically publish image to docker registry : https://github.com/HollowMan6/LZU-Auto-COVID-Health-Report/blob/main/.github/workflows/docker-publish.yml

Please tell me if I got something wrong or there's a better idea. Thanks!

HollowMan6 avatar May 18 '21 13:05 HollowMan6

@HollowMan6 I'm glad you want to participate in this project, but there are other students already involved. I'll let you know if there's any new developments.

avalon5666 avatar May 19 '21 01:05 avalon5666

🔨 Task one: Automatically publish docs to shardingsphere-doc repository when released.

  • PR1 from ShardingSphere-doc: 552

    • When someone commits to master branch, changes will exist in preview directory.
    • Add a workflow Update Document: When triggered, move files in preview directory to current directory with some necessary operations( eg. sed, rm)
  • PR2: 11121

    • keep the newest contents in preview directory
    • When release published, trigger the workflow Update Document in the shardingsphere-doc repo (need a secret)
  • [ ] The token PERSONAL_TOKEN is supposed to be configured in the shardingsphere repo.

QiliangFan avatar Jul 03 '21 02:07 QiliangFan

I just wanna confirm, that the final result of the issue-1 is, Each release (tag) will own its doc site built from its doc source code, right? For instance, 5.0.0-beta will be presented in the dropdown of the Document header.

@avalon5666 @QiliangFan

tristaZero avatar Jul 04 '21 10:07 tristaZero

@tristaZero @QiliangFan Document header will keep current struct, and add a master version in the dropdown for master branch. so, 5.0.0-beta will be presented in the 5.x(Current).

avalon5666 avatar Jul 04 '21 14:07 avalon5666

Got it, could we have a 5.x (Dev) only for master branch, as we may do some modifications according to the master (dev) programming update? Plus, we still need 5.0.0-beta (Current) for the released version. How do you think? @avalon566

tristaZero avatar Jul 05 '21 05:07 tristaZero