From 839c44710f2eddcc48218f5f486daed38c6737b9 Mon Sep 17 00:00:00 2001 From: Cyrille Bollu Date: Wed, 9 Nov 2022 15:27:32 +0100 Subject: [PATCH 1/3] update the gihub action dependencies Signed-off-by: Cyrille Bollu --- package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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" From 267f1778ec4ee4d316d7e7c48e9b44784effdc94 Mon Sep 17 00:00:00 2001 From: Cyrille Bollu Date: Wed, 9 Nov 2022 15:39:32 +0100 Subject: [PATCH 2/3] Try and fix: name: roadmap version: 3.0.2 /usr/bin/rpmdev-setuptree /usr/bin/cp /github/workspace/roadmap.spec /github/home/rpmbuild/SPECS/roadmap.spec /usr/bin/git archive --output=/github/home/rpmbuild/SOURCES/roadmap-3.0.2.tar.gz --prefix=roadmap-3.0.2/ HEAD /usr/bin/rpmbuild -ba /github/home/rpmbuild/SPECS/roadmap.spec error: File /github/home/rpmbuild/SOURCES/roadmap.tar.gz: No such file or directory Error: action failed with error: Error: The process '/usr/bin/rpmbuild' failed with exit code 1 Signed-off-by: Cyrille Bollu --- src/main.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.ts b/src/main.ts index 423186f..aefafd0 100644 --- a/src/main.ts +++ b/src/main.ts @@ -53,6 +53,7 @@ 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; // Execute rpmbuild , -ba generates both RPMS and SPRMS From 4c9aba2975dcf3d59bc4ff44895d91ae82c5ceb8 Mon Sep 17 00:00:00 2001 From: Cyrille Bollu Date: Wed, 9 Nov 2022 15:53:56 +0100 Subject: [PATCH 3/3] Adds an action to install build dependencies before running rpmbuild Signed-off-by: Cyrille Bollu --- src/main.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.ts b/src/main.ts index aefafd0..454f568 100644 --- a/src/main.ts +++ b/src/main.ts @@ -56,6 +56,9 @@ async function run() { 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(