Skip to content

Replace SQL script

Replace SQL script #38

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
on:
push:
branches:
- dev
pull_request:
jobs:
commit-and-push:
if: ${{ github.event_name == 'push' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Replace SQL script
run: |
sed -i -e '/solidui_mysql.sql: |-/,$ {
/solidui_mysql.sql: |-/!d
r solidui-entrance/src/main/resources/sql/mysql/solidui_mysql.sql
}' deploy/kubernetes/helm-solidui/templates/cm-mysql.yaml
- name: Commit changes
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
git add .
git commit -m "Replace SQL script" --allow-empty
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: dev
force: true
update-sql-script:
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Replace SQL script
run: |
sed -i -e '/solidui_mysql.sql: |-/,$ {
/solidui_mysql.sql: |-/!d
r solidui-entrance/src/main/resources/sql/mysql/solidui_mysql.sql
}' deploy/kubernetes/helm-solidui/templates/cm-mysql.yaml
cat deploy/kubernetes/helm-solidui/templates/cm-mysql.yaml