@@ -34,27 +34,27 @@ jobs:
3434 var fs = require('fs');
3535 fs.writeFileSync('${{github.workspace}}/previewbuild.zip', Buffer.from(download.data));
3636
37- var contextArtifact = artifacts.data.artifacts.filter((artifact) => {
38- return artifact.name == "context .json"
37+ var prInfoArtifact = artifacts.data.artifacts.filter((artifact) => {
38+ return artifact.name == "pr .json"
3939 })[0];
4040 var download = await github.actions.downloadArtifact({
4141 owner: context.repo.owner,
4242 repo: context.repo.repo,
43- artifact_id: contextArtifact .id,
43+ artifact_id: prInfoArtifact .id,
4444 archive_format: 'zip',
4545 });
4646 var fs = require('fs');
47- fs.writeFileSync('${{github.workspace}}/context .json.zip', Buffer.from(download.data));
47+ fs.writeFileSync('${{github.workspace}}/pr .json.zip', Buffer.from(download.data));
4848 - name : Extract Artifacts
49- run : unzip -d webapp previewbuild.zip && rm previewbuild.zip && unzip context .json && rm context .json.zip
50- - name : ' Read Context '
49+ run : unzip -d webapp previewbuild.zip && rm previewbuild.zip && unzip pr .json.zip && rm pr .json.zip
50+ - name : ' Read PR Info '
5151 id : readctx
52525353 with :
5454 script : |
5555 var fs = require('fs');
56- var ctx = JSON.parse(fs.readFileSync('${{github.workspace}}/context .json'));
57- console.log(`::set-output name=prnumber::${ctx.payload.pull_request .number}`);
56+ var pr = JSON.parse(fs.readFileSync('${{github.workspace}}/pr .json'));
57+ console.log(`::set-output name=prnumber::${pr .number}`);
5858 - name : Deploy to Netlify
5959 id : netlify
6060
0 commit comments