2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-18 20:30:56 +00:00

Get GitHub action script directory referencei2

This commit is contained in:
Mark Gurevich
2022-06-30 09:39:08 -04:00
parent 185982df27
commit dd190a1d93
2 changed files with 10 additions and 2 deletions

View File

@ -1,7 +1,6 @@
name: xcat_test
on:
pull_request:
types: [review_requested]
push
jobs:
xcat_pr_test:
runs-on: ubuntu-latest

View File

@ -15,6 +15,7 @@ use Encode::CN;
use JSON;
use URI::Escape;
use LWP::Simple;
use Cwd;
use Term::ANSIColor qw(:constants);
$Term::ANSIColor::AUTORESET = 1;
@ -333,6 +334,14 @@ sub install_xcat{
"sudo wget -q -O - \"http://xcat.org/files/xcat/repos/apt/apt.key\" | sudo apt-key add -",
"sudo apt-get -qq --allow-insecure-repositories update");
my @output;
my $dir = cwd;
print "[MG] Current working dir $dir";
@output = runcmd("cd $dir");
if($::RUNCMD_RC){
print RED "[MG] cd to $dir ...[Failed]\n";
print "[MG] error message:\n";
print Dumper \@output;
}
foreach my $cmd (@cmds){
print "[install_xcat] running $cmd\n";
@output = runcmd("$cmd");