mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
ci: simplify workflows (#9737)
This commit is contained in:
22
.github/workflows/lint-commit-message.yml
vendored
22
.github/workflows/lint-commit-message.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Lint commit message
|
||||
name: Lint Commit Message
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
@@ -8,12 +8,6 @@ jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: ['16']
|
||||
include:
|
||||
- node-version: '16'
|
||||
node-name: 'Latest'
|
||||
outputs:
|
||||
failed: ${{ steps.lint_commit.outputs.failed == 'true' }}
|
||||
env:
|
||||
@@ -21,17 +15,14 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Add dev branch
|
||||
run: git branch dev origin/dev
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
node-version: 16
|
||||
|
||||
- name: Cache ~/.pnpm-store
|
||||
uses: actions/cache@v3
|
||||
@@ -47,25 +38,32 @@ jobs:
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm i --frozen-lockfile
|
||||
|
||||
- name: Lint commit
|
||||
id: lint_commit
|
||||
run: pnpm lint:commit || echo "::set-output name=failed::true"
|
||||
|
||||
- name: Set success result
|
||||
if: ${{ steps.lint_commit.outputs.failed != 'true' }}
|
||||
run: echo 'true' > ./lint-result.txt
|
||||
|
||||
- name: Set failed result
|
||||
if: ${{ steps.lint_commit.outputs.failed == 'true' }}
|
||||
run: echo 'false' > ./lint-result.txt
|
||||
|
||||
- name: Set PR number
|
||||
run: echo $PULL_REQUEST_NUMBER > pr.txt
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: commit-lint-report
|
||||
path: ./commit-lint.txt
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: commit-lint-result
|
||||
path: ./lint-result.txt
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: pr-number
|
||||
|
||||
Reference in New Issue
Block a user