-
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.
Merge pull request #2 from wuespace/feat/new-template-structure
feat: New template structure
- Loading branch information
Showing
26 changed files
with
675 additions
and
437 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,20 @@ | ||
# root editor configuration file | ||
# https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# these configuration apply to all files in this project | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
charset = utf-8 | ||
indent_style = tab | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.yml] | ||
indent_style = space | ||
indent_size = 2 |
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 @@ | ||
# only edit text files | ||
* text=auto | ||
# don't use CRLF line endings | ||
*.* text eol=lf | ||
|
||
# binaries | ||
*.png binary | ||
*.jpg binary | ||
*.jpeg binary | ||
*.gif binary | ||
*.ico binary |
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,15 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: 'github-actions' # See documentation for possible values | ||
directory: '/' # Location of package manifests | ||
schedule: | ||
interval: 'daily' | ||
open-pull-requests-limit: 10 | ||
commit-message: | ||
prefix: 'chore' | ||
include: 'scope' |
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,94 @@ | ||
name: Publish Docker Image | ||
|
||
# Events that trigger this workflow | ||
on: | ||
workflow_run: | ||
workflows: ["Release"] | ||
types: [completed] | ||
|
||
jobs: | ||
push-to-registry: | ||
name: Build and push Docker image to GitHub Container Registry | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
defaults: | ||
run: | ||
working-directory: ./application | ||
steps: | ||
- name: Checkout 📥 | ||
uses: actions/checkout@v2.3.4 | ||
- name: Set up JDK 16 💿 | ||
uses: actions/setup-java@v2.0.0 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '16' | ||
java-package: jdk | ||
- name: Set up Docker Buildx ⬆ | ||
uses: docker/setup-buildx-action@v1.1.2 | ||
|
||
- name: Restore cache release upload URL ♻️ | ||
uses: actions/cache@v2.1.5 | ||
with: | ||
path: ~/.build-env | ||
key: 'github-release-action' | ||
|
||
- name: Import environment | ||
run: cat ~/.build-env >> $GITHUB_ENV | ||
|
||
- name: Restore gradle cache ♻️ | ||
uses: actions/cache@v2.1.5 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Cache Docker layers ♻️ | ||
uses: actions/cache@v2.1.5 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx- | ||
- name: Build App 🛠️ | ||
run: chmod +x gradlew && ./gradlew assembleDist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# You may need to manage write and read access of GitHub Actions | ||
# for this repository in the container settings. | ||
# | ||
# You can also use a personal access token (PAT) with the appropriate scopes. | ||
# | ||
# Please see: | ||
# https://github.com/marketplace/actions/docker-login#github-container-registry | ||
- name: Login to GitHub Container Registry 🛂 | ||
uses: docker/login-action@v1.8.0 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push docker image 🗜 | ||
uses: docker/build-push-action@v2.4.0 | ||
with: | ||
context: . | ||
pull: true | ||
push: true | ||
platforms: linux/amd64,linux/arm64 | ||
cache-from: type=local,src=/tmp/.buildx-cache | ||
cache-to: type=local,dest=/tmp/.buildx-cache-new | ||
tags: "ghcr.io/${{ github.repository }}:latest" | ||
|
||
# Temporary fix for growing caches | ||
# https://github.com/docker/build-push-action/issues/252 | ||
# https://github.com/moby/buildkit/issues/1896 | ||
# | ||
# Please see: | ||
# https://github.com/docker/build-push-action/blob/master/docs/advanced/cache.md#github-cache | ||
- name: Move cache ♻️ | ||
run: | | ||
rm -rf /tmp/.buildx-cache | ||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache |
This file was deleted.
Oops, something went wrong.
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,45 @@ | ||
name: Release | ||
|
||
# Events that trigger this workflow | ||
on: [workflow_dispatch] | ||
|
||
jobs: | ||
conventional-release: | ||
name: Conventional Commit Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 📥 | ||
uses: actions/checkout@v2.3.4 | ||
|
||
- name: Cache release upload URL ♻️ | ||
uses: actions/cache@v2.1.5 | ||
with: | ||
path: ~/.build-env | ||
key: 'github-release-action' | ||
|
||
- name: Conventional Changelog Action | ||
id: changelog | ||
uses: TriPSs/conventional-changelog-action@v3 | ||
with: | ||
github-token: ${{ secrets.github_token }} | ||
release-count: '0' | ||
- name: Create Release | ||
uses: actions/create-release@v1 | ||
if: ${{ steps.changelog.outputs.skipped == 'false' }} | ||
id: create_release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.github_token }} | ||
with: | ||
tag_name: ${{ steps.changelog.outputs.tag }} | ||
release_name: ${{ steps.changelog.outputs.tag }} | ||
body: ${{ steps.changelog.outputs.clean_changelog }} | ||
|
||
- name: Store upload url 🗜 | ||
run: | | ||
echo "upload_url=${UPLOAD_URL}" >> ~/.build-env | ||
echo "tag=${RELEASE_TAG}" >> ~/.build-env | ||
echo "skipped=${RELEASE_SKIPPED}" >> ~/.build-env | ||
env: | ||
UPLOAD_URL: ${{ steps.create_release.outputs.upload_url }} | ||
RELEASE_TAG: ${{ steps.changelog.outputs.tag }} | ||
RELEASE_SKIPPED: ${{ steps.changelog.outputs.skipped }} |
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,36 @@ | ||
name: Test Core Module | ||
|
||
# Events that trigger this workflow | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
test-core-module: | ||
name: Test Core Module | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./application | ||
steps: | ||
- name: Checkout 📥 | ||
uses: actions/checkout@v2.3.4 | ||
- name: Set up JDK 16 💿 | ||
uses: actions/setup-java@v2.0.0 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '16' | ||
java-package: jdk | ||
|
||
- name: Restore gradle cache ♻️ | ||
uses: actions/cache@v2.1.5 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Test App 🛃 | ||
run: chmod +x gradlew && ./gradlew test | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Oops, something went wrong.