upd: reordering steps
This commit is contained in:
parent
8f1abe22b3
commit
0a80fc9d1b
6 changed files with 56 additions and 65 deletions
30
.github/actions/install_db/actions.yml
vendored
Normal file
30
.github/actions/install_db/actions.yml
vendored
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Setup MySQL Tuner repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up MySQL
|
||||||
|
uses: mirromutth/mysql-action@v1.1
|
||||||
|
with:
|
||||||
|
mysql root password: "root"
|
||||||
|
mysql version: "${{ inputs.MYSQL_VERSION }}"
|
||||||
|
|
||||||
|
- name: Injecting credentials
|
||||||
|
run: |
|
||||||
|
echo -e "[client]\nuser=root\npassword=root\nhost=127.0.0.1\nprotocol=TCP" > $HOME/.my.cnf
|
||||||
|
|
||||||
|
- name: Cloning test_db dataset
|
||||||
|
run: |
|
||||||
|
git clone https://github.com/datacharmer/test_db.git
|
||||||
|
|
||||||
|
- name: Injecting test_db dataset
|
||||||
|
run: |
|
||||||
|
sleep 5s
|
||||||
|
cd test_db
|
||||||
|
netstat -ltpn
|
||||||
|
mysql -e 'select version();'
|
||||||
|
mysql -e 'CREATE DATABASE data;'
|
||||||
|
mysql data< ./employees.sql
|
||||||
|
cd -
|
||||||
|
rm -rf test_db
|
11
.github/actions/pull_and_mysql/actions.yml
vendored
Normal file
11
.github/actions/pull_and_mysql/actions.yml
vendored
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Setup MySQL Tuner repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up MySQL
|
||||||
|
uses: mirromutth/mysql-action@v1.1
|
||||||
|
with:
|
||||||
|
mysql root password: "root"
|
||||||
|
mysql version: "${{ inputs.MYSQL_VERSION }}"
|
43
.github/workflows/generate_examples.yml
vendored
43
.github/workflows/generate_examples.yml
vendored
|
@ -16,33 +16,10 @@ jobs:
|
||||||
|
|
||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||||
steps:
|
steps:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
- uses: .github/actions/install_db
|
||||||
- name: Setup MySQL Tuner repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Set up MySQL
|
|
||||||
uses: mirromutth/mysql-action@v1.1
|
|
||||||
with:
|
with:
|
||||||
mysql root password: "root"
|
MYSQL_VERSION: "8.0"
|
||||||
mysql version: "8.0"
|
|
||||||
- name: Injecting credentials
|
|
||||||
run: |
|
|
||||||
echo -e "[client]\nuser=root\npassword=root\nhost=127.0.0.1\nprotocol=TCP" > $HOME/.my.cnf
|
|
||||||
|
|
||||||
- name: Cloning test_db dataset
|
|
||||||
run: |
|
|
||||||
git clone https://github.com/datacharmer/test_db.git
|
|
||||||
|
|
||||||
- name: Injecting test_db dataset
|
|
||||||
run: |
|
|
||||||
sleep 5s
|
|
||||||
cd test_db
|
|
||||||
netstat -ltpn
|
|
||||||
mysql -e 'select version();'
|
|
||||||
mysql -e 'CREATE DATABASE data;'
|
|
||||||
mysql data< ./employees.sql
|
|
||||||
cd -
|
|
||||||
rm -rf test_db
|
|
||||||
# Runs a single command using the runners shell
|
# Runs a single command using the runners shell
|
||||||
- name: Run verbose mode with dumpdir result
|
- name: Run verbose mode with dumpdir result
|
||||||
run: |
|
run: |
|
||||||
|
@ -50,10 +27,12 @@ jobs:
|
||||||
sudo perl ./mysqltuner.pl --user=root --pass=root --protocol tcp --verbose --dumpdir=./examples/github/result --json | tee -a ./examples/github/result/result.json
|
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
|
# Runs a single command using the runners shell
|
||||||
- name: Commit example result to repo
|
- name: Run the Action
|
||||||
run: |
|
uses: devops-infra/action-commit-push@master
|
||||||
git config --global user.name "Jean-Marie Renouard"
|
with:
|
||||||
git config --global user.email "jmrenouard@gmail.com"
|
github_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
git add .
|
add_timestamp: true
|
||||||
git commit -m "Commit example result for employees database for Actions"
|
commit_prefix: "[AUTO]"
|
||||||
git push
|
commit_message: "Updates result examples (via Actions)"
|
||||||
|
force: false
|
||||||
|
target_branch: update/version
|
9
.github/workflows/pull_request.yml
vendored
9
.github/workflows/pull_request.yml
vendored
|
@ -23,14 +23,9 @@ jobs:
|
||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||||
steps:
|
steps:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||||
- name: Setup MySQL Tuner repository
|
- uses: .github/actions/pull_and_mysql
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Set up MySQL
|
|
||||||
uses: mirromutth/mysql-action@v1.1
|
|
||||||
with:
|
with:
|
||||||
mysql root password: "root"
|
MYSQL_VERSION: "8.0"
|
||||||
mysql version: "8.0"
|
|
||||||
|
|
||||||
- name: Run help mode
|
- name: Run help mode
|
||||||
run: |
|
run: |
|
||||||
|
|
27
.github/workflows/run_mt_with_db.yml
vendored
27
.github/workflows/run_mt_with_db.yml
vendored
|
@ -16,33 +16,10 @@ jobs:
|
||||||
|
|
||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||||
steps:
|
steps:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
- uses: .github/actions/install_db
|
||||||
- name: Setup MySQL Tuner repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Set up MySQL
|
|
||||||
uses: mirromutth/mysql-action@v1.1
|
|
||||||
with:
|
with:
|
||||||
mysql root password: "root"
|
MYSQL_VERSION: "8.0"
|
||||||
mysql version: "8.0"
|
|
||||||
- name: Injecting credentials
|
|
||||||
run: |
|
|
||||||
echo -e "[client]\nuser=root\npassword=root\nhost=127.0.0.1\nprotocol=TCP" > $HOME/.my.cnf
|
|
||||||
|
|
||||||
- name: Cloning test_db dataset
|
|
||||||
run: |
|
|
||||||
git clone https://github.com/datacharmer/test_db.git
|
|
||||||
|
|
||||||
- name: Injecting test_db dataset
|
|
||||||
run: |
|
|
||||||
sleep 5s
|
|
||||||
cd test_db
|
|
||||||
netstat -ltpn
|
|
||||||
mysql -e 'select version();'
|
|
||||||
mysql -e 'CREATE DATABASE data;'
|
|
||||||
mysql data< ./employees.sql
|
|
||||||
cd -
|
|
||||||
rm -rf test_db
|
|
||||||
# Runs a single command using the runners shell
|
# Runs a single command using the runners shell
|
||||||
- name: Run help mode
|
- name: Run help mode
|
||||||
run: perl ./mysqltuner.pl --help
|
run: perl ./mysqltuner.pl --help
|
||||||
|
|
1
.github/workflows/update_cve_and_docs.yml
vendored
1
.github/workflows/update_cve_and_docs.yml
vendored
|
@ -20,7 +20,6 @@ jobs:
|
||||||
|
|
||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||||
steps:
|
steps:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
||||||
- name: Setup MySQL Tuner repository
|
- name: Setup MySQL Tuner repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue