Auto commit
All checks were successful
Build Org Website / build (push) Successful in 39s

This commit is contained in:
gitea-actions
2026-08-20 11:33:47 +01:00
parent 65885dbb3a
commit 0b4a68b81b
7 changed files with 96 additions and 80 deletions

50
push.c
View File

@@ -1,29 +1,39 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
char path[100] = "/home/zaine/master-folder/org-platform/org_web";
int main(void)
{
char path[] = "/home/zaine/master-folder/org-platform/org_web";
char command[256];
int result;
char command[200];
snprintf(command, sizeof(command),
"cd \"%s\" && git add .",
path);
result = system(command);
if (result != 0) {
printf("git add failed\n");
return 1;
}
snprintf(command, sizeof(command), "cd %s && git add .", path);
snprintf(command, sizeof(command),
"cd \"%s\" && git commit -m \"Auto commit\"",
path);
result = system(command);
if (result != 0) {
printf("git commit failed\n");
return 1;
}
int result = system(command);
snprintf(command, sizeof(command),
"cd \"%s\" && git push",
path);
result = system(command);
if (result != 0) {
printf("git push failed\n");
return 1;
}
snprintf(command, sizeof(command), "cd %s && git commit -m \"Auto commit", path);
result = system(command);
snprintf(command, sizeof(command), "cd %s && git push", path);
result = system(command);
if (result == 0) {
printf("Successfully pushed files to git.\n");
} else {
printf("Failed to push files to git.\n");
}
return 0;
return 0;
}