diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 0d55316..1bbee94 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -21,3 +21,4 @@ jobs: version: "0.10.2" verb: call args: on-push --dir=./modules --token=${{ secrets.GITHUB_TOKEN }} + cloud-token: ${{ secrets.DAGGER_CLOUD_TOKEN }} diff --git a/dagger/src/index.ts b/dagger/src/index.ts index 2b9ee85..69f246e 100644 --- a/dagger/src/index.ts +++ b/dagger/src/index.ts @@ -39,19 +39,19 @@ class Timpkg { @func() async onPush(dir: Directory, token?: string): Promise { + const tim = dag + .container() + .from("golang:latest") + .withExec([ + "go", + "install", + "github.com/stefanprodan/timoni/cmd/timoni@latest", + ]) + .withDirectory("/tmp/timoni", dir) const modules = await dir.entries() const results = await Promise.all( modules.map(async (m) => { - const tim = dag - .container() - .from("golang:latest") - .withExec([ - "go", - "install", - "github.com/stefanprodan/timoni/cmd/timoni@latest", - ]) - .withDirectory("/tmp/timoni", dir) const imageUrl = this.isDev ? `oci://ttl.sh/${v4()}` : `oci://ghcr.io/anthonybrice/modules/${m}`