You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My plan requires a patched version of dagger. I want to run it in a github workflow, but since it runs the latest official release by default (currently 0.2.0), my patch is not included. How can I configure dagger-for-github to run my patched version of dagger?
Thanks, I'm trying to run this but the action fails with "Error: Input required and not supplied: token"
How do I provide the missing input?
Is there a way to require no input, for example by using the credentials already available to the GHA runner by default?
Update: I removed the line setting an explicit token (token: ${{ secrets.GH_PAT }}) in the hope that it would use a default token. It appears to have worked, now I fail a bit later at "build dagger":
Run cd /home/runner/work/shykes/shykes/src/dagger
[8](https://github.com/dagger/shykes/runs/5579280314?check_suite_focus=true#step:6:8)
make: *** No rule to make target 'dagger'. Stop.
[9](https://github.com/dagger/shykes/runs/5579280314?check_suite_focus=true#step:6:9)
Error: Process completed with exit code 2.
I thought maybe make is being run in the wrong directory, but I don't know how to troubleshoot this.
Thank you both for your help! I got it to work on my repo.
My 2c on how to implement this feature:
We already have a version field
The version field could be extended in the following way: if its value is a URL, the dagger binary is downloaded from that URL instead of the default release URL and added to the PATH.
This has the advantage of limiting proliferation of custom builds of dagger, which is a subtle form of DX fragmentation. For example if we change our build tool from make to dagger, we don't want to deal with outdated GHA configurations that still run make.
Short term, each user can build their own binary and publish it anywhere: github, s3 etc.
Longer term, we can (and IMO should) host a binary-on-demand service eg. get.dagger.io/binary/dagger-$GITREF.tgz that builds the requested version just-in-time for download.
name: Set up Docker Buildxuses: docker/setup-buildx-action@v1with:
version: https://github.com/docker/buildx.git#refs/pull/731/head
It's quite powerful when you want to test a PR with a specific context. Under the hood it uses a Git remote context to build buildx with buildx 😅:
Activity
maert commentedon Mar 12, 2022
Example that doesn't use dagger-for-github:
https://gist.github.com/maert/47cc6b3a30ed3f0efc650ac88ba47e03
If the interface is good, could be made into action inputs with the dagger executable put in an appropriate spot in PATH.
gerhard commentedon Mar 15, 2022
This is what I ended up doing for the todoapp, before 0.2.0 was released: https://github.com/dagger/dagger/blob/c3f21958d2d64ca6da2704b6b1f644d46802def0/.github/workflows/todoapp.yml
I definitely think that we should support this in the action.
shykes commentedon Mar 17, 2022
Thanks, I'm trying to run this but the action fails with
"Error: Input required and not supplied: token"Disclaimer: I am a GHA noob.
Here is my workflow, in case it's helpful:
shykes commentedon Mar 17, 2022
Update: I removed the line setting an explicit token (
token: ${{ secrets.GH_PAT }}) in the hope that it would use a default token. It appears to have worked, now I fail a bit later at "build dagger":I thought maybe
makeis being run in the wrong directory, but I don't know how to troubleshoot this.maert commentedon Mar 17, 2022
In the example above, notice
secrets.GH_PAT. You need to create a secret calledGH_PAT.I refined things and made an actual resuable lego brick, an action, here:
https://github.com/maert/build-dagger-github-action/blob/main/action.yml#L4-L15
In this one, the inputs are similar, but I make the
repo-tokenoptional and give good defaults for the other two required inputs.You can use the action like this to install
daggerfromdagger/daggerandmainbranch:A more complete example that performs a checkout out of the repo (with a dagger cue file in it), builds dagger from source at a particular git commit in my fork, and then runs a
dagger dohere: https://github.com/maert/test-action/blob/main/.github/workflows/test.ymlgerhard commentedon Mar 17, 2022
Nice job @maert! 🙌🏻
I am keen on folding it into this repository. I expect this to remain in my swap for a few weeks, but I intend to come back to it.
Point-in-time reference: https://github.com/gerhard/shykes/commit/d1bbe356ea425557418f31e8e7aadf978e8dffcc (private repo, open to @shykes as it's a fork)

okr.yamlthat works https://github.com/gerhard/shykes/runs/5589675700?check_suite_focus=true#step:7:65 (private repo, open to @shykes as it's a fork)shykes commentedon Mar 18, 2022
Thank you both for your help! I got it to work on my repo.
My 2c on how to implement this feature:
versionfieldversionfield could be extended in the following way: if its value is a URL, thedaggerbinary is downloaded from that URL instead of the default release URL and added to the PATH.This has the advantage of limiting proliferation of custom builds of dagger, which is a subtle form of DX fragmentation. For example if we change our build tool from
maketodagger, we don't want to deal with outdated GHA configurations that still runmake.Short term, each user can build their own binary and publish it anywhere: github, s3 etc.
Longer term, we can (and IMO should) host a binary-on-demand service eg.
get.dagger.io/binary/dagger-$GITREF.tgzthat builds the requested version just-in-time for download.crazy-max commentedon Apr 13, 2022
We have something like this with our
setup-buildx-action. You can define a git repo asversionand it will build on-fly buildx and use it: https://github.com/docker/setup-buildx-action/runs/5987865407?check_suite_focus=true#step:3:95It's quite powerful when you want to test a PR with a specific context. Under the hood it uses a Git remote context to build buildx with buildx 😅:
Doing something like this should be possible for dagger too. Here is the PR for ref: docker/setup-buildx-action#99
shykes commentedon Apr 13, 2022
This is great! Thank you!
crazy-max commentedon Apr 23, 2022
#53 should fix this issue but depends on dagger/dagger#2288 if we want to build from the default branch.
In the meantime you can try with:
morlay commentedon May 6, 2022
@crazy-max You save my life!
I have mirgated to dagger with my PR now dagger/dagger#2310 (https://github.com/octohelm/cuemod)
crazy-max commentedon May 6, 2022
@morlay Available with
uses: dagger/dagger-for-github@v3