diff --git a/lib/download-release-archive.js b/lib/download-release-archive.js index 34f8ad8..33634b4 100644 --- a/lib/download-release-archive.js +++ b/lib/download-release-archive.js @@ -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}`); diff --git a/lib/main.js b/lib/main.js index d3d9579..709ebb9 100644 --- a/lib/main.js +++ b/lib/main.js @@ -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