Skip to content

Commit d4bd8ed

Browse files
authored
feat: Create gradle.ymlπŸ«ΈπŸŒ€βœοΈπŸ“—πŸ§πŸ³β¬†
feat: Create gradle.ymlπŸ«ΈπŸŒ€βœοΈπŸ“—πŸ§πŸ³β¬†
1 parent 030c59b commit d4bd8ed

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

β€Ž.github/workflows/gradle.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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: [ "main" ]
13+
pull_request:
14+
branches: [ "main" ]
15+
16+
jobs:
17+
build:
18+
19+
runs-on: ubuntu-latest
20+
permissions:
21+
contents: read
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
- name: Set up JDK 21
26+
uses: actions/setup-java@v4
27+
with:
28+
java-version: '21'
29+
distribution: 'temurin'
30+
31+
- name: Setup Testcontainers Cloud Client
32+
uses: atomicjar/testcontainers-cloud-setup-action@v1
33+
with:
34+
token: ${{ secrets.TC_CLOUD_TOKEN }}
35+
36+
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
37+
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
38+
- name: Setup Gradle
39+
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
40+
41+
- name: Build with Gradle Wrapper
42+
run: ./gradlew build
43+
44+
# NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html).
45+
# If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version.
46+
#
47+
# - name: Setup Gradle
48+
# uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
49+
# with:
50+
# gradle-version: '8.9'
51+
#
52+
# - name: Build with Gradle 8.9
53+
# run: gradle build
54+
55+
dependency-submission:
56+
57+
runs-on: ubuntu-latest
58+
permissions:
59+
contents: write
60+
61+
steps:
62+
- uses: actions/checkout@v4
63+
- name: Set up JDK 21
64+
uses: actions/setup-java@v4
65+
with:
66+
java-version: '21'
67+
distribution: 'temurin'
68+
69+
# Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies.
70+
# See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md
71+
- name: Generate and submit dependency graph
72+
uses: gradle/actions/dependency-submission@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0

0 commit comments

Comments
Β (0)