Skip to content

Commit 64b2d0d

Browse files
authored
Create gradle.yml
1 parent 0726330 commit 64b2d0d

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

Diff for: .github/workflows/gradle.yml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
6+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
7+
8+
name: Java CI with Gradle
9+
10+
on:
11+
push:
12+
branches: [ "master" ]
13+
pull_request:
14+
branches: [ "master" ]
15+
jobs:
16+
build:
17+
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Set up JDK 17
25+
uses: actions/setup-java@v4
26+
with:
27+
java-version: '17'
28+
distribution: 'temurin'
29+
30+
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
31+
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
32+
- name: Setup Gradle
33+
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
34+
35+
- name: Build with Gradle Wrapper
36+
run: ./gradlew build
37+
38+
# NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html).
39+
# If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version.
40+
#
41+
# - name: Setup Gradle
42+
# uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
43+
# with:
44+
# gradle-version: '8.9'
45+
#
46+
# - name: Build with Gradle 8.9
47+
# run: gradle build
48+
49+
dependency-submission:
50+
51+
runs-on: ubuntu-latest
52+
permissions:
53+
contents: write
54+
55+
steps:
56+
- uses: actions/checkout@v4
57+
- name: Set up JDK 17
58+
uses: actions/setup-java@v4
59+
with:
60+
java-version: '17'
61+
distribution: 'temurin'
62+
63+
# Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies.
64+
# See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md
65+
- name: Generate and submit dependency graph
66+
uses: gradle/actions/dependency-submission@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0

0 commit comments

Comments
 (0)