You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2023/03/22 13:02:00 UTC
[shardingsphere] branch master updated: Refactor action script (#24762)
This is an automated email from the ASF dual-hosted git repository.
panjuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new a7bd3427423 Refactor action script (#24762)
a7bd3427423 is described below
commit a7bd34274238d7828a4850d3bd87e9726697bb6c
Author: 孙念君 Nianjun Sun <su...@apache.org>
AuthorDate: Wed Mar 22 21:01:52 2023 +0800
Refactor action script (#24762)
---
.github/workflows/nightly-build-example.yml | 4 ++--
.../nightly-build-example/init-mysql-container.sh} | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/nightly-build-example.yml b/.github/workflows/nightly-build-example.yml
index ac1edc1fdd0..bb97b05d15b 100644
--- a/.github/workflows/nightly-build-example.yml
+++ b/.github/workflows/nightly-build-example.yml
@@ -86,6 +86,8 @@ jobs:
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
+ volumes:
+ - .github/workflows/resources/scripts/nightly-build-example/init-mysql-container.sh:/docker-entrypoint-initdb.d/
zookeeper:
image: zookeeper:3.6.3
ports:
@@ -103,8 +105,6 @@ jobs:
key: ${{ env.REPOSITORY_NAME }}-maven-third-party-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ env.REPOSITORY_NAME }}-maven-third-party-
- - name: Prepare environments
- run: sh .github/workflows/resources/sql/nightly-generator-init.sh
- name: Build with Maven
run: ./mvnw -B -T1C -ntp clean install -DskipITs -DskipTests
- name: Generate examples
diff --git a/.github/workflows/resources/sql/nightly-generator-init.sh b/.github/workflows/resources/scripts/nightly-build-example/init-mysql-container.sh
similarity index 97%
rename from .github/workflows/resources/sql/nightly-generator-init.sh
rename to .github/workflows/resources/scripts/nightly-build-example/init-mysql-container.sh
index 29764bcec70..a85c9037c11 100644
--- a/.github/workflows/resources/sql/nightly-generator-init.sh
+++ b/.github/workflows/resources/scripts/nightly-build-example/init-mysql-container.sh
@@ -21,4 +21,4 @@ mysql -uroot -h127.0.0.1 -p123456 -e 'USE demo_ds_2;CREATE TABLE IF NOT EXISTS t
mysql -uroot -h127.0.0.1 -p123456 -e 'USE demo_ds_1;CREATE TABLE IF NOT EXISTS t_order_item(order_item_id BIGINT NOT NULL AUTO_INCREMENT, order_id BIGINT NOT NULL, user_id INT NOT NULL, phone VARCHAR(50), status VARCHAR(50), PRIMARY KEY (order_item_id));'
mysql -uroot -h127.0.0.1 -p123456 -e 'USE demo_ds_2;CREATE TABLE IF NOT EXISTS t_order_item(order_item_id BIGINT NOT NULL AUTO_INCREMENT, order_id BIGINT NOT NULL, user_id INT NOT NULL, phone VARCHAR(50), status VARCHAR(50), PRIMARY KEY (order_item_id));'
mysql -uroot -h127.0.0.1 -p123456 -e 'USE demo_ds_1;CREATE TABLE IF NOT EXISTS t_address (address_id BIGINT NOT NULL, address_name VARCHAR(100) NOT NULL, PRIMARY KEY (address_id));'
-mysql -uroot -h127.0.0.1 -p123456 -e 'USE demo_ds_2;CREATE TABLE IF NOT EXISTS t_address (address_id BIGINT NOT NULL, address_name VARCHAR(100) NOT NULL, PRIMARY KEY (address_id));'
+mysql -uroot -h127.0.0.1 -p123456 -e 'USE demo_ds_2;CREATE TABLE IF NOT EXISTS t_address (address_id BIGINT NOT NULL, address_name VARCHAR(100) NOT NULL, PRIMARY KEY (address_id));'
\ No newline at end of file