dagger / dagger-for-github

GitHub Action for Dagger
https://github.com/marketplace/actions/dagger-for-github
Apache License 2.0
124 stars 26 forks source link

Dagger for GitHub action for Dagger v0.9.3 #98

Closed jpadams closed 10 months ago

jpadams commented 10 months ago

We'll release this as v5.0.0 , v5 https://docs.github.com/en/actions/creating-actions/about-custom-actions

Works as expected here for dagger call and dagger run cases: https://github.com/jpadams/test-new-action/actions/runs/6859800772/job/18652631258

DX is basic, but pretty good for both dagger run and dagger call. https://github.com/jpadams/test-new-action/blob/main/.github/workflows/run-and-call.yml#L27-L41

    - name: dagger run
      uses: dagger/dagger-for-github@dagger-for-gh-action-v0.9.3
      with:
        workdir: db-service
        verb: run
        args: node build.js
        cloud-token: ${{ secrets.DAGGER_CLOUD_TOKEN }}
        version: "0.9.3"
    - name: dagger call
      uses: dagger/dagger-for-github@dagger-for-gh-action-v0.9.3
      with:
        verb: call 
        module: github.com/shykes/daggerverse/hello
        args: with-greeting --greeting Hola with-name --name Jeremy message
        cloud-token: ${{ secrets.DAGGER_CLOUD_TOKEN }}

Updated README.md: https://github.com/dagger/dagger-for-github/blob/ea5581fc7d79ae81db8c18029cbc76d3f45cf1ea/README.md

jpadams commented 10 months ago

I love this as a way to use Zenith.

One important question: can this also used as a wrapper to dagger run in pre-Zenith CLI? And, should it?

Right now it doesn't work for dagger run, but only because it always uses -m. image

Should be an easy fix to accommodate dagger run. Can't think of why we wouldn't want that for now.

shykes commented 10 months ago

Should be an easy fix to accommodate dagger run. Can't think of why we wouldn't want that for now.

Yeah, we need to make sure the UX is smooth, but making this dual usage would be great.

jpadams commented 10 months ago

Should be an easy fix to accommodate dagger run. Can't think of why we wouldn't want that for now.

Yeah, we need to make sure the UX is smooth, but making this dual usage would be great.

Pretty good for dagger run and dagger call at this point. Brings CLI-feel into GHA: https://github.com/jpadams/test-new-action/blob/main/.github/workflows/run-and-call.yml#L27-L41