-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0f26612
Showing
24 changed files
with
1,112 additions
and
0 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,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
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,9 @@ | ||
<!-- workflow comment --> | ||
|
||
## 🔴 Failed to build artifacts! | ||
Please check the logs below for issues. | ||
|
||
| Name | Link | | ||
|--------| -------------------------------- | | ||
| Commit | {{ .commit }} | | ||
| Logs | {{ .logs | mdlink "View logs" }} | |
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,11 @@ | ||
<!-- workflow comment --> | ||
|
||
## 🟢 Successfully built artifacts! | ||
|
||
File expires: `{{ .expire | date "01 Sep 2006 20:00:00" }}` | ||
|
||
| Name | Link | | ||
|----------|------------------------| | ||
| Commit | {{ .commit }} | | ||
| Logs | {{ .logs | "View logs" }} | | ||
| Download | {{ .download | mdlink "Download" }} | |
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 @@ | ||
<!-- workflow comment --> | ||
|
||
## 🟠 Running workflows for Pull Request... |
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,121 @@ | ||
name: Build and Comment on Pull Request | ||
|
||
on: | ||
pull_request_target: | ||
types: [opened, reopened, synchronize] | ||
branches: | ||
- '*' | ||
paths-ignore: | ||
- 'README' | ||
- 'README.md' | ||
- 'LICENSE' | ||
- 'LICENSE.md' | ||
|
||
concurrency: | ||
group: '${{ github.workflow }}-${{ github.head_ref }}' | ||
cancel-in-progress: false | ||
|
||
permissions: | ||
issues: write | ||
pull-requests: write | ||
|
||
jobs: | ||
build-and-comment: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
comment_id: ${{ steps.comment.outputs.comment-id }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: refs/pull/${{ github.event.pull_request.number }}/merge | ||
|
||
- name: Find comment | ||
uses: peter-evans/find-comment@v2 | ||
id: find-comment | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
comment-author: 'github-actions[bot]' | ||
body-includes: '<!-- workflow comment -->' | ||
|
||
- name: Post/Update comment | ||
uses: peter-evans/create-or-update-comment@v3 | ||
id: comment | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
comment-id: ${{ steps.find-comment.outputs.comment-id }} | ||
edit-mode: replace | ||
body-path: '.github/assets/build-pr.md' | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 21 | ||
distribution: 'temurin' | ||
|
||
- name: Grant execute permissions for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew build --no-daemon | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: build | ||
path: | | ||
build/libs/*.jar | ||
versions/*/build/libs/*.jar | ||
if-no-files-found: error | ||
|
||
- name: Render Markdown Template | ||
id: render | ||
uses: chuhlomin/[email protected] | ||
env: | ||
JOB_PATH: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ env.PREVIOUS_JOB_ID }}" | ||
ARTIFACT_URL: "${{ github.server_url }}/${{ github.repository }}/suites/${{ env.SUITE_ID }}/artifacts/${{ env.ARTIFACT_ID }}" | ||
ARTIFACT_EXPIRE_DATE: "${{ env.ARTIFACT_EXPIRE_DATE }}" | ||
HEAD_SHA: "${{ env.HEAD_SHA }}" | ||
with: | ||
template: './.github/assets/build-pr-success.md' | ||
vars: | | ||
commit: ${{ env.HEAD_SHA }} | ||
logs: ${{ env.JOB_PATH }} | ||
download: ${{ env.ARTIFACT_URL }} | ||
expire: ${{ env.ARTIFACT_EXPIRE_DATE }} | ||
- name: Post/Update comment | ||
uses: peter-evans/create-or-update-comment@v3 | ||
id: comment | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
comment-id: ${{ steps.find-comment.outputs.comment-id }} | ||
edit-mode: replace | ||
body: ${{ steps.template.outputs.result }} | ||
|
||
comment-if-failed: | ||
needs: [build-and-comment] | ||
if: failure() | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: refs/pull/${{ github.event.pull_request.number }}/merge | ||
|
||
- name: Render Markdown template | ||
id: render | ||
uses: chuhlomin/render-template@b7365ae850d49de8fbbc9af02f333f0150bdcc59 | ||
with: | ||
template: './.github/assets/pr-comments/failed.md' | ||
vars: | | ||
commit: ${{ github.event.pull_request.head.sha }} | ||
logs: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
- name: Update comment (Failure) | ||
uses: peter-evans/create-or-update-comment@v3 | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
comment-id: ${{ needs.build-and-comment.outputs.comment_id }} | ||
edit-mode: replace | ||
body: ${{ steps.render.outputs.result }} |
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,50 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
paths-ignore: | ||
- 'README' | ||
- 'README.md' | ||
- 'LICENSE' | ||
- 'LICENSE.md' | ||
pull_request: | ||
branches: | ||
- '*' | ||
paths-ignore: | ||
- 'README' | ||
- 'README.md' | ||
- 'LICENSE' | ||
- 'LICENSE.md' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
name: Build and test with gradle | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 21 | ||
distribution: 'temurin' | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew build --no-daemon | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: build | ||
path: | | ||
build/libs/*.jar | ||
versions/*/build/libs/*.jar | ||
if-no-files-found: error |
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 @@ | ||
## Eclipse ## | ||
eclipse | ||
bin | ||
*.launch | ||
.settings | ||
.metadata | ||
.classpath | ||
.project | ||
|
||
## IntelliJ IDEA ## | ||
out | ||
classes | ||
*.ipr | ||
*.iws | ||
*.iml | ||
/.idea/* | ||
!/.idea/gradle.xml | ||
|
||
## Netbeans ## | ||
.nb-gradle | ||
.nb-gradle-properties | ||
|
||
## VSCode ## | ||
.vscode | ||
|
||
## Gradle ## | ||
build | ||
.gradle | ||
|
||
## Other ## | ||
.kotlin | ||
run | ||
.DS_Store | ||
Thumbs.db |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.