Add test on git.#Commit

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
Tom Chauveau
2021-09-01 18:49:21 +02:00
committed by Guillaume de Rouville
parent c8e3755188
commit 4ad2c8e7e5
9 changed files with 171 additions and 24 deletions

View File

@@ -12,7 +12,7 @@ import (
// Repository source code
source: dagger.#Artifact
// Repository remote URL (e.g https://github.com/dagger/dagger.git)
// Repository remote URL
remote: dagger.#Input & {string}
// Github PAT
@@ -59,18 +59,18 @@ import (
"/input/content": from: content
}
env: {
"USER_NAME": name
"USER_EMAIL": email
"COMMIT_MESSAGE": message
"GIT_BRANCH": repository.branch
"GIT_REMOTE": repository.remote
USER_NAME: name
USER_EMAIL: email
COMMIT_MESSAGE: message
GIT_BRANCH: repository.branch
GIT_REMOTE: repository.remote
if force {
"OPT_FORCE": "-f"
OPT_FORCE: "-f"
}
}
if repository.PAT != null {
env: "GIT_ASKPASS": "/get_gitPAT"
env: GIT_ASKPASS: "/get_gitPAT"
files: "/get_gitPAT": {
content: "cat /secret/github_pat"
mode: 0o500