mirror of
https://github.com/ZCShou/GoGoGo.git
synced 2026-03-30 03:58:13 +00:00
73 lines
2.4 KiB
YAML
73 lines
2.4 KiB
YAML
# For most projects, this workflow file will not need changing; you simply need
|
|
# to commit it to your repository.
|
|
#
|
|
# You may wish to alter this file to override the set of languages analyzed,
|
|
# or to provide custom queries or build logic.
|
|
#
|
|
# ******** NOTE ********
|
|
# We have attempted to detect the languages in your repository. Please check
|
|
# the `language` matrix defined below to confirm you have the correct set of
|
|
# supported CodeQL languages.
|
|
#
|
|
name: "CodeQL"
|
|
|
|
on:
|
|
# 手动使用 Github WebUI 触发
|
|
workflow_dispatch:
|
|
# 仓库收到 Push 时触发
|
|
push:
|
|
tags:
|
|
- 'Release*'
|
|
# 仓库收到 pull_request 时触发
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
schedule:
|
|
- cron: '36 23 * * 1'
|
|
|
|
jobs:
|
|
analyze:
|
|
name: Analyze
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
actions: read
|
|
contents: read
|
|
security-events: write
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
language: [ 'java' ]
|
|
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
|
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
- name: Set Swap Space
|
|
uses: pierotofy/set-swap-space@49819abfb41bd9b44fb781159c033dba90353a7c # v1.0
|
|
with:
|
|
swap-size-gb: 10
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@76621b61decf072c1cee8dd1ce2d2a82d33c17ed # v3.29.5
|
|
with:
|
|
languages: ${{ matrix.language }}
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@9704b39bf258b59bc04b50fa2dd55e9ed76b47a8 # v4.1.0
|
|
with:
|
|
distribution: "temurin"
|
|
java-version: 17
|
|
# 创建 local.properties 文件
|
|
- name: Create local.properties
|
|
run: |
|
|
cat << EOF > local.properties
|
|
MAPS_API_KEY=${{ secrets.MAPS_API_KEY }}
|
|
MAPS_SAFE_CODE=${{ secrets.MAPS_SAFE_CODE }}
|
|
EOF
|
|
- name: Assemble
|
|
run: |
|
|
mkdir -p "$HOME/.gradle"
|
|
echo "org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > "$HOME/.gradle/gradle.properties"
|
|
./gradlew assembleDebug
|
|
- name: Perform CodeQL Analysis
|
|
uses: github/codeql-action/analyze@76621b61decf072c1cee8dd1ce2d2a82d33c17ed # v3.29.5 |