mirror of
https://github.com/rancher/rke.git
synced 2025-09-19 18:30:38 +00:00
Add GitHub Actions workflows README
This commit is contained in:
24
.github/workflows/README.md
vendored
Normal file
24
.github/workflows/README.md
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Description of GitHub Actions in this repository
|
||||||
|
|
||||||
|
## Stale (`stale.yml`)
|
||||||
|
|
||||||
|
This workflow will label and eventually close issues and pull requests based on the configuration in this file.
|
||||||
|
|
||||||
|
## Go Generate (`git-actions-go-generate.yml`)
|
||||||
|
|
||||||
|
In RKE, `go generate` is used to:
|
||||||
|
|
||||||
|
* Generate deepcopy functions
|
||||||
|
* Download the latest published `data.json` from rancher/kontainer-driver-metadata (see `codegen/codegen.go`)
|
||||||
|
* Converts the downloaded `data.json` in to Go source code using go-bindata
|
||||||
|
|
||||||
|
See the comments on top of `main.go` to see what is being executed when you run `go generate`.
|
||||||
|
|
||||||
|
This was done manually every time a PR was merged in rancher/kontainer-driver-metadata, and it was also usually executed on the machine of the user. The first step to tackle this was to create a make target for `go generate`, called `go-generate`, so everyone can use `make go-generate` to consistently run the command with the same environment.
|
||||||
|
|
||||||
|
Second improvement was to wrap this `make go-generate` into a GitHub Actions workflow (this one), so it can be;
|
||||||
|
|
||||||
|
* Triggered via the UI (no more local machine needed)
|
||||||
|
* Automatically triggered via API
|
||||||
|
|
||||||
|
In rancher/kontainer-driver-metadata, we added a `dispatch` step in `.drone.yml`, which will execute this GitHub Actions workflow after a PR is merged. The user that merged the PR will also be mentioned and assigned in the PR that will be created when this workflow has finished.
|
Reference in New Issue
Block a user