You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,19 +3,22 @@
3
3
4
4
# Gitpod Environment Cleanup Action
5
5
6
-
Automatically clean up stopped Gitpod environments that are older than a specified number of days and have no pending changes. This action helps maintain a clean workspace and manage resource usage in your Gitpod Flex organization.
6
+
Automatically clean up stale Gitpod environments that haven't been started for a specified number of days and have no pending changes. This action helps maintain a clean workspace and manage resource usage in your Gitpod Flex organization.
7
7
8
8
> [!IMPORTANT]
9
9
> `GITPOD_TOKEN`: Required. [Learn more](https://www.gitpod.io/docs/flex/integrations/personal-access-token) about how to create a Gitpod Personal Access Token in Gitpod Flex.
10
10
11
11
12
12
## Features
13
13
14
-
- 🧹 Cleans up stopped environments automatically
15
-
- ⏰ Configurable age threshold for environment deletion (default: 10 days)
16
-
- ✅ Only deletes environments with no uncommitted changes or unpushed commits
14
+
- 🧹 Cleans up stale environments automatically
15
+
- ⏰ Configurable inactivity threshold (default: 10 days since last start)
16
+
- ✅ Smart cleanup - only deletes environments that are:
17
+
- In STOPPED phase
18
+
- Have no uncommitted changes
19
+
- Have no unpushed commits
20
+
- Haven't been started for X days
17
21
- 📄 Optional summary report of deleted environments
18
-
- 📝 Detailed logging for debugging
19
22
- 🔄 Handles pagination for organizations with many environments
20
23
21
24
## Usage
@@ -72,7 +75,7 @@ jobs:
72
75
|-------|----------|---------|-------------|
73
76
| `GITPOD_TOKEN` | Yes | - | Gitpod Personal Access Token with necessary permissions |
74
77
| `ORGANIZATION_ID` | Yes | - | Your Gitpod Flex organization ID |
75
-
| `OLDER_THAN_DAYS` | No | 10 | Delete environments older than this many days |
78
+
| `OLDER_THAN_DAYS` | No | 10 | Delete environments not started for this many days |
76
79
| `PRINT_SUMMARY` | No | false | Generate a summary of deleted environments |
77
80
78
81
## Outputs
@@ -85,7 +88,7 @@ jobs:
85
88
## Prerequisites
86
89
87
90
1. **Gitpod Personal Access Token**:
88
-
- Go to [Gitpod User Settings](https://gitpod.io/user/tokens)
91
+
- Go to [Gitpod User Settings](https://app.gitpod.io/settings/personal-access-tokens)
0 commit comments