#GHA

1 messages ยท Page 1 of 1 (latest)

wind topaz
#

i get an error in my generated github action from the following golang dagger

package main

import (
    "context"
    "dagger/nocdkp/internal/dagger"
)

type Nocdkp struct{}

func (m *Nocdkp) Generate() *dagger.Directory {
    return dag.
        Gha().
        WithWorkflow(
            dag.Gha().Workflow("Test suite", dagger.GhaWorkflowOpts{
                OnPush: true,
            }).
                WithJob(dag.Gha().Job("test", "test", dagger.GhaJobOpts{
                    Runner: []string{"ubuntu-latest"},
                },
                ),
                ),
        ).
        Generate()
}

func (m *Nocdkp) Test(ctx context.Context) (string, error) {
    return dag.Goreleaser().Test().Output(ctx)
}
halcyon pier
#

Probably @frank depot ..

#

@wind topaz do you specifically want to setup a dev dagger engine? Or are you OK to run this generated pipeline with a stable version of dagger?

fossil geode
#

per the snippet above, seems like this shouldn't be trying to start a dev engine ๐Ÿ‘€

#

@wind topaz what GHA version of the module are you using? shykes/gha? or the dagger/dagger one?

halcyon pier
#

that looks like dagger/dagger

#

you can tell because it's so complicatedpowerful ๐Ÿ˜›

wind topaz
#

dagger.json

{
  "name": "nocdkp",
  "engineVersion": "v0.16.3",
  "sdk": {
    "source": "go"
  },
  "dependencies": [
    {
      "name": "gha",
      "source": "github.com/dagger/dagger/modules/gha@v0.15.2",
      "pin": "b13f2c640a019a0197765e8d5cea1cc96786c487"
    },
    {
      "name": "goreleaser",
      "source": "github.com/goreleaser/goreleaser@v2.7.0",
      "pin": "8aacb197877091cea0d18523ad672eb99087b18d"
    }
  ],
  "source": ".dagger"
}
wind topaz
fossil geode
wind topaz
#

i am running dagger call generate -o . to generate the workflows

wind topaz
fossil geode
#

specifically DaggerVersion: "latest"

wind topaz
#

Amazing thanks for the fast response, this is one of the best developer communities handsdown!

#

NICE i got past that point now ๐Ÿ™‚

halcyon pier
#

@fossil geode do you agree "latest" should be the default? Otherwise it indeed is not super reusable

halcyon pier
#

it was the default for shykes/gha just saying ๐Ÿ˜›

fossil geode
fossil geode
#

woot! just realized the module works ok in main but we haven't released a new version ๐Ÿ™

fossil geode