mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2026-05-11 10:00:39 +00:00
This stupid bullshit doesn't work, I'm done
This commit is contained in:
parent
708186d8d2
commit
5d8cb3e378
1 changed files with 0 additions and 43 deletions
|
|
@ -202,46 +202,3 @@ jobs:
|
|||
name: ryujinx-${{ matrix.configuration }}-${{ steps.version_info.outputs.result }}+${{ steps.version_info.outputs.git_short_hash }}-macos_universal
|
||||
path: "publish/*.tar.gz"
|
||||
if: forgejo.event_name == 'pull_request'
|
||||
|
||||
post_comment:
|
||||
name: Post comment linking uploaded artifacts
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- build
|
||||
- build_macos
|
||||
steps:
|
||||
- uses: actions/github-script@v9
|
||||
env:
|
||||
COMMENTER_TOKEN: ${{ secrets.COMMENTER_TOKEN }}
|
||||
with:
|
||||
github-token: 'n/a'
|
||||
script: |
|
||||
const forgejo = getOctokit(process.env.COMMENTER_TOKEN, {
|
||||
baseUrl: 'https://git.ryujinx.app/api/v1'
|
||||
});
|
||||
|
||||
const {owner, repo} = context.repo;
|
||||
const run_id = ${{ env.FORGEJO_RUN_ID }};
|
||||
|
||||
const issue_number = ${{ forgejo.event.pull_request.number }};
|
||||
core.info(`Using run ID ${run_id} from pull request ${issue_number}`);
|
||||
|
||||
const {data: {artifacts}} = await forgejo.rest.actions.listWorkflowRunArtifacts({owner, repo, run_id});
|
||||
if (artifacts == undefined || !artifacts.length) {
|
||||
return core.error(`No artifacts found for run ID`);
|
||||
}
|
||||
let body = `Download the artifacts for this pull request:\n`;
|
||||
for (const art of artifacts) {
|
||||
const url = `https://git.ryujinx.app/api/v1/repos/${owner}/${repo}/actions/artifacts/${art.id}/zip`;
|
||||
body += `\n* [${art.name}](${url})`;
|
||||
}
|
||||
|
||||
const {data: comments} = await forgejo.rest.issues.listComments({repo, owner, issue_number});
|
||||
const existing_comment = comments.find((c) => c.user.login === 'forgejo-actions');
|
||||
if (existing_comment) {
|
||||
core.info(`Updating comment ${existing_comment.id}`);
|
||||
await forgejo.rest.issues.updateComment({repo, owner, comment_id: existing_comment.id, body});
|
||||
} else {
|
||||
core.info(`Creating a comment`);
|
||||
await forgejo.rest.issues.createComment({repo, owner, issue_number, body});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue