Skip to content

GitHub Action to automatically delete workspaces that are stopped and do not have any uncommitted or untracked file changes

Notifications You must be signed in to change notification settings

Siddhant-K-code/delete-clean-workspaces

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

Gitpod Workspace Cleanup - GitHub Action

This GitHub Action is designed to manage Gitpod workspaces. It automatically deletes workspaces that are stopped and do not have any uncommitted or untracked file changes.

Note

GITPOD_TOKEN: Required. The access token for Gitpod API. Learn more.

Usage

Demo repository

name: Delete clean Gitpod workspaces weekly

on:
  workflow_dispatch:
  schedule:
    - cron: "0 9 * * MON" # At 9 AM UTC, weekly only on Monday

jobs:
  delete-clean-workspaces:
    name: Clean Gitpod workspaces weekly
    runs-on: ubuntu-latest
    steps:
      - name: Delete clean Gitpod workspaces
        uses: Siddhant-K-code/[email protected]
        with:
          GITPOD_TOKEN: ${{ secrets.GITPOD_PAT_TOKEN }}
          PRINT_SUMMARY: true # Print summary of deleted workspaces. Optional & defaults to false

About

GitHub Action to automatically delete workspaces that are stopped and do not have any uncommitted or untracked file changes

Topics

Resources

Stars

Watchers

Forks