Skip to content

Commit d503af6

Browse files
docs update
1 parent d229606 commit d503af6

File tree

1 file changed

+41
-20
lines changed

1 file changed

+41
-20
lines changed

README.md

+41-20
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
> [!NOTE]
2-
> This is for [Gitpod Flex](https://app.gitpod.io), if you are using [Gitpod Classic](https://www.gitpod.io) (PAYG), please refer to the [Gitpod Classic Environment Cleanup Action](https://github.com/marketplace/actions/delete-clean-gitpod-workspaces)
2+
> This is for [Gitpod Flex](https://app.gitpod.io), if you are using [Gitpod Classic](https://gitpod.io/workspaces) (PAYG), please refer to the [Gitpod Classic Environment Cleanup Action](https://github.com/marketplace/actions/delete-clean-gitpod-workspaces)
33
44
# Gitpod Environment Cleanup Action
55

@@ -69,21 +69,43 @@ jobs:
6969
PRINT_SUMMARY: true
7070
```
7171
72-
## Inputs
72+
## Inputs ⚙️
7373
74-
| Input | Required | Default | Description |
75-
|-------|----------|---------|-------------|
76-
| `GITPOD_TOKEN` | Yes | - | Gitpod Personal Access Token with necessary permissions |
77-
| `ORGANIZATION_ID` | Yes | - | Your Gitpod Flex organization ID |
78-
| `OLDER_THAN_DAYS` | No | 10 | Delete environments not started for this many days |
79-
| `PRINT_SUMMARY` | No | false | Generate a summary of deleted environments |
74+
| Input | Required | Default | Description |
75+
| ----------------- | -------- | ------- | ------------------------------------- |
76+
| `GITPOD_TOKEN` | Yes | - | Gitpod Personal Access Token |
77+
| `ORGANIZATION_ID` | Yes | - | Gitpod Flex organization ID |
78+
| `OLDER_THAN_DAYS` | No | 10 | Delete environments older than X days |
79+
| `PRINT_SUMMARY` | No | false | Generate detailed summary report |
8080

81-
## Outputs
81+
## Outputs 📊
8282

83-
| Output | Description |
84-
|--------|-------------|
85-
| `success` | 'true' if the action completed successfully, 'false' otherwise |
86-
| `deleted_count` | Number of environments deleted |
83+
| Output | Description |
84+
| ------------------- | ---------------------------------------- |
85+
| `success` | 'true' if cleanup completed successfully |
86+
| `deleted_count` | Number of environments deleted |
87+
| `avg_days_inactive` | Average days of inactivity |
88+
89+
## Summary Report Example 📑
90+
91+
```markdown
92+
# Environment Cleanup Summary
93+
94+
| Metric | Value |
95+
| -------------------------- | ----------- |
96+
| Total Environments Cleaned | 5 |
97+
| Average Days Inactive | 15.3 days |
98+
| Oldest Last Start | 25 days ago |
99+
| Newest Last Start | 10 days ago |
100+
101+
## Deleted Environments
102+
103+
| Environment ID | Project | Last Activity | Created | Creator | Days Inactive |
104+
| -------------- | ---------------------------------- | ------------- | ---------- | -------- | ------------- |
105+
| 01924aff-... | github.com/siddhant-k-code/website | 2023-11-01 | 2023-10-15 | user-123 | 15 days |
106+
| 01924bff-... | github.com/siddhant-k-code/docs | 2023-10-25 | 2023-10-01 | user-456 | 22 days |
107+
| 01924cff-... | github.com/siddhant-k-code/example | 2023-10-20 | 2023-09-15 | user-789 | 18 days |
108+
```
87109

88110
## Prerequisites
89111

@@ -96,14 +118,13 @@ jobs:
96118
- Get your organization ID from Gitpod Flex dashboard
97119
- Add it as a GitHub secret named `GITPOD_ORGANIZATION_ID`
98120

99-
## Deletion Criteria
121+
## Cleanup Criteria 🔍
100122

101-
An environment will be deleted if it meets ALL of the following criteria:
102-
- Is in `STOPPED` phase
103-
- Has no uncommitted changes
104-
- Has no unpushed commits
105-
- Is older than the specified number of days
106-
- Belongs to the specified organization
123+
An environment is deleted only if ALL conditions are met:
124+
- Not started for X days (configurable)
125+
- Currently in STOPPED phase
126+
- No uncommitted changes
127+
- No unpushed commits
107128

108129
## Security Considerations
109130

0 commit comments

Comments
 (0)