Skip to main content

Removing workflow artifacts

You can reclaim used GitHub Actions storage by deleting artifacts before they expire on GitHub.

Deleting an artifact

Avertissement

Once you delete an artifact, it cannot be restored.

L’accès en écriture au dépôt est requis pour effectuer ces étapes.

Par défaut, GitHub stocke les journaux de build et les artefacts pendant 90 jours, et cette période de rétention peut être personnalisée. Pour plus d’informations, consultez « Usage limits, billing, and administration ».

  1. Sur GitHub, accédez à la page principale du référentiel.

  2. Sous le nom de votre dépôt, cliquez sur Actions.

    Capture d’écran des onglets du référentiel « github/docs ». L’onglet « Actions » est mis en surbrillance avec un encadré orange.

  3. Dans la barre latérale gauche, cliquez sur le workflow que vous souhaitez afficher.

    Capture d'écran de la barre latérale gauche de l'onglet « Actions », avec un workflow « CodeQL » indiqué en orange foncé.

  4. Dans la liste des exécutions de workflow, cliquez sur le nom de l’exécution pour voir le résumé de l’exécution du workflow.

  5. Under Artifacts, click next to the artifact you want to remove.

    Screenshot showing artifacts created during a workflow run. A trash can icon, used to remove an artifact, is outlined in dark orange.

Setting the retention period for an artifact

Retention periods for artifacts and logs can be configured at the repository, organization, and enterprise level. For more information, see Usage limits, billing, and administration.

You can also define a custom retention period for individual artifacts using the actions/upload-artifact action in a workflow. For more information, see Storing and sharing data from a workflow.

Finding the expiration date of an artifact

You can use the API to confirm the date that an artifact is scheduled to be deleted. For more information, see the expires_at value returned by the REST API. For more information, see Points de terminaison REST pour l’API GitHub Actions artefact.

Artefacts des exécutions de flux de travail supprimées

Lorsqu’une exécution de flux de travail est supprimée, tous les artefacts associés à l’exécution sont également supprimés du stockage. Vous pouvez supprimer une exécution de flux de travail à l’aide de l’interface utilisateur GitHub Actions, de l’API REST ou de l’interface de ligne de commande GitHub, consultez : Deleting a workflow run, Supprimer une exécution de flux de travail, ou gh run delete.