Skip to content

Commit

Permalink
ci(workflows): sync central workflows
Browse files Browse the repository at this point in the history
Signed-off-by: mo-auto <54212639+mo-auto@users.noreply.github.com>
  • Loading branch information
mo-auto committed Jul 15, 2024
1 parent 606c6d6 commit a8cd2d4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/central_code_quality_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ on:
branches:
- master
- main
- "4.5"
pull_request:
branches:
- master
- main
- "4.5"
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -31,20 +34,20 @@ jobs:
GluuFederation/gluu-admin-ui
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of sonarqube analysis

- name: Set up JDK 11
if: contains(env.JVM_PROJECTS, github.repository)
uses: actions/setup-java@v3.3.0
uses: actions/setup-java@v4.0.0
with:
java-version: '11'
java-version: 11
distribution: 'adopt'

- name: Cache SonarCloud packages for JVM based project
if: contains(env.JVM_PROJECTS, github.repository)
uses: actions/cache@v3.0.2
uses: actions/cache@v4.0.2
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/commit-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,18 @@ jobs:
check-commit-message:
name: Check Commit Message
runs-on: ubuntu-latest

steps:
- name: Checkout Project
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
# 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@v3.1.1
- uses: actions/setup-node@v4.0.3
with:
node-version: 14

- run: |
npm install --save-dev @commitlint/{config-conventional,cli}
echo "module.exports = {extends: ['@commitlint/config-conventional']};" > commitlint.config.js
Expand Down Expand Up @@ -73,7 +75,6 @@ jobs:
# 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,7 +84,7 @@ jobs:
- name: "[Pull Request] Report Commit Standard Status"
if: steps.pr_get_commit_message.outcome != 'success' && github.event_name == 'pull_request'
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 }}
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
Expand Down

0 comments on commit a8cd2d4

Please sign in to comment.