From c772fc9527773ee880741f6200f4b2e67d43feec Mon Sep 17 00:00:00 2001 From: whyour Date: Thu, 11 Dec 2025 01:52:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=84=9A=E6=9C=AC=E8=B0=83?= =?UTF-8?q?=E8=AF=95=E4=BF=9D=E5=AD=98=E6=96=87=E4=BB=B6=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-docker-image.yml | 2 +- back/api/script.ts | 1 + src/pages/script/saveModal.tsx | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index 43bab0db..8302a049 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -164,7 +164,7 @@ jobs: flavor: | latest=false tags: | - type=ref,event=branch,enable=${{ github.ref != format('refs/heads/{0}', 'master') }} + type=ref,event=branch,enable=${{ github.ref == format('refs/heads/{0}', 'develop') }} type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }} type=raw,value=${{ steps.version.outputs.version }},enable=${{ github.ref == format('refs/heads/{0}', 'master') }} type=semver,pattern={{version}} diff --git a/back/api/script.ts b/back/api/script.ts index 9ad9beb4..a4f9ee78 100644 --- a/back/api/script.ts +++ b/back/api/script.ts @@ -176,6 +176,7 @@ export default (app: Router) => { path, `${originFilename.replace(/\//g, '')}`, ); + await fs.mkdir(path, { recursive: true }); const filePath = join(path, `${filename.replace(/\//g, '')}`); const fileExists = await fileExist(filePath); if (fileExists) { diff --git a/src/pages/script/saveModal.tsx b/src/pages/script/saveModal.tsx index 8ca0f029..42ce5363 100644 --- a/src/pages/script/saveModal.tsx +++ b/src/pages/script/saveModal.tsx @@ -16,7 +16,7 @@ const SaveModal = ({ const handleOk = async (values: any) => { setLoading(true); - const payload = { ...file, ...values, originFilename: file.title }; + const payload = { ...values, originFilename: file.title, content: file.content }; request .post(`${config.apiPrefix}scripts`, payload) .then(({ code, data }) => {