diff --git a/package.json b/package.json index 7e9075c..98d9f65 100644 --- a/package.json +++ b/package.json @@ -25,11 +25,11 @@ }, "homepage": "https://github.com/actions/container-toolkit-template#readme", "dependencies": { - "@actions/core": "^1.0.0", - "@actions/exec": "^1.0.0", - "@actions/github": "^1.0.0", - "@actions/io": "^1.0.0", - "@actions/tool-cache": "^1.3.3", + "@actions/core": "^1.10.0", + "@actions/exec": "^1.1.1", + "@actions/github": "^5.1.1", + "@actions/io": "^1.1.2", + "@actions/tool-cache": "^2.0.1", "@octokit/rest": "^17.1.4", "@types/node": "^12.0.4", "typescript": "^3.5.1" diff --git a/src/main.ts b/src/main.ts index 423186f..454f568 100644 --- a/src/main.ts +++ b/src/main.ts @@ -53,8 +53,12 @@ async function run() { const oldGitDir = process.env.GIT_DIR; process.env.GIT_DIR = '/github/workspace/.git'; await exec.exec(`git archive --output=/github/home/rpmbuild/SOURCES/${name}-${version}.tar.gz --prefix=${name}-${version}/ HEAD`); + await exec.exec(`ln -s /github/home/rpmbuild/SOURCES/${name}-${version}.tar.gz /github/home/rpmbuild/SOURCES/${name}.tar.gz`); process.env.GIT_DIR = oldGitDir; + // Installs build dependencies + await exec.exec(`yum-builddep ${specFile.destFullPath}`); + // Execute rpmbuild , -ba generates both RPMS and SPRMS try { await exec.exec(