XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
返回提交历史

XFEstudio/gpt4free

Update copilot.yml

af02712f
H Lohaus <hlohaus@users.noreply.github.com>
提交于

代码差异

1 个文件 +5 -2
Modified .github/workflows/copilot.yml +5 -2
@@ -16,9 +16,12 @@ jobs:
16 16 - name: Checkout Repo
17 17 uses: actions/checkout@v3
18 18 - name: 'Download artifact'
19 id: "download"
19 20 uses: actions/github-script@v6
20 21 with:
21 22 script: |
23 import * as core from '@actions/core';
24
22 25 let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
23 26 owner: context.repo.owner,
24 27 repo: context.repo.repo,
@@ -28,6 +31,7 @@ jobs:
28 31 return artifact.name == "pr_number"
29 32 })[0];
30 33 if (matchArtifact) {
34 core.setOutput("hasArtifact", "true");
31 35 let download = await github.rest.actions.downloadArtifact({
32 36 owner: context.repo.owner,
33 37 repo: context.repo.repo,
@@ -36,10 +40,9 @@ jobs:
36 40 });
37 41 let fs = require('fs');
38 42 fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/pr_number.zip`, Buffer.from(download.data));
39 } else {
40 throw new Error('No artifact found with name "pr_number"');
41 43 }
42 44 - name: 'Unzip artifact'
45 if: ${{ download.outputs.hasArtifact == 'true' }}
43 46 run: unzip pr_number.zip
44 47 - name: Setup Python
45 48 uses: actions/setup-python@v4