diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ac8c0d4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,35 @@ +name: CI + +on: + pull_request: + branches: + - "*" + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}-ci + cancel-in-progress: true + +jobs: + build: + name: Build + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v1 + + - name: Print version info + id: semver + run: | + make version + + - name: Set up QEMU + id: qemu + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Build + run: | + make container \ No newline at end of file diff --git a/scripts/run.sh b/scripts/run.sh index 76f0086..bbaebb8 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -13,6 +13,7 @@ # HOST_ADDRESS_TYPE = Address type of HOST_ADDRESS (one of DNS, IPV4, IPv6) # POD_IP = IP address used to create whitelist CIDR. For HOST_ADDRESS_TYPE=DNS, it will be status.PodIP. # POD_IP_TYPE = Address type of POD_IP (one of IPV4, IPv6) +# PRIMARY_TYPE = defines single/multi primary env | sort | grep "POD\|HOST\|NAME" @@ -104,6 +105,49 @@ mkdir -p /etc/mysql/group-replication.conf.d/ echo "!includedir /etc/mysql/group-replication.conf.d/" >>/etc/mysql/my.cnf mkdir -p /etc/mysql/conf.d/ echo "!includedir /etc/mysql/conf.d/" >>/etc/mysql/my.cnf +if [[ "$PRIMARY_TYPE" == "Multi-Primary" ]]; then +cat >>/etc/mysql/group-replication.conf.d/group.cnf <>/etc/mysql/group-replication.conf.d/group.cnf <