Skip to content

Commit

Permalink
add dagger cloud token
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonybrice committed Mar 29, 2024
1 parent bd95c47 commit 5df7a9b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
18 changes: 9 additions & 9 deletions dagger/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ class Timpkg {

@func()
async onPush(dir: Directory, token?: string): Promise<string> {
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}`
Expand Down

0 comments on commit 5df7a9b

Please sign in to comment.