-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update buildless, add action (#45)
- Loading branch information
Showing
22 changed files
with
365 additions
and
88 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,15 @@ | ||
version: 2 | ||
updates: | ||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
target-branch: "main" | ||
schedule: | ||
interval: "weekly" | ||
|
||
# Maintain dependencies for Gradle | ||
- package-ecosystem: "gradle" | ||
directory: "/" | ||
target-branch: "main" | ||
schedule: | ||
interval: "weekly" |
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,3 @@ | ||
license-check: true | ||
vulnerability-check: true | ||
allow-ghsas: [] |
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,89 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
workflow_dispatch: | ||
secrets: | ||
BUILDLESS_APIKEY: | ||
description: "Buildless API Key" | ||
required: true | ||
|
||
workflow_call: | ||
secrets: | ||
BUILDLESS_APIKEY: | ||
description: "Buildless API Key" | ||
required: true | ||
|
||
push: | ||
branches: | ||
- main | ||
|
||
schedule: | ||
- cron: "33 9 * * 0" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
analyze: | ||
name: CodeQL Analysis | ||
continue-on-error: true | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 360 | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1 | ||
with: | ||
disable-sudo: true | ||
egress-policy: block | ||
allowed-endpoints: > | ||
agent.less.build:443 | ||
cli.less.build:443 | ||
dl.less.build:443 | ||
edge.pkg.st:443 | ||
maven.pkg.st:443 | ||
github.com:443 | ||
global.less.build:443 | ||
gradle.pkg.st:443 | ||
jcenter.bintray.com:443 | ||
local.less.build:443 | ||
plugins-artifacts.gradle.org:443 | ||
plugins.gradle.org:443 | ||
repo.maven.apache.org:443 | ||
scans-in.gradle.com:443 | ||
api.github.com:443 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Configure JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 21 | ||
- name: Setup Buildless | ||
uses: buildless/setup@v1.0.2 | ||
with: | ||
agent: ${{ secrets.BUILDLESS_APIKEY != '' }} | ||
- name: "Setup: Initialize CodeQL" | ||
uses: github/codeql-action/init@407ffafae6a767df3e0230c3df91b6443ae8df75 # v2 | ||
with: | ||
languages: java | ||
- name: "Build" | ||
uses: gradle/gradle-build-action@v2.10.0 | ||
id: gradlebuild | ||
continue-on-error: true | ||
with: | ||
cache-read-only: true | ||
arguments: build -x test -x check | ||
gradle-home-cache-includes: | | ||
caches | ||
notifications | ||
jdks | ||
wrapper | ||
- name: "Analsis: CodeQL" | ||
uses: github/codeql-action/analyze@407ffafae6a767df3e0230c3df91b6443ae8df75 # v2 | ||
continue-on-error: true | ||
with: | ||
category: "/language:java" |
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,34 @@ | ||
name: "Dependency check" | ||
|
||
on: | ||
workflow_dispatch: {} | ||
workflow_call: {} | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
dependency-check: | ||
name: Dependency check | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'pull_request' | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1 | ||
with: | ||
disable-sudo: true | ||
egress-policy: block | ||
allowed-endpoints: > | ||
api.github.com:443 | ||
github.com:443 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Check Dependencies | ||
uses: actions/dependency-review-action@v3 | ||
continue-on-error: true | ||
with: | ||
config-file: "./.github/dependency-review-config.yml" |
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 |
---|---|---|
@@ -1,29 +1,89 @@ | ||
name: Build and test | ||
on: [push, pull_request, workflow_dispatch] | ||
env: | ||
GRADLE_CACHE_USERNAME: apikey | ||
GRADLE_CACHE_PUSH: true | ||
GRADLE_CACHE_LOCAL: false | ||
GRADLE_CACHE_REMOTE: true | ||
BUILDLESS_APIKEY: ${{ secrets.BUILDLESS_APIKEY }} | ||
name: CI | ||
|
||
on: | ||
merge_group: {} | ||
workflow_dispatch: | ||
inputs: | ||
enableAgent: | ||
type: boolean | ||
description: "Buildless Agent" | ||
default: false | ||
|
||
push: | ||
branches: | ||
- main | ||
|
||
pull_request: {} | ||
|
||
jobs: | ||
build: | ||
name: Build and test | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
services: | ||
postgres: | ||
image: postgres:13 | ||
env: | ||
POSTGRES_PASSWORD: mysecretpassword | ||
ports: | ||
- 5432:5432 | ||
mysql: | ||
image: mysql:8.0.31 | ||
env: | ||
MYSQL_ROOT_PASSWORD: my-secret-pw | ||
ports: | ||
- 3306:3306 | ||
|
||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1 | ||
with: | ||
disable-sudo: true | ||
egress-policy: block | ||
allowed-endpoints: > | ||
agent.less.build:443 | ||
cli.less.build:443 | ||
dl.less.build:443 | ||
edge.pkg.st:443 | ||
github.com:443 | ||
global.less.build:443 | ||
gradle.pkg.st:443 | ||
maven.pkg.st:443 | ||
jcenter.bintray.com:443 | ||
local.less.build:443 | ||
plugins-artifacts.gradle.org:443 | ||
plugins.gradle.org:443 | ||
repo.maven.apache.org:443 | ||
scans-in.gradle.com:443 | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
- name: Configure JDK | ||
uses: actions/setup-java@v3 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 19 | ||
- name: Setup PostgreSQL | ||
run: sudo postgres/setup.sh | ||
- name: Setup MySQL | ||
run: sudo mysql/setup.sh | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
java-version: 21 | ||
- name: Setup Buildless | ||
uses: buildless/setup@v1.0.2 | ||
with: | ||
agent: ${{ secrets.BUILDLESS_APIKEY != '' }} | ||
- name: Gradle check | ||
run: ./gradlew check --scan | ||
uses: gradle/gradle-build-action@v2.10.0 | ||
with: | ||
arguments: check --scan | ||
cache-read-only: false | ||
gradle-home-cache-cleanup: true | ||
gradle-home-cache-includes: | | ||
caches | ||
notifications | ||
jdks | ||
wrapper | ||
codeql-check: | ||
name: Checks | ||
uses: "./.github/workflows/check.codeql.yml" | ||
secrets: | ||
BUILDLESS_APIKEY: ${{ secrets.BUILDLESS_APIKEY }} | ||
|
||
dependency-check: | ||
name: Checks | ||
uses: "./.github/workflows/check.deps.yml" | ||
secrets: inherit |
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 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 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 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
Oops, something went wrong.