Skip to content

Commit

Permalink
Merge pull request #18 from JanssenProject/repo_sync
Browse files Browse the repository at this point in the history
ci(workflows): synchronize workflows from JanssenProject/jans-cloud-native
  • Loading branch information
moabu authored Jul 5, 2021
2 parents 776bbac + df16e84 commit b276917
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 31 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/central_code_quality_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:

- name: Set up JDK 11
if: contains(env.JVM_PROJECTS, github.repository)
uses: actions/setup-java@v2
uses: actions/setup-java@v2.1.0
with:
java-version: '11'
distribution: 'adopt'
Expand Down Expand Up @@ -82,15 +82,15 @@ jobs:
- name: Cache SonarCloud packages for JVM based project
if: contains(env.JVM_PROJECTS, github.repository)
uses: actions/cache@v1
uses: actions/cache@v2.1.6
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: Cache Maven packages
if: contains(env.JVM_PROJECTS, github.repository)
uses: actions/cache@v1
uses: actions/cache@v2.1.6
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
Expand Down
31 changes: 3 additions & 28 deletions .github/workflows/commit-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
pull_request_target:
types:
- opened
- edited
- reopened
- synchronize
push:
Expand All @@ -25,7 +27,7 @@ jobs:
# We need to fetch with a depth of 2 for pull_request so we can do HEAD^2
fetch-depth: 2

- uses: actions/setup-node@v1
- uses: actions/setup-node@v2.2.0
with:
node-version: 14
- run: |
Expand All @@ -52,26 +54,6 @@ jobs:
git log --format=%B -n 1 HEAD^2 | npx commitlint
continue-on-error: true


# - name: Check Line Length
# id: linelength
# uses: gsactions/commit-message-checker@v1
# continue-on-error: true
# with:
# pattern: '^.{1,50}$'
# error: 'The maximum line length of 50 characters is exceeded.'
# excludeDescription: 'true' # optional: this excludes the description body of a pull request
# excludeTitle: 'true' # optional: this excludes the title of a pull request
# checkAllCommitMessages: 'true' # optional: this checks all commits associated with a pull request
# accessToken: ${{ secrets.GITHUB_TOKEN }} # github access token is only required if checkAllCommitMessages is true

# - name: Check for Resolves / Fixes
# uses: gsactions/commit-message-checker@v1
# with:
# pattern: '^.+(Resolves|Fixes): \#[0-9]+$'
# error: 'You need at least one "Resolves|Fixes: #<issue number>" line.'


- name: "[Push] Report Commit Standard Status"
if: steps.push_get_commit_message.outcome != 'success' && github.event_name == 'push'
run: |
Expand All @@ -83,11 +65,4 @@ jobs:
run: |
curl -X POST -H 'Content-Type: application/json' --data '{"alias":"Mo-Auto","emoji":":robot:","text":":x: :cry: I am reporting a bad [commit](https://github.com/${{github.repository}}/tree/${{github.head_ref}}) by :thinking_face: @${{github.actor}} :x:","attachments":[{"title":"GitHub user behavior reporter","title_link":"https://www.conventionalcommits.org","text":"We are not too happy with your last commit merging into https://github.com/${{github.repository}}/tree/${{github.base_ref}}. Here is why : ${{ steps.pr_get_commit_message.outputs.errormsg }}","color":"#764FA5"}]}' ${{ secrets.GITHUBUSERBEHAVIORROCKETCHATREPORTER }}
exit 1
# - name: Check Commit length
# if: steps.linelength.outcome != 'success'
# run: |
# curl -X POST -H 'Content-Type: application/json' --data '{"alias":"Mo-Auto","emoji":":robot:","text":":x: :cry: I am reporting a bad [commit](https://github.com/${{github.repository}}/commit/${{github.sha}}) :thinking_face: by @${{github.actor}} :x:","attachments":[{"title":"GitHub user behavior reporter","title_link":"https://www.conventionalcommits.org","text":"We are not too happy with your last [commit](https://github.com/${{github.repository}}/commit/${{github.sha}}). Limit your commits to <50 chars. Place additional information in the description body of the commit.","color":"#764FA5"}]}' ${{ secrets.GITHUBUSERBEHAVIORROCKETCHATREPORTER }}
# echo "The maximum line length of 100 characters is exceeded."
# exit 1

0 comments on commit b276917

Please sign in to comment.