From cb4413c79dbdc847e7e786d3038954d3516df2c7 Mon Sep 17 00:00:00 2001 From: Tyler Auerbeck Date: Tue, 15 Oct 2024 21:39:48 -0400 Subject: [PATCH] update pull-request function to use source Signed-off-by: Tyler Auerbeck --- .github/workflows/pull-request.yml | 2 +- dagger/main.go | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index e8a7df44..9539557c 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -49,4 +49,4 @@ jobs: with: version: "latest" verb: call - args: pull-request --directory-arg=. --github-token=${{ env.GITHUB_TOKEN }} + args: pull-request --source=. --github-token=${{ env.GITHUB_TOKEN }} diff --git a/dagger/main.go b/dagger/main.go index 860195e7..eb1dc475 100644 --- a/dagger/main.go +++ b/dagger/main.go @@ -68,8 +68,12 @@ func (m *HarborCli) Lint( } -func (m *HarborCli) PullRequest(ctx context.Context, directoryArg *dagger.Directory, githubToken string) { - goreleaser := goreleaserContainer(directoryArg, githubToken).WithExec([]string{"release", "--snapshot", "--clean"}) +func (m *HarborCli) PullRequest(ctx context.Context, + // +optional + // +defaultPath="./" + source *dagger.Directory, + githubToken string) { + goreleaser := goreleaserContainer(source, githubToken).WithExec([]string{"release", "--snapshot", "--clean"}) _, err := goreleaser.Stderr(ctx) if err != nil { log.Printf("❌ Error occured during snapshot release for the recently merged pull-request: %s", err)