Merge pull request #1779 from shykes/ci-anydir

Fix ./ci to be workdir-independent
This commit is contained in:
Sam Alba 2022-03-14 16:05:51 -07:00 committed by GitHub
commit a406b15ef4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 12 deletions

View File

@ -1 +0,0 @@
../../../pkg/dagger.io

View File

@ -1 +0,0 @@
../../../pkg/universe.dagger.io

View File

@ -13,15 +13,7 @@ dagger.#Plan & {
// platform: "linux/aarch64" // platform: "linux/aarch64"
platform: "linux/amd64" platform: "linux/amd64"
client: filesystem: { client: filesystem: "./build": write: contents: actions.build.export.directories["/build"]
"../": read: exclude: [
"ci",
"node_modules",
"cmd/dagger/dagger",
"cmd/dagger/dagger-debug",
]
"./build": write: contents: actions.build.export.directories["/build"]
}
actions: { actions: {
_mountGoCache: { _mountGoCache: {
@ -36,7 +28,7 @@ dagger.#Plan & {
_mountSourceCode: { _mountSourceCode: {
mounts: "dagger source code": { mounts: "dagger source code": {
contents: client.filesystem."../".read.contents contents: _source.output
dest: "/usr/src/dagger" dest: "/usr/src/dagger"
} }
workdir: mounts["dagger source code"].dest workdir: mounts["dagger source code"].dest

1
cue.mod/pkg Symbolic link
View File

@ -0,0 +1 @@
../pkg

15
source.cue Normal file
View File

@ -0,0 +1,15 @@
package main
import (
"dagger.io/dagger"
)
_source: dagger.#Source & {
path: "."
exclude: [
"ci",
"node_modules",
"cmd/dagger/dagger",
"cmd/dagger/dagger-debug",
]
}