diff --git a/actions/build.go b/actions/build.go index 6764b2c..4dd56ef 100644 --- a/actions/build.go +++ b/actions/build.go @@ -35,10 +35,10 @@ func Build(ctx context.Context) error { ctx = context.Background() shuttleGit := client. - Git("git@github.com:kjuulh/shuttle.git", dagger.GitOpts{ + Git("git@github.com:lunarway/shuttle.git", dagger.GitOpts{ KeepGitDir: true, }). - Branch("master"). + Tag("v0.17.2"). Tree(dagger.GitRefTreeOpts{ SSHAuthSocket: client.Host().UnixSocket(os.Getenv("SSH_AUTH_SOCK")), }) @@ -77,6 +77,18 @@ func Build(ctx context.Context) error { Platform: platform, }). From("golang:1.20.3"). + WithExec([]string{ + "apt", "update", + }). + WithExec([]string{ + "apt", "install", "-y", "curl", "build-essential", + }). + WithExec([]string{ + "bash", "-c", "curl https://sh.rustup.rs -sSf | bash -s -- -y", + }). + WithExec([]string{ + "bash", "-c", "echo 'source $HOME/.cargo/env' >> $HOME/.bashrc", + }). WithWorkdir("/app"). WithFile("/usr/local/bin/shuttle", shuttle). WithExec([]string{"shuttle", "version"}) @@ -113,7 +125,6 @@ func Build(ctx context.Context) error { dagger.ContainerPublishOpts{ PlatformVariants: containers, }) - if err != nil { log.Printf("%v", err) return err diff --git a/templates/shuttle-template.yaml b/templates/shuttle-template.yaml index 84fe468..fbde4f8 100644 --- a/templates/shuttle-template.yaml +++ b/templates/shuttle-template.yaml @@ -19,7 +19,7 @@ steps: - sleep 10 - echo "$${DOCKER_PASSWORD}" | docker login --password-stdin --username="$${DOCKER_USERNAME}" - name: "build" - image: docker.io/kasperhermansen/shuttle-drone:1680894029336 + image: docker.io/kasperhermansen/shuttle-drone:1683322851258 volumes: - name: dockersock path: /var/run