Add git.#Commit definition and git.#Image
This definition allow user to commit & push new content to repository. I've also add a quick feature to os.#Container to write files. Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
committed by
Guillaume de Rouville
parent
019b56891d
commit
c8e3755188
@@ -54,6 +54,12 @@ import (
|
||||
// Safely mount secrets (in cleartext) as non-persistent files
|
||||
secret: [string]: dagger.#Secret
|
||||
|
||||
// Write file in the container
|
||||
files: [string]: {
|
||||
content: string
|
||||
mode: int | *0o644
|
||||
}
|
||||
|
||||
// Mount persistent cache directories
|
||||
cache: [string]: true
|
||||
|
||||
@@ -86,6 +92,13 @@ import (
|
||||
"dir": dir
|
||||
}
|
||||
},
|
||||
for dest, file in files {
|
||||
op.#WriteFile & {
|
||||
"content": file.content
|
||||
"mode": file.mode
|
||||
"dest": dest
|
||||
}
|
||||
},
|
||||
// Execute main command with volumes
|
||||
if command != "" {
|
||||
op.#Exec & {
|
||||
|
Reference in New Issue
Block a user