Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(workflows): synchronize workflows from GluuFederation/cloud-native-edition #1913

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading