Skip to content

Commit

Permalink
Add Actions for TLR repository
Browse files Browse the repository at this point in the history
  • Loading branch information
dfuchss committed Feb 14, 2024
1 parent 93e53a8 commit e1f9756
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Maven Deploy

on:
push:
branches:
- 'main' # Build the latest develop-SNAPSHOT
paths:
- '**/src/**'
- '**/pom.xml'
- 'pom.xml'

# Publish `v1.2.3` tags as releases.
tags:
- v*

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
publish:
uses: ardoco/actions/.github/workflows/maven.yml@main
with:
deploy: true
with-submodules: true
runs-on: self-hosted
secrets:
OSSRH_USER: ${{secrets.OSSRH_USER}}
OSSRH_TOKEN: ${{secrets.OSSRH_TOKEN}}
GPG_KEY: ${{secrets.GPG_KEY}}

32 changes: 32 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Format

on:
pull_request:
branches: [ main ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
format:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- uses: joshlong/java-version-export-github-action@v28
id: jve
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ steps.jve.outputs.java_major_version }}
cache: 'maven'
- name: Format with Spotless in Maven
run: mvn -B spotless:apply --file pom.xml
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply formatting changes
22 changes: 22 additions & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Sonar Cloud

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
sonarcloud:
if: ${{ github.actor != 'dependabot[bot]' }}
uses: ardoco/actions/.github/workflows/sonarcloud.yml@main
with:
with-submodules: true
runs-on: self-hosted
secrets:
SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}

26 changes: 26 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Maven Verify

on:
push: # Ignore releases and main dev branch
tags-ignore:
- 'v*'
branches-ignore:
- 'main'
pull_request:
types: [opened, synchronize, reopened]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
verify:
uses: ardoco/actions/.github/workflows/maven.yml@main
with:
deploy: false
with-submodules: true
runs-on: self-hosted
secrets:
OSSRH_USER: ""
OSSRH_TOKEN: ""
GPG_KEY: ""

0 comments on commit e1f9756

Please sign in to comment.