forked from fangci221/library
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add .env and mySQL.yml to setup mySQL DB
- Loading branch information
Showing
5 changed files
with
67 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Set up mySQL service container | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
# Test 3 times a day | ||
- cron: '0 */8 * * *' | ||
jobs: | ||
runner-job: | ||
# You must use a Linux environment when using service containers or container jobs | ||
runs-on: ubuntu-latest | ||
|
||
# Service containers to run with `runner-job` | ||
services: | ||
# Label used to access the service container | ||
mysql: | ||
# Docker Hub image | ||
image: mysql:latest | ||
env: | ||
DB_NAME: 'library' | ||
DB_USER: 'root' | ||
DB_PASS: ${{ secrets.DB_PASS }} | ||
# | ||
ports: | ||
# Opens tcp port 3800 on the host and service container | ||
- 3800:3800 | ||
|
||
steps: | ||
# Downloads a copy of the code in your repository before running CI tests | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
|
||
# Performs a clean installation of all dependencies in the `package.json` file | ||
# For more information, see https://docs.npmjs.com/cli/ci.html | ||
# - name: Install dependencies | ||
# run: npm ci | ||
|
||
- name: Connect to mySQL | ||
# Runs a script that creates a mySQL table, populates | ||
# the table with data, and then retrieves the data | ||
run: mysql -u | ||
# Environment variables used by the script to create | ||
# a new mySQL table. | ||
env: | ||
DB_NAME: 'library' | ||
DB_USER: 'root' | ||
DB_PASS: ${{ secrets.DB_PASS }} | ||
# The hostname used to communicate with the mySQL service container | ||
DB_HOST: localhost | ||
# The default mySQL port | ||
DB_PORT: 3800 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ selenium-debug.log | |
chromedriver.log | ||
|
||
# local env files | ||
.env | ||
# .env | ||
# .env.local | ||
# .env.*.local | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Database | ||
DB_HOST=127.0.0.1 | ||
DB_USER=root | ||
DB_PASS=123456 | ||
DB_NAME=library | ||
DB_PORT=3306 | ||
RESTFUL_IP=http://192.168.4.12/restful.service.cgi? | ||
|
||
|
||
# Logs | ||
LOG_DIR=C:\logs |