This commit is contained in:
Naveenraj M
2020-03-29 18:01:56 +05:30
parent 596f60a09f
commit 33e51511c7
2 changed files with 13 additions and 4 deletions

View File

@ -16,14 +16,23 @@ function download_archive(owner, repo, ref) {
try {
const octokit = new Octokit();
const archive_format = "tarball";
octokit.repos.getArchiveLink({
const ref = "v1.0.0";
console.log("Calling API ...");
octokit.repos.getBranch({
owner,
repo,
archive_format,
ref
}).then(({ data }) => {
console.log(data);
});
// octokit.repos.getArchiveLink({
// owner,
// repo,
// archive_format,
// ref
// }).then(( { data }) => {
// console.log(data)
// });
//console.log(`Download Location : ${downloadLocation}`);
//const tarBallPath = await tc.downloadTool(downloadLocation);
//console.log(`Tarball Location : ${tarBallPath}`);

View File

@ -22,10 +22,10 @@ function run() {
const repo = context.repo.repo;
const ref = context.ref;
console.log(`We can even get context data, like the owner: ${owner}, repo: ${repo}, ref: ${ref}`);
const tarBallPath = download_tar(owner, repo, ref);
const tarBallPath = yield download_tar(owner, repo, ref);
console.log(`Tar Path for copy : ${tarBallPath}`);
const specFile = core.getInput('specFile');
core.debug(`Hello ${specFile} from inside a container`);
console.log(`Hello ${specFile} from inside a container`);
// Get repo files from /github/workspace/
yield exec.exec('ls -la /github/workspace');
// LOG: know current directory