Skip to content

Commit b407d54

Browse files
author
Naveenraj M
committed
providing rpm directory
1 parent e4673b0 commit b407d54

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

lib/main.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,16 @@ function run() {
8383
// only contents of workspace can be changed by actions and used by subsequent actions
8484
// So copy all generated rpms into workspace , and publish output path relative to workspace
8585
yield exec.exec(`mkdir -p rpmbuild/SRPMS`);
86+
yield exec.exec(`mkdir -p rpmbuild/RPMS`);
8687
yield exec.exec(`cp /github/home/rpmbuild/SRPMS/${myOutput} rpmbuild/SRPMS`);
88+
yield cp.exec(`cp -R /github/home/rpmbuild/RPMS/. rpmbuild/RPMS/`);
8789
yield exec.exec(`ls -la rpmbuild/SRPMS`);
90+
yield exec.exec(`ls -la rpmbuild/RPMS`);
8891
// set output to path relative to workspace ex ./rpm/
89-
core.setOutput("source_rpm_dir_path", `rpmbuild/SRPMS/${myOutput}`); // path to Source RPM directory
92+
core.setOutput("source_rpm_dir_path", `rpmbuild/SRPMS/`); // path to SRPMS directory
9093
core.setOutput("source_rpm_path", `rpmbuild/SRPMS/${myOutput}`); // path to Source RPM file
9194
core.setOutput("source_rpm_name", `${myOutput}`); // name of Source RPM file
95+
core.setOutput("rpm_dir_path", `rpmbuild/RPMS/`); // path to RPMS directory
9296
core.setOutput("rpm_content_type", "application/octet-stream"); // Content-type for Upload
9397
}
9498
catch (error) {

src/main.ts

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,21 @@ async function run() {
9090

9191
// only contents of workspace can be changed by actions and used by subsequent actions
9292
// So copy all generated rpms into workspace , and publish output path relative to workspace
93-
await exec.exec(`mkdir -p rpmbuild/SRPMS`)
93+
await exec.exec(`mkdir -p rpmbuild/SRPMS`);
94+
await exec.exec(`mkdir -p rpmbuild/RPMS`);
9495

95-
await exec.exec(`cp /github/home/rpmbuild/SRPMS/${myOutput} rpmbuild/SRPMS`)
96-
97-
await exec.exec(`ls -la rpmbuild/SRPMS`)
96+
await exec.exec(`cp /github/home/rpmbuild/SRPMS/${myOutput} rpmbuild/SRPMS`);
97+
await cp.exec(`cp -R /github/home/rpmbuild/RPMS/. rpmbuild/RPMS/`);
9898

99+
await exec.exec(`ls -la rpmbuild/SRPMS`);
100+
await exec.exec(`ls -la rpmbuild/RPMS`);
101+
99102
// set output to path relative to workspace ex ./rpm/
100-
core.setOutput("source_rpm_dir_path", `rpmbuild/SRPMS/${myOutput}`); // path to Source RPM directory
101-
core.setOutput("source_rpm_path", `rpmbuild/SRPMS/${myOutput}`); // path to Source RPM file
102-
core.setOutput("source_rpm_name", `${myOutput}`); // name of Source RPM file
103+
core.setOutput("source_rpm_dir_path", `rpmbuild/SRPMS/`); // path to SRPMS directory
104+
core.setOutput("source_rpm_path", `rpmbuild/SRPMS/${myOutput}`); // path to Source RPM file
105+
core.setOutput("source_rpm_name", `${myOutput}`); // name of Source RPM file
106+
107+
core.setOutput("rpm_dir_path", `rpmbuild/RPMS/`); // path to RPMS directory
103108

104109
core.setOutput("rpm_content_type", "application/octet-stream"); // Content-type for Upload
105110

0 commit comments

Comments
 (0)