Security: PRs should not run `SonarCloud` (#1469)

This commit is contained in:
Karlatemp 2020-05-29 16:45:54 +08:00 committed by GitHub
parent b24a55efae
commit 2eb99166ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 1 deletions

44
.github/workflows/gradle-pr.yml vendored Normal file
View File

@ -0,0 +1,44 @@
name: Java PR CI
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:latest
ports:
- 3306
env:
MYSQL_USER: user
MYSQL_PASSWORD: password
MYSQL_DATABASE: test
MYSQL_ROOT_PASSWORD: password
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Verify MariaDB connection
env:
PORT: ${{ job.services.mariadb.ports[3306] }}
run: |
while ! mysqladmin ping -h"127.0.0.1" -P"$PORT" --silent; do
sleep 1
done
- name: Build with Gradle
env:
MYSQL_DB: test
MYSQL_USER: user
MYSQL_PASS: password
MYSQL_PORT: ${{ job.services.mariadb.ports[3306] }}
run: |
cd Plan
./gradlew build

View File

@ -1,7 +1,7 @@
name: Java CI
on: [push, pull_request]
on: [push]
jobs:
build: