1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- name: gin-vue-admin ci&cd
- on:
- push:
- branches: [ action-ci ]
- jobs:
- build:
- name: Build
- runs-on: [ self-hosted ]
- steps:
- - name: Check out the repository
- uses: actions/checkout@v2
- - name: Show files
- run: ls -la
- - name: Get dependencies
- run: |
- go get -v -t -d ./...
- if [ -f Gopkg.toml ]; then
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
- dep ensure
- fi
- working-directory: ./server
- - name: Build
- 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
- cat config.yaml
- working-directory: ./server
- - name: Run
- run: |
- nohup ./gin-vue-admin &
- working-directory: ./server
|