mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-18 19:25:48 +00:00
[ci skip] fix: Invalid workflow templates in github-script source
This commit is contained in:
@@ -218,24 +218,11 @@ jobs:
|
|||||||
});
|
});
|
||||||
|
|
||||||
const {owner, repo} = context.repo;
|
const {owner, repo} = context.repo;
|
||||||
const run_id = ${{forgejo.event.workflow_run.id}};
|
const run_id = ${{ forgejo.run_id }};
|
||||||
const pull_head_sha = '${{forgejo.event.workflow_run.head_sha}}';
|
const pull_head_sha = '${{ forgejo.event.workflow_run.head_sha }}';
|
||||||
|
|
||||||
const issue_number = await (async () => {
|
const issue_number = ${{ forgejo.event.pull_request.number }};
|
||||||
const pulls = await forgejo.rest.pulls.list({owner, repo});
|
core.info(`Using pull request ${issue_number}`);
|
||||||
for await (const {data} of forgejo.paginate.iterator(pulls)) {
|
|
||||||
for (const pull of data) {
|
|
||||||
if (pull.head.sha === pull_head_sha) {
|
|
||||||
return pull.number;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
if (issue_number) {
|
|
||||||
core.info(`Using pull request ${issue_number}`);
|
|
||||||
} else {
|
|
||||||
return core.error(`No matching pull request found`);
|
|
||||||
}
|
|
||||||
|
|
||||||
const {data: {artifacts}} = await forgejo.rest.actions.listWorkflowRunArtifacts({owner, repo, run_id});
|
const {data: {artifacts}} = await forgejo.rest.actions.listWorkflowRunArtifacts({owner, repo, run_id});
|
||||||
if (!artifacts.length) {
|
if (!artifacts.length) {
|
||||||
|
|||||||
Reference in New Issue
Block a user