mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-02 03:58:36 +01:00
Merge branch 'develop' into sonarqube
This commit is contained in:
13
.github/workflows/artifact-comment.yml
vendored
13
.github/workflows/artifact-comment.yml
vendored
@@ -16,7 +16,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
comment-artifacts:
|
comment-artifacts:
|
||||||
if: github.event_name == 'workflow_dispatch' || github.event.workflow_run.event == 'pull_request'
|
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'workflow_run' && github.event.workflow_run.event == 'pull_request')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -63,11 +63,11 @@ jobs:
|
|||||||
console.log(`Processing PR #${pr.number} for commit ${pr.head.sha.substring(0, 7)}`);
|
console.log(`Processing PR #${pr.number} for commit ${pr.head.sha.substring(0, 7)}`);
|
||||||
|
|
||||||
// Get all recent workflow runs for this PR to collect artifacts from multiple builds
|
// Get all recent workflow runs for this PR to collect artifacts from multiple builds
|
||||||
const { data: workflowRuns } = await github.rest.actions.listWorkflowRuns({
|
const { data: workflowRuns } = await github.rest.actions.listWorkflowRunsForRepo({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
head_sha: pr.head.sha,
|
head_sha: pr.head.sha,
|
||||||
per_page: 10
|
per_page: 20
|
||||||
});
|
});
|
||||||
|
|
||||||
// Filter for build workflows only
|
// Filter for build workflows only
|
||||||
@@ -106,13 +106,6 @@ jobs:
|
|||||||
|
|
||||||
console.log(`Collected ${allArtifacts.length} total artifacts from all builds`);
|
console.log(`Collected ${allArtifacts.length} total artifacts from all builds`);
|
||||||
|
|
||||||
// Get artifacts from current run if needed
|
|
||||||
const { data: artifacts } = await github.rest.actions.listWorkflowRunArtifacts({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
run_id: runId
|
|
||||||
});
|
|
||||||
|
|
||||||
// Sort and categorize all collected artifacts
|
// Sort and categorize all collected artifacts
|
||||||
const androidArtifacts = allArtifacts
|
const androidArtifacts = allArtifacts
|
||||||
.filter(a => a.name.includes('android'))
|
.filter(a => a.name.includes('android'))
|
||||||
|
|||||||
Reference in New Issue
Block a user