-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #99 from DonColon/dev
Fixed pipeline and added cleanup workflow
- Loading branch information
Showing
7 changed files
with
70 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
export default async ({ core, context, github }) => { | ||
const { owner, repo } = context.repo; | ||
|
||
const { data: workflowRuns } = await github.rest.actions.listWorkflowRunsForRepo({ | ||
owner, | ||
repo | ||
}); | ||
|
||
for(const workflowRun of workflowRuns) { | ||
await github.rest.actions.deleteWorkflowRun({ | ||
owner, | ||
repo, | ||
run_id: workflowRun.id, | ||
}); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Github CI Cleanup | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
cleanup: | ||
name: Cleanup Repository ${{ github.event.repository.name }} | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
|
||
steps: | ||
- name: Checkout Repository ${{ github.event.repository.name }} | ||
uses: actions/checkout@v4 | ||
|
||
- name: Cleanup Workflow Runs | ||
uses: actions/github-script@v7 | ||
id: cleanup_workflow_runs | ||
with: | ||
script: | | ||
const scriptPath = '${{ github.workspace }}/.github/scripts/cleanup-workflow-runs.js'; | ||
const { default: cleanupWorkflowRuns } = await import(scriptPath); | ||
await cleanupWorkflowRuns({ core, context, github }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters