diff options
author | rstular <rok@stular.eu> | 2020-05-23 19:05:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-23 19:05:18 +0200 |
commit | 13d2cb26704ef877bd846d7b8e6395483b69cd7a (patch) | |
tree | 3ac6eae776aab54c10a8dd02413a32c26eab2aa4 | |
parent | Merge pull request #11 from beziapp/dev (diff) | |
parent | CI workflow (diff) | |
download | beziapp-13d2cb26704ef877bd846d7b8e6395483b69cd7a.tar beziapp-13d2cb26704ef877bd846d7b8e6395483b69cd7a.tar.gz beziapp-13d2cb26704ef877bd846d7b8e6395483b69cd7a.tar.bz2 beziapp-13d2cb26704ef877bd846d7b8e6395483b69cd7a.tar.lz beziapp-13d2cb26704ef877bd846d7b8e6395483b69cd7a.tar.xz beziapp-13d2cb26704ef877bd846d7b8e6395483b69cd7a.tar.zst beziapp-13d2cb26704ef877bd846d7b8e6395483b69cd7a.zip |
-rw-r--r-- | .github/workflows/ci-deploy.yml | 36 | ||||
-rw-r--r-- | server/report/index.php | 7 |
2 files changed, 40 insertions, 3 deletions
diff --git a/.github/workflows/ci-deploy.yml b/.github/workflows/ci-deploy.yml new file mode 100644 index 0000000..067acf6 --- /dev/null +++ b/.github/workflows/ci-deploy.yml @@ -0,0 +1,36 @@ +name: CI - copy dist/ to master + +on: + push: + branches: + - test1 + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout to release branch + uses: actions/checkout@v2 + with: + ref: test1 + - name: Copy dist/ folder + run: | + cp -r dist /tmp/ + - name: Checkout to master + uses: actions/checkout@v2 + with: + ref: master + - name: Replace files + run: | + rm -r * + mv /tmp/dist/* . + - name: Commit files + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub CI Action" + git add -A + git commit -m "Mirror change from release" + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/server/report/index.php b/server/report/index.php index b9ead0b..d89f41d 100644 --- a/server/report/index.php +++ b/server/report/index.php @@ -37,12 +37,13 @@ app_version VARCHAR(420) , previous_commit VARCHAR(69) , ip VARCHAR(69) , - username VARCHAR(69) + username VARCHAR(69) , + timestamp DATETIME )"; $result = mysqli_query($conn, $query); - $stmt = $conn->prepare("INSERT INTO error_reports (msg, url, line, colno, obj, ua, app_version, previous_commit, ip, username) VALUES". - "(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); + $stmt = $conn->prepare("INSERT INTO error_reports (msg, url, line, colno, obj, ua, app_version, previous_commit, ip, username, timestamp) VALUES". + "(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now())"); $stmt->bind_param("ssiissssss", $_REQUEST["error"]["msg"], $_REQUEST["error"]["url"], $_REQUEST["error"]["line"], $_REQUEST["error"]["column"], $_REQUEST["error"]["obj"], $_REQUEST["client"]["ua"], $_REQUEST["client"]["app_version"], $_REQUEST["client"]["previous_commit"], $_SERVER["REMOTE_ADDR"], $_REQUEST["client"]["username"]); |