Cara hapus nya adalah dengan menghapus actions nya satu persatu. Kalau sedikit mah gampang, sekarang pas udah numpuk, pegel juga hapus satu persatu.

Saya dapat cara yang efektif ini dari stackoverflow - anyone know a way to delete worflow from github actions

  1. Install github-cli

  2. Install jq (command-line JSON processor), apt install jq

  3. Untuk test github cli, gunakan gh api repos/namauserataugroup/namarepo/actions/workflows

    Test github-cli, List Semua Workflows

    Test github-cli, List Semua Workflows

  4. Disable Workflows yang ingin di hapus

    Disable Workflows di Repo

    Disable Workflows di Repo

  5. Buat 1 script dengan nama remove-old-actions.sh, isikan dengan

org=namagroupataunamausername
repo=namarepo

# Get workflow IDs with status "disabled_manually"
workflow_ids=($(gh api repos/$org/$repo/actions/workflows | jq '.workflows[] | select(.["state"] | contains("disabled_manually")) | .id'))

for workflow_id in "${workflow_ids[@]}"
do
  echo "Listing runs for the workflow ID $workflow_id"
  run_ids=( $(gh api repos/$org/$repo/actions/workflows/$workflow_id/runs | jq '.workflow_runs[].id') )
  for run_id in "${run_ids[@]}"
  do
    echo "Deleting Run ID $run_id"
    gh api repos/$org/$repo/actions/runs/$run_id -X DELETE >/dev/null
  done
done
  1. Jalankan while :; do clear; source remove-old-actions; sleep 10; done

    Proses Hapus Workflows

    Proses Hapus Workflows

  2. Apabila sudah tidak ada proses, silahkan tekan ctrl+c

Sumber:

stackoverflow - anyone know a way to delete worflow from github actions