blog.oddbit.com/post/2022-09-22-delete-workflow-runs

Preview meta tags from the blog.oddbit.com website.

Linked Hostnames

5

Thumbnail

Search Engine Appearance

Google

https://blog.oddbit.com/post/2022-09-22-delete-workflow-runs

Delete GitHub workflow runs using the gh cli

Hello, future me. This is for you next time you want to do this. When setting up the CI for a project I will sometimes end up with a tremendous clutter of workflow runs. Sometimes they have embarrassing mistakes. Who wants to show that to people? I was trying to figure out how to bulk delete workflow runs from the CLI, and I came up with something that works: gh run list --json databaseId -q '.[].databaseId' | xargs -IID gh api \ "repos/$(gh repo view --json nameWithOwner -q .nameWithOwner)/actions/runs/ID" \ -X DELETE This will delete all (well, up to 20, or whatever you set in --limit) your workflow runs. You can add flags to gh run list to filter runs by workflow or by triggering user.



Bing

Delete GitHub workflow runs using the gh cli

https://blog.oddbit.com/post/2022-09-22-delete-workflow-runs

Hello, future me. This is for you next time you want to do this. When setting up the CI for a project I will sometimes end up with a tremendous clutter of workflow runs. Sometimes they have embarrassing mistakes. Who wants to show that to people? I was trying to figure out how to bulk delete workflow runs from the CLI, and I came up with something that works: gh run list --json databaseId -q '.[].databaseId' | xargs -IID gh api \ "repos/$(gh repo view --json nameWithOwner -q .nameWithOwner)/actions/runs/ID" \ -X DELETE This will delete all (well, up to 20, or whatever you set in --limit) your workflow runs. You can add flags to gh run list to filter runs by workflow or by triggering user.



DuckDuckGo

https://blog.oddbit.com/post/2022-09-22-delete-workflow-runs

Delete GitHub workflow runs using the gh cli

Hello, future me. This is for you next time you want to do this. When setting up the CI for a project I will sometimes end up with a tremendous clutter of workflow runs. Sometimes they have embarrassing mistakes. Who wants to show that to people? I was trying to figure out how to bulk delete workflow runs from the CLI, and I came up with something that works: gh run list --json databaseId -q '.[].databaseId' | xargs -IID gh api \ "repos/$(gh repo view --json nameWithOwner -q .nameWithOwner)/actions/runs/ID" \ -X DELETE This will delete all (well, up to 20, or whatever you set in --limit) your workflow runs. You can add flags to gh run list to filter runs by workflow or by triggering user.

  • General Meta Tags

    8
    • title
      Delete GitHub workflow runs using the gh cli :: blog.oddbit.com
    • charset
      utf-8
    • viewport
      width=device-width,initial-scale=1
    • description
      Hello, future me. This is for you next time you want to do this. When setting up the CI for a project I will sometimes end up with a tremendous clutter of workflow runs. Sometimes they have embarrassing mistakes. Who wants to show that to people? I was trying to figure out how to bulk delete workflow runs from the CLI, and I came up with something that works: gh run list --json databaseId -q '.[].databaseId' | xargs -IID gh api \ "repos/$(gh repo view --json nameWithOwner -q .nameWithOwner)/actions/runs/ID" \ -X DELETE This will delete all (well, up to 20, or whatever you set in --limit) your workflow runs. You can add flags to gh run list to filter runs by workflow or by triggering user.
    • keywords
  • Open Graph Meta Tags

    9
    • og:locale
      en
    • og:type
      article
    • og:title
      Delete GitHub workflow runs using the gh cli
    • og:description
      Hello, future me. This is for you next time you want to do this. When setting up the CI for a project I will sometimes end up with a tremendous clutter of workflow runs. Sometimes they have embarrassing mistakes. Who wants to show that to people? I was trying to figure out how to bulk delete workflow runs from the CLI, and I came up with something that works: gh run list --json databaseId -q '.[].databaseId' | xargs -IID gh api \ "repos/$(gh repo view --json nameWithOwner -q .nameWithOwner)/actions/runs/ID" \ -X DELETE This will delete all (well, up to 20, or whatever you set in --limit) your workflow runs. You can add flags to gh run list to filter runs by workflow or by triggering user.
    • og:url
      https://blog.oddbit.com/post/2022-09-22-delete-workflow-runs/
  • Twitter Meta Tags

    1
    • twitter:card
      summary
  • Link Tags

    5
    • apple-touch-icon
      https://blog.oddbit.com/img/theme-colors/orange.png
    • canonical
      https://blog.oddbit.com/post/2022-09-22-delete-workflow-runs/
    • shortcut icon
      https://blog.oddbit.com/img/theme-colors/orange.png
    • stylesheet
      https://blog.oddbit.com/styles.css
    • stylesheet
      https://blog.oddbit.com/style.css

Links

14