mirror of https://github.com/langgenius/dify.git
ci: update actions version, fix cache (#33950)
This commit is contained in:
parent
fbd558762d
commit
27c4faad4f
|
|
@ -4,10 +4,9 @@ runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Vite+
|
- name: Setup Vite+
|
||||||
uses: voidzero-dev/setup-vp@4a524139920f87f9f7080d3b8545acac019e1852 # v1.0.0
|
uses: voidzero-dev/setup-vp@20553a7a7429c429a74894104a2835d7fed28a72 # v1.3.0
|
||||||
with:
|
with:
|
||||||
node-version-file: web/.nvmrc
|
working-directory: web
|
||||||
|
node-version-file: .nvmrc
|
||||||
cache: true
|
cache: true
|
||||||
cache-dependency-path: web/pnpm-lock.yaml
|
run-install: true
|
||||||
run-install: |
|
|
||||||
cwd: ./web
|
|
||||||
|
|
|
||||||
|
|
@ -84,20 +84,20 @@ jobs:
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
uses: ./.github/actions/setup-web
|
uses: ./.github/actions/setup-web
|
||||||
|
|
||||||
|
- name: Restore ESLint cache
|
||||||
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
|
id: eslint-cache-restore
|
||||||
|
uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||||
|
with:
|
||||||
|
path: web/.eslintcache
|
||||||
|
key: ${{ runner.os }}-web-eslint-${{ hashFiles('web/package.json', 'web/pnpm-lock.yaml', 'web/eslint.config.mjs', 'web/eslint.constants.mjs', 'web/plugins/eslint/**') }}-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-web-eslint-${{ hashFiles('web/package.json', 'web/pnpm-lock.yaml', 'web/eslint.config.mjs', 'web/eslint.constants.mjs', 'web/plugins/eslint/**') }}-
|
||||||
|
|
||||||
- name: Web style check
|
- name: Web style check
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
working-directory: ./web
|
working-directory: ./web
|
||||||
run: |
|
run: vp run lint:ci
|
||||||
vp run lint:ci
|
|
||||||
# pnpm run lint:report
|
|
||||||
# continue-on-error: true
|
|
||||||
|
|
||||||
# - name: Annotate Code
|
|
||||||
# if: steps.changed-files.outputs.any_changed == 'true' && github.event_name == 'pull_request'
|
|
||||||
# uses: DerLev/eslint-annotations@51347b3a0abfb503fc8734d5ae31c4b151297fae
|
|
||||||
# with:
|
|
||||||
# eslint-report: web/eslint_report.json
|
|
||||||
# github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Web tsslint
|
- name: Web tsslint
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
|
|
@ -114,6 +114,13 @@ jobs:
|
||||||
working-directory: ./web
|
working-directory: ./web
|
||||||
run: vp run knip
|
run: vp run knip
|
||||||
|
|
||||||
|
- name: Save ESLint cache
|
||||||
|
if: steps.changed-files.outputs.any_changed == 'true' && success() && steps.eslint-cache-restore.outputs.cache-hit != 'true'
|
||||||
|
uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||||
|
with:
|
||||||
|
path: web/.eslintcache
|
||||||
|
key: ${{ steps.eslint-cache-restore.outputs.cache-primary-key }}
|
||||||
|
|
||||||
superlinter:
|
superlinter:
|
||||||
name: SuperLinter
|
name: SuperLinter
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ jobs:
|
||||||
|
|
||||||
- name: Run Claude Code for Translation Sync
|
- name: Run Claude Code for Translation Sync
|
||||||
if: steps.detect_changes.outputs.CHANGED_FILES != ''
|
if: steps.detect_changes.outputs.CHANGED_FILES != ''
|
||||||
uses: anthropics/claude-code-action@6062f3709600659be5e47fcddf2cf76993c235c2 # v1.0.76
|
uses: anthropics/claude-code-action@ff9acae5886d41a99ed4ec14b7dc147d55834722 # v1.0.77
|
||||||
with:
|
with:
|
||||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
|
||||||
|
|
@ -39,9 +39,9 @@
|
||||||
"i18n:check": "tsx ./scripts/check-i18n.js",
|
"i18n:check": "tsx ./scripts/check-i18n.js",
|
||||||
"knip": "knip",
|
"knip": "knip",
|
||||||
"lint": "eslint --cache --concurrency=auto",
|
"lint": "eslint --cache --concurrency=auto",
|
||||||
"lint:ci": "eslint --cache --concurrency 2",
|
"lint:ci": "eslint --cache --cache-strategy content --concurrency 2",
|
||||||
"lint:fix": "pnpm lint --fix",
|
"lint:fix": "vp run lint --fix",
|
||||||
"lint:quiet": "pnpm lint --quiet",
|
"lint:quiet": "vp run lint --quiet",
|
||||||
"lint:tss": "tsslint --project tsconfig.json",
|
"lint:tss": "tsslint --project tsconfig.json",
|
||||||
"preinstall": "npx only-allow pnpm",
|
"preinstall": "npx only-allow pnpm",
|
||||||
"prepare": "cd ../ && node -e \"if (process.env.NODE_ENV !== 'production'){process.exit(1)} \" || husky ./web/.husky",
|
"prepare": "cd ../ && node -e \"if (process.env.NODE_ENV !== 'production'){process.exit(1)} \" || husky ./web/.husky",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue