diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index c7b3075..61cc0af 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -11,13 +11,19 @@ permissions: jobs: runDagger: runs-on: ubuntu-latest - permissions: write-all steps: - uses: actions/checkout@v4 - - name: Call dagger on-push + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Call dagger on-push uses: dagger/dagger-for-github@v5 with: version: "0.10.2" verb: call - args: on-push --dir=./modules --token=${{ secrets.GITHUB_TOKEN }} + args: on-push --dir=./modules diff --git a/dagger/src/index.ts b/dagger/src/index.ts index 4929ea1..58ce072 100644 --- a/dagger/src/index.ts +++ b/dagger/src/index.ts @@ -32,7 +32,7 @@ class Timpkg { } @func() - async onPush(dir: Directory, token: string): Promise { + async onPush(dir: Directory): Promise { const modules = await dir.entries() const results = await Promise.all(modules.map(async m => { @@ -49,7 +49,7 @@ class Timpkg { const current = maxSatisfying(vs, '*') const next = inc(current, "patch") - return tim.cli(["mod", "push", `/tmp/timoni/${m}/`, imageUrl, `--version=${next}`, `--creds=timoni:${token}`]) + return tim.cli(["mod", "push", `/tmp/timoni/${m}/`, imageUrl, `--version=${next}`]) })) return results.join("\n")