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:
3
.github/workflows/xcat_test.yml
vendored
3
.github/workflows/xcat_test.yml
vendored
@ -1,7 +1,6 @@
|
||||
name: xcat_test
|
||||
on:
|
||||
pull_request:
|
||||
types: [review_requested]
|
||||
push
|
||||
jobs:
|
||||
xcat_pr_test:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -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");
|
||||
|
Reference in New Issue
Block a user