Merge pull request #406 from Skyluker4/github-actions

Add Automated Workflows
This commit is contained in:
Docile-Alligator 2021-08-29 19:45:13 +08:00 committed by GitHub
commit 78deab34b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 72 additions and 0 deletions

6
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: gradle
directory: /
schedule:
interval: daily

33
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Build
on:
push:
pull_request:
workflow_dispatch:
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set-up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- name: Grant Execute Permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build -x lint
- name: Upload apk
uses: actions/upload-artifact@v2
with:
name: Infinity-${{github.sha}}
path: app/build/outputs/apk/
if-no-files-found: error

33
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: CodeQL
on:
push:
branches: master
pull_request:
workflow_dispatch:
schedule:
- cron: '0 12 * * *'
jobs:
Analyze:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: java
- name: Autobuild
uses: github/codeql-action/autobuild@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1