Skip to content

Commit

Permalink
Merge pull request #13 from YashodhaSamarawickrama/main
Browse files Browse the repository at this point in the history
Remove SSL verification disabled flag
  • Loading branch information
YashodhaSamarawickrama authored Jul 23, 2024
2 parents 6a529b5 + ef8994f commit cea6d70
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 29 deletions.
4 changes: 0 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ inputs:
token:
required: true
description: 'The token of the user repository'
disableSSL:
required: true
description: 'Disable SSL verification'
default: true
serverUrl:
required: false
description: 'Gitlab server url'
Expand Down
17 changes: 4 additions & 13 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2858,19 +2858,9 @@ try {
const serverUrl = core.getInput('serverUrl');
const urlWithoutProtocol = serverUrl.replace(/^https:\/\//, '');
const ref = core.getInput('ref');
const disableSSL = core.getInput('disableSSL');

console.log("Started removing files in current directory");
exec(disableSSL === 'true' ? `git config --global http.sslVerify false` : `git config --global http.sslVerify true`, (err, stdout, stderr) => {
if (err) {
console.log(err);
core.setOutput("choreo-status", "failed");
core.setFailed(err.message);
return;
}
console.log(stdout);
console.log(stderr);
console.log("Completed disabling SSL verification");

exec(`rm -rf /home/runner/workspace/${configRepoName}/${configRepoName}/*`, (err, stdout, stderr) => {
if (err) {
console.log(err);
Expand All @@ -2892,7 +2882,7 @@ try {
console.log(stdout);
console.log(stderr);
console.log("Completed adding safe directory");
exec(`git init /home/runner/workspace/${configRepoName}/${configRepoName}`, (err, stdout, stderr) => {
exec(`git init`, (err, stdout, stderr) => {
if (err) {
console.log(err);
core.setOutput("choreo-status", "failed");
Expand Down Expand Up @@ -2963,7 +2953,7 @@ try {
});
});
});
});

} catch (e) {
core.setOutput("choreo-status", "failed");
core.setFailed(e.message);
Expand All @@ -2973,6 +2963,7 @@ try {
}

run();

})();

module.exports = __webpack_exports__;
Expand Down
14 changes: 2 additions & 12 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,9 @@ try {
const serverUrl = core.getInput('serverUrl');
const urlWithoutProtocol = serverUrl.replace(/^https:\/\//, '');
const ref = core.getInput('ref');
const disableSSL = core.getInput('disableSSL');

console.log("Started removing files in current directory");
exec(disableSSL === 'true' ? `git config --global http.sslVerify false` : `git config --global http.sslVerify true`, (err, stdout, stderr) => {
if (err) {
console.log(err);
core.setOutput("choreo-status", "failed");
core.setFailed(err.message);
return;
}
console.log(stdout);
console.log(stderr);
console.log("Completed disabling SSL verification");

exec(`rm -rf /home/runner/workspace/${configRepoName}/${configRepoName}/*`, (err, stdout, stderr) => {
if (err) {
console.log(err);
Expand Down Expand Up @@ -121,7 +111,7 @@ try {
});
});
});
});

} catch (e) {
core.setOutput("choreo-status", "failed");
core.setFailed(e.message);
Expand Down

0 comments on commit cea6d70

Please sign in to comment.