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

chore: update demo #105

Merged
merged 1 commit into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Explore `gale` through the following scenarios:
| List | `--list` | List all workflows and jobs under it for current repositories `main` branch |
| Run | `--run` | Run golangci-lint job from ci/workflows/lint workflow for aweris/gale repository default branch |
| Lint GoReleaser | `--lint-goreleaser` | Run golangci job from golangci-lint workflow for goreleaser/goreleaser repository tag v1.19.2 |
| Shell run | `--shell-run` | Run example workflow contains steps with different shells |
| Test Dagger | `--test-dagger` | Run sdk-go job from test workflow for dagger/dagger repository branch main |
| Test Cache | `--test-cache` | Use actions/cache in the workflow |

Expand Down
2 changes: 1 addition & 1 deletion demo/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package main
const (
BinDir = "./bin"
DaggerVersion = "0.8.4"
GaleVersion = "v0.0.5"
GaleVersion = "v0.0.6"
)
11 changes: 11 additions & 0 deletions demo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ func main() {
d.Add(list(), "list", "List all workflows and jobs under it for current repositories `main` branch")
d.Add(run(), "run", "Run golangci-lint job from ci/workflows/lint workflow for aweris/gale repository default branch")
d.Add(lintGoreleaser(), "lint-goreleaser", "Run golangci job from golangci-lint workflow for goreleaser/goreleaser repository tag v1.19.2")
d.Add(shellRun(), "shell-run", "Run example workflow contains steps with different shells")
d.Add(testDagger(), "test-dagger", "Run sdk-go job from test workflow for dagger/dagger repository branch main")
d.Add(testCache(), "test-cache", "Use cache in the workflow")

Expand Down Expand Up @@ -49,6 +50,16 @@ func lintGoreleaser() *demo.Run {
return r
}

func shellRun() *demo.Run {
r := demo.NewRun("Run example workflow contains steps with different shells")

r.Step([]string{"Contents of the workflow file"}, demo.S("curl https://raw.githubusercontent.com/aweris/gale/main/ci/workflows/step-run.yaml"))

r.Step([]string{"Run the workflow from custom directory for current repository"}, env.RunGaleWithDagger("run --repo aweris/gale --workflows-dir ci/workflows shell run"))

return r
}

func testDagger() *demo.Run {
r := demo.NewRun("Run sdk-go job from test workflow for dagger main")

Expand Down
Loading