From 43fdb3680e825ddeb47c88b4869b3cf93ef56746 Mon Sep 17 00:00:00 2001 From: Jean-Marie Renouard Date: Sat, 18 Mar 2023 17:57:06 +0100 Subject: [PATCH] feat: try to auto commit result into repo --- .github/workflows/exec.yml | 13 ++++++++++++- build/build_rpm.sh | 4 ++-- build/clean.sh | 0 build/deployOn | 0 mysqltuner.pl | 0 vulnerabilities.csv | 0 6 files changed, 14 insertions(+), 3 deletions(-) mode change 100755 => 100644 build/build_rpm.sh mode change 100755 => 100644 build/clean.sh mode change 100755 => 100644 build/deployOn mode change 100755 => 100644 mysqltuner.pl mode change 100755 => 100644 vulnerabilities.csv diff --git a/.github/workflows/exec.yml b/.github/workflows/exec.yml index c38fbde..632a796 100644 --- a/.github/workflows/exec.yml +++ b/.github/workflows/exec.yml @@ -59,4 +59,15 @@ jobs: # Runs a single command using the runners shell - name: Run verbose mode with dumpdir result - run: sudo perl ./mysqltuner.pl --user=root --pass=root --protocol tcp --verbose --dumpdir=result + run: | + mkdir -p ./examples/github/result + sudo perl ./mysqltuner.pl --user=root --pass=root --protocol tcp --verbose --dumpdir=./examples/github/result --json | tee -a ./examples/github/result/result.json + + # Runs a single command using the runners shell + - name: Commit example result to repo + run: | + git config --global user.name "Jean-Marie Renouard" + git config --global user.email "jmrenouard@gmail.com" + git add . + git commit -m "Commit example result" + git push \ No newline at end of file diff --git a/build/build_rpm.sh b/build/build_rpm.sh old mode 100755 new mode 100644 index 8443226..d1341d6 --- a/build/build_rpm.sh +++ b/build/build_rpm.sh @@ -1,10 +1,10 @@ #!/bin/sh -BUILD_DIR=`dirname $(readlink -f $0)` +BUILD_DIR="$(dirname $(readlink -f "$0"))" VERSION=$(grep -Ei 'my \$tunerversion' $BUILD_DIR/../mysqltuner.pl | grep = | cut -d\" -f2) cd $BUILD_DIR -sh ./clean.sh +sh ./clean.sh perl -pe "s/%VERSION%/$VERSION/g" mysqltuner.spec.tpl > mysqltuner.spec mkdir -p $BUILD_DIR/mysqltuner-$VERSION diff --git a/build/clean.sh b/build/clean.sh old mode 100755 new mode 100644 diff --git a/build/deployOn b/build/deployOn old mode 100755 new mode 100644 diff --git a/mysqltuner.pl b/mysqltuner.pl old mode 100755 new mode 100644 diff --git a/vulnerabilities.csv b/vulnerabilities.csv old mode 100755 new mode 100644