Skip to content

Commit fc95c4b

Browse files
authored
fix pipeline (#54)
1 parent e7fad31 commit fc95c4b

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

dagger/main.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,13 @@ func (m *NdthanhdevGithubIo) Init(ctx context.Context, dir *Directory) *Containe
7070

7171
}
7272

73-
func (m *NdthanhdevGithubIo) MoonRun(ctx context.Context, dir *Directory, command string) *Container {
74-
return (&Con{m.
75-
Init(ctx, dir)}).MoonRun(command)
73+
func (m *NdthanhdevGithubIo) Test(ctx context.Context, dir *Directory) *Container {
74+
return (&Con{m.Init(ctx, dir)}).
75+
MoonRun("scripts:test")
7676
}
7777

7878
func (m *NdthanhdevGithubIo) Build(ctx context.Context, dir *Directory, mode string) *Directory {
7979
return (&Con{m.Init(ctx, dir).
80-
WithWorkdir("/mnt/scripts/actions").
8180
WithEnvVariable("MODE", mode)}).
8281
MoonRun("scripts:build").
8382
Directory("/mnt/app/public")
@@ -88,10 +87,9 @@ func (m *NdthanhdevGithubIo) Publish(ctx context.Context, dir *Directory, mode s
8887
tokenString, _ := token.Plaintext(ctx)
8988

9089
return (&Con{m.
91-
MoonRun(ctx, dir, "scripts:public").
90+
Init(ctx, dir).
9291
WithEnvVariable("GH_TOKEN", tokenString).
93-
WithEnvVariable("MODE", mode).
94-
WithWorkdir("/mnt/scripts/actions")}).
92+
WithEnvVariable("MODE", mode)}).
9593
MoonRun("scripts:publish").
9694
Stdout(ctx)
9795
}

scripts/pipelines/validate-pr.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ await cleanBuild();
88

99
cd(workDirs.path);
1010

11-
await $`dagger call moon-run --dir . --command "scripts:test"`;
11+
await $`dagger call test --dir .`;

0 commit comments

Comments
 (0)