Skip to content

Commit a63a444

Browse files
sgammonmelodicore
authored andcommitted
chore: initial ci jobs
chore: add build job chore: add pr job hook chore: add push job hook Signed-off-by: Sam Gammon <sam@elide.dev>
1 parent ae568c7 commit a63a444

File tree

3 files changed

+86
-0
lines changed

3 files changed

+86
-0
lines changed

.github/workflows/job.build.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: "Build"
2+
3+
"on":
4+
workflow_call:
5+
inputs:
6+
runner:
7+
description: "Runner"
8+
required: false
9+
type: string
10+
default: "ubuntu-latest"
11+
workflow_dispatch:
12+
inputs:
13+
runner:
14+
description: "Runner"
15+
required: false
16+
type: string
17+
default: "ubuntu-latest"
18+
19+
permissions:
20+
contents: "read"
21+
22+
jobs:
23+
build:
24+
name: "Maven Plugin"
25+
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
26+
permissions:
27+
contents: "read"
28+
steps:
29+
- name: "Setup: Harden Runner"
30+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
31+
with:
32+
disable-sudo: true
33+
egress-policy: audit
34+
- name: "Setup: Checkout"
35+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
36+
with:
37+
fetch-depth: 1
38+
persist-credentials: false
39+
- name: "Setup: JDK"
40+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
41+
with:
42+
distribution: graalvm
43+
java-version: "24"
44+
- name: "Setup: Elide"
45+
uses: elide-dev/setup-elide@990b915b2974a70e7654acb1303607b4cd1d3538 # v2.0.0
46+
- name: "Build: Plugin"
47+
run: ./gradlew build publishToMavenLocal
48+
- name: "Test: Plugin"
49+
working-directory: sample
50+
run: ./mvnw clean package

.github/workflows/on.pr.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: "PR"
2+
3+
"on":
4+
pull_request: {}
5+
6+
permissions:
7+
contents: "read"
8+
9+
jobs:
10+
build:
11+
name: "Build"
12+
uses: ./.github/workflows/job.build.yml
13+
secrets: inherit
14+
permissions:
15+
contents: "read"
16+
with:
17+
runner: "ubuntu-latest"

.github/workflows/on.push.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: "CI"
2+
3+
"on":
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: "read"
10+
11+
jobs:
12+
build:
13+
name: "Build"
14+
uses: ./.github/workflows/job.build.yml
15+
secrets: inherit
16+
permissions:
17+
contents: "read"
18+
with:
19+
runner: "ubuntu-latest"

0 commit comments

Comments
 (0)