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:
Tom Chauveau
2021-09-01 18:48:54 +02:00
committed by Guillaume de Rouville
parent 019b56891d
commit c8e3755188
3 changed files with 113 additions and 0 deletions

View File

@@ -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 & {