New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run development version of dagger? #35
Comments
Example that doesn't use dagger-for-github: If the interface is good, could be made into action inputs with the dagger executable put in an appropriate spot in PATH. |
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. |
Thanks, I'm trying to run this but the action fails with
Disclaimer: I am a GHA noob. Here is my workflow, in case it's helpful:
|
Update: I removed the line setting an explicit token (
I thought maybe |
In the example above, notice I refined things and made an actual resuable lego brick, an action, here: In this one, the inputs are similar, but I make the You can use the action like this to install
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 |
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)
name: okr
on:
push:
branches:
pull_request:
branches:
jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Clone this repository
uses: actions/checkout@v3
- name: Clone dagger repository
uses: actions/checkout@v3
with:
repository: dagger/dagger
# https://github.com/actions/checkout#Checkout-multiple-repos-private
token: ${{ secrets.DAGGER_SHYKES_OKR_GH_PAT }}
path: 'src/dagger'
ref: main
fetch-depth: 0
- name: Install go
uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Build dagger
run: |
cd ${{ github.workspace }}/src/dagger
make dagger
- name: Verify dagger version
run: |
${{ github.workspace }}/src/dagger/cmd/dagger/dagger version
- name: Generate asciidoc
env:
DAGGER_LOG_FORMAT: plain
run: |
${{ github.workspace }}/src/dagger/cmd/dagger/dagger do -p ./objectives render |
Thank you both for your help! I got it to work on my repo. My 2c on how to implement this feature:
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 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. |
We have something like this with our name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
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 😅:
Doing something like this should be possible for dagger too. Here is the PR for ref: docker/setup-buildx-action#99 |
This is great! Thank you! |
#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: jobs:
deploy:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Dagger
uses: crazy-max/dagger-action@build-ref
with:
version: https://github.com/dagger/dagger.git#refs/pull/2288/head
cmds: do test |
@crazy-max You save my life! I have mirgated to dagger with my PR now dagger/dagger#2310 (https://github.com/octohelm/cuemod) |
@morlay Available with |
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?
The text was updated successfully, but these errors were encountered: