mirror of
https://github.com/naveenrajm7/rpmbuild.git
synced 2025-07-12 04:13:50 +00:00
copy rpm to workspace
This commit is contained in:
10
lib/main.js
10
lib/main.js
@ -63,11 +63,17 @@ function run() {
|
||||
else {
|
||||
// the *entire* stdout and stderr (buffered)
|
||||
console.log(`stdout: ${stdout}`);
|
||||
myOutput = `${stdout}`;
|
||||
myOutput = myOutput + `${stdout}`;
|
||||
console.log(`stderr: ${stderr}`);
|
||||
}
|
||||
});
|
||||
core.setOutput("source_rpm_path", `/github/home/rpmbuild/SRPMS/${myOutput}`); // make option to upload source rpm
|
||||
// only contents of workspace can be changed by actions and used by subsequent actions
|
||||
// So copy all generated rpms into workspace , and publish output path relative to workspace
|
||||
yield exec.exec(`mkdir -p rpmbuild/SRPMS`);
|
||||
yield exec.exec(`cp /github/home/rpmbuild/SRPMS/${myOutput} rpmbuild/SRPMS`);
|
||||
yield exec.exec(`ls -la rpmbuild/SRPMS`);
|
||||
// set output to path relative to workspace ex ./rpm/
|
||||
core.setOutput("source_rpm_path", `rpmbuild/SRPMS`); // make option to upload source rpm
|
||||
}
|
||||
catch (error) {
|
||||
core.setFailed(error.message);
|
||||
|
14
src/main.ts
14
src/main.ts
@ -70,12 +70,22 @@ async function run() {
|
||||
} else {
|
||||
// the *entire* stdout and stderr (buffered)
|
||||
console.log(`stdout: ${stdout}`);
|
||||
myOutput = `${stdout}`;
|
||||
myOutput = myOutput+`${stdout}`;
|
||||
console.log(`stderr: ${stderr}`);
|
||||
}
|
||||
});
|
||||
|
||||
core.setOutput("source_rpm_path", `/github/home/rpmbuild/SRPMS/${myOutput}`); // make option to upload source rpm
|
||||
|
||||
// only contents of workspace can be changed by actions and used by subsequent actions
|
||||
// So copy all generated rpms into workspace , and publish output path relative to workspace
|
||||
await exec.exec(`mkdir -p rpmbuild/SRPMS`)
|
||||
|
||||
await exec.exec(`cp /github/home/rpmbuild/SRPMS/${myOutput} rpmbuild/SRPMS`)
|
||||
|
||||
await exec.exec(`ls -la rpmbuild/SRPMS`)
|
||||
|
||||
// set output to path relative to workspace ex ./rpm/
|
||||
core.setOutput("source_rpm_path", `rpmbuild/SRPMS`); // make option to upload source rpm
|
||||
|
||||
} catch (error) {
|
||||
core.setFailed(error.message);
|
||||
|
Reference in New Issue
Block a user