|
@ -1,4 +1,4 @@ |
|
|
name: gin-vue-admin ci&cd |
|
|
|
|
|
|
|
|
name: gin-vue-admin-backend ci&cd |
|
|
|
|
|
|
|
|
on: |
|
|
on: |
|
|
push: |
|
|
push: |
|
@ -8,14 +8,16 @@ jobs: |
|
|
|
|
|
|
|
|
build: |
|
|
build: |
|
|
name: Build |
|
|
name: Build |
|
|
runs-on: [ self-hosted ] |
|
|
|
|
|
|
|
|
runs-on: [ self-hosted, backend_runner ] |
|
|
steps: |
|
|
steps: |
|
|
|
|
|
|
|
|
- name: Check out the repository |
|
|
- name: Check out the repository |
|
|
uses: actions/checkout@v2 |
|
|
|
|
|
|
|
|
uses: actions/checkout@master |
|
|
|
|
|
|
|
|
- name: Show files |
|
|
- name: Show files |
|
|
run: ls -la |
|
|
|
|
|
|
|
|
run: | |
|
|
|
|
|
pwd |
|
|
|
|
|
ls -la |
|
|
|
|
|
|
|
|
- name: Get dependencies |
|
|
- name: Get dependencies |
|
|
run: | |
|
|
run: | |
|
@ -30,12 +32,16 @@ jobs: |
|
|
run: | |
|
|
run: | |
|
|
go build -v . |
|
|
go build -v . |
|
|
working-directory: ./server |
|
|
working-directory: ./server |
|
|
|
|
|
|
|
|
- name: Modify config params |
|
|
- name: Modify config params |
|
|
run: | |
|
|
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 |
|
|
working-directory: ./server |
|
|
|
|
|
|
|
|
- name: Run |
|
|
- name: Run |
|
|
run: | |
|
|
run: | |
|
|
nohup ./gin-vue-admin & |
|
|
nohup ./gin-vue-admin & |
|
|