From 5df7a9b597b0249582b6c9cde4d3346e3a7b1222 Mon Sep 17 00:00:00 2001 From: Anthony Brice Date: Thu, 28 Mar 2024 19:16:30 -0700 Subject: [PATCH] add dagger cloud token --- .github/workflows/publish.yaml | 1 + dagger/src/index.ts | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) 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}`