mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-04-22 08:44:41 +01:00
Merge branch 'develop' into sonarqube
This commit is contained in:
21
.github/workflows/artifact-comment.yml
vendored
21
.github/workflows/artifact-comment.yml
vendored
@@ -270,22 +270,33 @@ jobs:
|
|||||||
} else if (matchingStatus) {
|
} else if (matchingStatus) {
|
||||||
if (matchingStatus.conclusion === 'success' && matchingArtifact) {
|
if (matchingStatus.conclusion === 'success' && matchingArtifact) {
|
||||||
status = '✅ Complete';
|
status = '✅ Complete';
|
||||||
const nightlyLink = `https://nightly.link/${context.repo.owner}/${context.repo.repo}/actions/runs/${matchingArtifact.workflow_run.id}/${matchingArtifact.name}.zip`;
|
const directLink = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${matchingArtifact.workflow_run.id}/artifacts/${matchingArtifact.id}`;
|
||||||
const fileType = target.name.includes('Android') ? 'APK' : 'IPA';
|
const fileType = target.name.includes('Android') ? 'APK' : 'IPA';
|
||||||
downloadLink = `[📥 Download ${fileType}](${nightlyLink})`;
|
downloadLink = `[📥 Download ${fileType}](${directLink})`;
|
||||||
} else if (matchingStatus.conclusion === 'failure') {
|
} else if (matchingStatus.conclusion === 'failure') {
|
||||||
status = `❌ [Failed](${matchingStatus.url})`;
|
status = `❌ [Failed](${matchingStatus.url})`;
|
||||||
downloadLink = '*Build failed*';
|
downloadLink = '*Build failed*';
|
||||||
|
} else if (matchingStatus.conclusion === 'cancelled') {
|
||||||
|
status = `⚪ [Cancelled](${matchingStatus.url})`;
|
||||||
|
downloadLink = '*Build cancelled*';
|
||||||
} else if (matchingStatus.status === 'in_progress') {
|
} else if (matchingStatus.status === 'in_progress') {
|
||||||
status = `🔄 [Building...](${matchingStatus.url})`;
|
status = `🔄 [Building...](${matchingStatus.url})`;
|
||||||
downloadLink = '*Build in progress...*';
|
downloadLink = '*Build in progress...*';
|
||||||
} else if (matchingStatus.status === 'queued') {
|
} else if (matchingStatus.status === 'queued') {
|
||||||
status = `⏳ [Queued](${matchingStatus.url})`;
|
status = `⏳ [Queued](${matchingStatus.url})`;
|
||||||
downloadLink = '*Waiting to start...*';
|
downloadLink = '*Waiting to start...*';
|
||||||
|
} else if (matchingStatus.status === 'completed' && !matchingStatus.conclusion) {
|
||||||
|
// Workflow completed but conclusion not yet available (rare edge case)
|
||||||
|
status = `🔄 [Finishing...](${matchingStatus.url})`;
|
||||||
|
downloadLink = '*Finalizing build...*';
|
||||||
|
} else if (matchingStatus.status === 'completed' && matchingStatus.conclusion === 'success' && !matchingArtifact) {
|
||||||
|
// Build succeeded but artifacts not yet available
|
||||||
|
status = `⏳ [Processing artifacts...](${matchingStatus.url})`;
|
||||||
|
downloadLink = '*Preparing download...*';
|
||||||
} else {
|
} else {
|
||||||
// Show any other status with timestamp for debugging
|
// Fallback for any unexpected states
|
||||||
status = `🔄 [${matchingStatus.status}](${matchingStatus.url})`;
|
status = `❓ [${matchingStatus.status}/${matchingStatus.conclusion || 'pending'}](${matchingStatus.url})`;
|
||||||
downloadLink = `*Status: ${matchingStatus.status}*`;
|
downloadLink = `*Status: ${matchingStatus.status}, Conclusion: ${matchingStatus.conclusion || 'pending'}*`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user