Skip to content
This repository has been archived by the owner on Jun 29, 2024. It is now read-only.

Commit

Permalink
Use nightly.link to bypass github actions login restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
MishaProductions committed May 19, 2024
1 parent 9874469 commit d619a17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/links.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const gitHubLink = "javascript:(async () => {const repoOwner = 'Rectify11'; const repoName = 'Installer'; const workflowFileName = 'build.yml'; try {const runsResponse = await fetch(`https://api.github.com/repos/${repoOwner}/${repoName}/actions/workflows/${workflowFileName}/runs`); const runsData = await runsResponse.json(); const latestSuccessfulRun = runsData.workflow_runs.find(run => run.conclusion === 'success'); if (!latestSuccessfulRun) throw new Error('No successful runs found'); const artifactsResponse = await fetch(latestSuccessfulRun.artifacts_url); const artifactsData = await artifactsResponse.json(); const latestArtifact = artifactsData.artifacts[0]; if (!latestArtifact) throw new Error('No artifacts found for the latest successful run'); window.location.href = `https://github.com/${repoOwner}/${repoName}/actions/runs/${latestArtifact.workflow_run.id}/artifacts/${latestArtifact.id}`; } catch (error) { console.error('Error fetching artifact:', error); alert('Failed to fetch the latest artifact. See console for details.'); } })()";
export const gitHubLink = "javascript:(async () => {const repoOwner = 'Rectify11'; const repoName = 'Installer'; const workflowFileName = 'build.yml'; try {const runsResponse = await fetch(`https://api.github.com/repos/${repoOwner}/${repoName}/actions/workflows/${workflowFileName}/runs`); const runsData = await runsResponse.json(); const latestSuccessfulRun = runsData.workflow_runs.find(run => run.conclusion === 'success'); if (!latestSuccessfulRun) throw new Error('No successful runs found'); const artifactsResponse = await fetch(latestSuccessfulRun.artifacts_url); const artifactsData = await artifactsResponse.json(); const latestArtifact = artifactsData.artifacts[0]; if (!latestArtifact) throw new Error('No artifacts found for the latest successful run'); window.location.href = `https://nightly.link/${repoOwner}/${repoName}/actions/runs/${latestArtifact.workflow_run.id}/artifacts/${latestArtifact.id}`; } catch (error) { console.error('Error fetching artifact:', error); alert('Failed to fetch the latest artifact. See console for details.'); } })()";
export const gitHubSrcLink = "https://github.com/Rectify11/Installer";
export const discordLink = "https://discord.gg/rectify11-community-1077324213142175744";

0 comments on commit d619a17

Please sign in to comment.