Compare commits

..

7 Commits

Author SHA1 Message Date
greem
bf083a716c use new workflow type in conditions 2026-05-05 10:12:06 +00:00
greem
2d2661298c Update .forgejo/workflows/build.yml 2026-05-05 09:29:41 +00:00
greem
c4788154fd even more annoying skill issue! 2026-05-05 09:15:54 +00:00
greem
49dd56953c annoying error 2026-05-05 08:52:08 +00:00
greem
722eb93554 Use a dedicated access token instead of the runner-generated one. 2026-05-05 08:07:38 +00:00
ryuadmin
b0179e6433 [ci skip] Improve logging for PR build comment step. 2026-05-05 07:50:58 +00:00
ryuadmin
1d3d4197b7 fix: *hopefully* fix build comments 2026-05-05 06:22:51 +00:00

View File

@@ -1,7 +1,7 @@
name: Build PR
on:
pull_request:
pull_request_target:
branches: [ master ]
paths:
- '**'
@@ -63,7 +63,7 @@ jobs:
- name: Change config filename
run: sed -r --in-place 's/\%\%RYUJINX_CONFIG_FILE_NAME\%\%/PRConfig\.json/g;' src/Ryujinx.Common/ReleaseInformation.cs
shell: bash
if: forgejo.event_name == 'pull_request'
if: forgejo.event_name == 'pull_request_target'
- name: 'Cache: ~/.nuget/packages'
uses: actions/cache@v5
@@ -85,7 +85,7 @@ jobs:
- name: Publish Ryujinx
run: dotnet publish -c "${{ matrix.configuration }}" -r "${{ matrix.platform.name }}" -o ./publish -p:Version="${{ steps.version_info.outputs.result }}" -p:DebugType=embedded -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:ExtraDefineConstants=DISABLE_UPDATER src/Ryujinx --self-contained
if: forgejo.event_name == 'pull_request'
if: forgejo.event_name == 'pull_request_target'
- name: Packing Windows builds
if: contains(matrix.platform.name, 'win')
@@ -98,10 +98,10 @@ jobs:
with:
name: ryujinx-${{ matrix.configuration }}-${{ steps.version_info.outputs.result }}+${{ steps.version_info.outputs.git_short_hash }}-${{ matrix.platform.zip_os_name }}
path: artifact
if: forgejo.event_name == 'pull_request' && contains(matrix.platform.name, 'win')
if: forgejo.event_name == 'pull_request_target' && contains(matrix.platform.name, 'win')
- name: Build AppImage
if: forgejo.event_name == 'pull_request' && contains(matrix.platform.name, 'linux')
if: forgejo.event_name == 'pull_request_target' && contains(matrix.platform.name, 'linux')
run: |
chmod +x ./publish/Ryujinx ./publish/Ryujinx.sh
@@ -134,7 +134,7 @@ jobs:
- name: Upload Ryujinx AppImage artifact
uses: actions/upload-artifact@v5
if: forgejo.event_name == 'pull_request' && contains(matrix.platform.name, 'linux')
if: forgejo.event_name == 'pull_request_target' && contains(matrix.platform.name, 'linux')
with:
name: ryujinx-${{ matrix.configuration }}-${{ steps.version_info.outputs.result }}+${{ steps.version_info.outputs.git_short_hash }}-${{ matrix.platform.zip_os_name }}-AppImage
path: publish_appimage
@@ -182,7 +182,7 @@ jobs:
- name: Change config filename
run: sed -r --in-place 's/\%\%RYUJINX_CONFIG_FILE_NAME\%\%/PRConfig\.json/g;' src/Ryujinx.Common/ReleaseInformation.cs
shell: bash
if: forgejo.event_name == 'pull_request'
if: forgejo.event_name == 'pull_request_target'
- name: 'Cache: ~/.nuget/packages'
uses: actions/cache@v5
@@ -201,7 +201,7 @@ jobs:
with:
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'
if: forgejo.event_name == 'pull_request_target'
post_comment:
name: Post comment linking uploaded artifacts
@@ -211,21 +211,24 @@ jobs:
- 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.FORGEJO_TOKEN, {
const forgejo = getOctokit(process.env.COMMENTER_TOKEN, {
baseUrl: 'https://git.ryujinx.app/api/v1'
});
const {owner, repo} = context.repo;
const run_id = ${{ forgejo.run_number }};
const run_id = ${{ env.FORGEJO_RUN_ID }};
const issue_number = ${{ forgejo.event.pull_request.number }};
core.info(`Using pull request ${issue_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`);
return core.error(`No artifacts found for run ID`);
}
let body = `Download the artifacts for this pull request:\n`;
for (const art of artifacts) {