From 3eecffe906365e37849e9df06e7b4a1fe1706487 Mon Sep 17 00:00:00 2001 From: Naveenraj M Date: Sun, 29 Mar 2020 00:58:20 +0530 Subject: [PATCH] setup ts file with steps --- src/main.ts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/main.ts b/src/main.ts index e22718e..1802a5d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,11 +1,37 @@ const core = require('@actions/core'); const github = require('@actions/github'); +const exec = require('@actions/exec'); async function run() { try { const myInput = core.getInput('specFile'); core.debug(`Hello ${myInput} from inside a container`); + // Get repo files from /github/workspace/ + await exec.exec('ls -la /github/workspace'); + + // LOG: know current directory + await exec.exec('pwd && echo $HOME && ls'); + + // Copy spec file from path specFile to /root/rpmbuild/SPECS/ + + + // Get tar.gz file of release + + + // Copy tar.gz file to /root/rpmbuild/SOURCES + + + // Execute rpmbuild + + + // Get path for rpm + + + // setOutput rpm_path to /root/rpmbuild/RPMS , to be consumed by other actions like + // actions/upload-release-asset + + // Get github context data const context = github.context; console.log(`We can even get context data, like the repo: ${context.repo.repo}`);