Skip to content

Commit 1a41fc8

Browse files
tj-wazeiAlathreonsurajkumar
authored
Merge to master (#20)
* Update README.md * Improve GHA and usual repository boilerplate (#12) Refactoring GHA for code quality * Repository cleanup (#19) * Delete unnecessary files * Setup multi modular gradle project properly * Rename GUILD.md to README.md * Run Spotless on all files * Update Spring plugin to latest for Java 21 support * Create pre-commit.yaml GHA * Use .yaml for Spring properties * Packaged JShellWrapper * Add docker-compose.yaml * Update README.md --------- Co-authored-by: Alathreon <[email protected]> Co-authored-by: Suraj Kumar <[email protected]> Co-authored-by: Suraj Kumar <[email protected]>
1 parent dfd06a1 commit 1a41fc8

File tree

74 files changed

+903
-1101
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+903
-1101
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text eol=lf

.github/dependabot.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "gradle"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/pull_request_template.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[contributing]: https://github.com/Together-Java/TJ-Bot/wiki/Contributing
2+
[code_guidelines]: https://github.com/Together-Java/TJ-Bot/wiki/Code-Guidelines
3+
[new_issue]: https://github.com/Together-Java/TJ-Bot/issues/new/choose
4+
5+
## Pull-request
6+
7+
- [ ] I have read the [contributing guidelines][contributing].
8+
- [ ] I have read the [code guidelines][code_guidelines].
9+
- [ ] I have created a relating [issue][new_issue].
10+
11+
### Changes
12+
13+
- [ ] Existing code
14+
- [ ] New feature
15+
16+
<!--
17+
While an issue isn't required, this is preferred for most changes.
18+
It helps make it maintainable for us, and will save you from possibly recoding everything :p
19+
If there's no relating issue, keep it NaN
20+
-->
21+
22+
Closes Issue: NaN
23+
24+
## Description
25+
26+
Replace this sentence with general description of what your Pull Request does.

.github/workflows/docker-publish.yaml

+14-19
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,28 @@ name: Docker Publish
22

33
on:
44
push:
5-
branches:
6-
- 'master'
7-
- 'feature/cicd-workflows'
8-
9-
env:
10-
JAVA_VERSION: 19
5+
branches: [ master ]
6+
workflow_dispatch:
117

128
jobs:
139
docker:
1410
runs-on: ubuntu-latest
1511
steps:
16-
- name: Set up JDK
17-
uses: actions/setup-java@v1
18-
with:
19-
java-version: ${{ env.JAVA_VERSION }}
20-
- name: Extract branch name
21-
shell: bash
22-
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
23-
id: extract_branch
24-
- uses: actions/checkout@v2
12+
- name: Check out code
13+
uses: actions/checkout@v4
14+
15+
- name: Install Java
16+
uses: actions/setup-java@v3
2517
with:
26-
fetch-depth: 0
27-
- name: Build and Publish Docker Image
18+
java-version: '21'
19+
distribution: 'corretto'
20+
21+
- name: Build Docker image and publish
2822
env:
2923
ORG_REGISTRY_USER: ${{ secrets.ORG_REGISTRY_USER }}
3024
ORG_REGISTRY_PASSWORD: ${{ secrets.ORG_REGISTRY_PASSWORD }}
31-
BRANCH_NAME: ${{ steps.extract_branch.outputs.branch }}
25+
BRANCH_NAME: ${{ github.ref_name }}
3226
run: ./gradlew jib
33-
- name: Re-Deploy
27+
28+
- name: Trigger deployment
3429
run: "curl -H 'Authorization: Bearer ${{ secrets.ORG_WATCHTOWER_TOKEN }}' https://togetherjava.org:5003/v1/update"

.github/workflows/docker-verify.yaml

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
name: Docker Verify
2-
3-
on: [pull_request]
4-
5-
env:
6-
JAVA_VERSION: 19
2+
on:
3+
pull_request:
4+
workflow_dispatch:
75

86
jobs:
97
docker:
108
name: Docker Verify
119
runs-on: ubuntu-latest
1210
steps:
13-
- name: Set up JDK
14-
uses: actions/setup-java@v1
15-
with:
16-
java-version: ${{ env.JAVA_VERSION }}
17-
- uses: actions/checkout@v2
11+
- name: Check out code
12+
uses: actions/checkout@v4
13+
14+
- name: Install Java
15+
uses: actions/setup-java@v3
1816
with:
19-
fetch-depth: 0
20-
- name: Docker Verify
17+
java-version: 21
18+
distribution: 'corretto'
19+
20+
- name: Build Docker image
2121
run: ./gradlew jibDockerBuild

.github/workflows/pre-commit.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: pre-commit
2+
on:
3+
pull_request:
4+
workflow_dispatch:
5+
6+
jobs:
7+
pre-commit:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
12+
- uses: actions/setup-java@v3
13+
with:
14+
java-version: '21'
15+
distribution: 'corretto'
16+
17+
- uses: gradle/gradle-build-action@v3
18+
with:
19+
gradle-version: 8.7
20+
21+
- name: Build with Gradle
22+
run: gradle build

.github/workflows/releases.yaml

+10-11
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,27 @@ defaults:
99
run:
1010
shell: bash
1111

12-
env:
13-
JAVA_VERSION: 19
14-
1512
jobs:
1613

1714
release:
1815
name: Build and release
1916
runs-on: ubuntu-latest
2017
steps:
21-
- name: Set up JDK
22-
uses: actions/setup-java@v1
23-
with:
24-
java-version: ${{ env.JAVA_VERSION }}
18+
- name: Check out code
19+
uses: actions/checkout@v4
2520

26-
- uses: actions/checkout@v2
21+
- name: Install Java
22+
uses: actions/setup-java@v3
23+
with:
24+
java-version: 21
25+
distribution: 'corretto'
2726

28-
- name: Build shadow jar
27+
- name: Generate FAT Jar
2928
run: ./gradlew shadowJar
3029

3130
- name: Create release
32-
uses: softprops/action-gh-release@v1
31+
uses: softprops/action-gh-release@v2
3332
env:
3433
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3534
with:
36-
files: app/build/libs/TJ-Plays.jar
35+
files: app/build/libs/TJ-JShell-Backend.jar

BuildImage.bat

-2
This file was deleted.

BuildImage.sh

-3
This file was deleted.

BuildJShellWrapper.bat

-6
This file was deleted.

BuildJShellWrapper.sh

-8
This file was deleted.

Dockerfile

-3
This file was deleted.

Insomnia_2023-01-09.json

-1
This file was deleted.

0 commit comments

Comments
 (0)