Format config file and ci script

This commit is contained in:
Granty1
2020-04-09 17:34:17 +08:00
parent 19548446e2
commit 4399994b80
2 changed files with 18 additions and 12 deletions
+13 -7
View File
@@ -1,4 +1,4 @@
name: gin-vue-admin ci&cd
name: gin-vue-admin-backend ci&cd
on:
push:
@@ -8,14 +8,16 @@ jobs:
build:
name: Build
runs-on: [ self-hosted ]
runs-on: [ self-hosted, backend_runner ]
steps:
- name: Check out the repository
uses: actions/checkout@v2
uses: actions/checkout@master
- name: Show files
run: ls -la
run: |
pwd
ls -la
- name: Get dependencies
run: |
@@ -30,12 +32,16 @@ jobs:
run: |
go build -v .
working-directory: ./server
- name: Modify config params
run: |
sed -i 's/%{address}/'$MYSQL_ADDR'/' config.yaml
sed -i 's/%{username}/'$MYSQL_USERNAME'/' config.yaml
sed -i 's/%{password}/'$MSQL_PASSWORD'/' config.yaml
sed -i 's/%{mysql_address}/'$MYSQL_ADDR'/' config.yaml
sed -i 's/%{mysql_username}/'$MYSQL_USERNAME'/' config.yaml
sed -i 's/%{mysql_password}/'$MSQL_PASSWORD'/' config.yaml
sed -i 's/%{redis_address}/'$REDIS_ADDR'/' config.yaml
sed -i 's/%{redis_password}/'$REDIS_PASSWORD'/' config.yaml
working-directory: ./server
- name: Run
run: |
nohup ./gin-vue-admin &