Skip to content

An action which deletes codespaces for an authenticated user where there are no uncommitted changes.

Notifications You must be signed in to change notification settings

NickLiffen/delete-empty-codespaces

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Delete Empty Codespaces Action

An action which deletes codespaces which have no unpublished or uncommitted changes.

Usage

Create a new PAT and assign it only the codespace scope.

Create a new workflow that looks something like this.

name: Delete Codespaces Nightly

on:
  workflow_dispatch:
  schedule:
    - cron: '0 2 * * *' # run at 2 AM UTC

jobs:
  nightly:
    name: Deploy nightly
    runs-on: ubuntu-latest
    steps:

      - name: Deploy Windows release
        uses: NickLiffen/delete-empty-codespaces@v1.0.0
        with:
          GITHUB_TOKEN: ${{ secrets.TOKEN }}

About

An action which deletes codespaces for an authenticated user where there are no uncommitted changes.

Resources

Stars

Watchers

Forks

Packages

No packages published