Skip to content

Commit

Permalink
dd
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonybrice committed Mar 28, 2024
1 parent 22b5bb5 commit 6537329
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions dagger/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Timpkg {
}

@func()
async onPush(dir: Directory, token: string): Promise<string> {
async onPush(dir: Directory): Promise<string> {
const modules = await dir.entries()

const results = await Promise.all(modules.map(async m => {
Expand All @@ -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")
Expand Down

0 comments on commit 6537329

Please sign in to comment.