Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/siddhant-k-code/delete-clean-workspaces

GitHub Action to automatically delete workspaces that are stopped and do not have any uncommitted or untracked file changes
https://github.com/siddhant-k-code/delete-clean-workspaces

gitpod gitpod-api gitpod-workspace

Last synced: 24 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# 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](https://www.gitpod.io/docs/configure/user-settings/access-tokens).

## Usage

[**Demo repository**](https://github.com/Siddhant-K-code/demo-delete-clean-workspaces)

```yaml
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
```