Skip to content
This repository was archived by the owner on Dec 30, 2025. It is now read-only.

Commit 5fba68e

Browse files
committed
chore: update maintenance workflow for enhanced TODO tracking and cleanup
- Added support for new identifiers "HACK" and "XXX" in the TODO tracking configuration. - Removed the ADMIN_PAT environment variable from the workflow for improved security. - Cleaned up whitespace in various sections of the workflow file for better readability.
1 parent d09f2ca commit 5fba68e

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

.github/workflows/maintenance.yml

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ on:
2929
concurrency:
3030
group: ${{ github.workflow }}-${{ github.ref }}
3131
cancel-in-progress: false
32-
env:
33-
ADMIN_PAT: ${{ secrets.ADMIN_PAT }}
32+
3433
jobs:
3534
todos:
3635
name: TODOs
@@ -52,11 +51,10 @@ jobs:
5251
INSERT_ISSUE_URLS: true
5352
AUTO_ASSIGN: true
5453
IDENTIFIERS: |
55-
[{"name": "TODO", "labels": ["enhancement"]}, {"name": "FIXME", "labels": ["bug"]}, {"name": "NOTE", "labels": ["documentation"]}]
54+
[{"name": "TODO", "labels": ["enhancement"]}, {"name": "FIXME", "labels": ["bug"]}, {"name": "NOTE", "labels": ["documentation"]}, {"name": "HACK", "labels": ["refactor", "hack"]}, {"name": "XXX", "labels": ["refactor", "hack"]}]
5655
ESCAPE: true
5756
IGNORE: |
5857
.github/,node_modules/,dist/,build/,vendor/,data/,logs/
59-
PROJECTS_SECRET: ${{ env.ADMIN_PAT }}
6058
env:
6159
MANUAL_COMMIT_REF: ${{ github.event.inputs.manual_commit_ref }}
6260
MANUAL_BASE_REF: ${{ github.event.inputs.manual_base_ref }}
@@ -169,7 +167,7 @@ jobs:
169167
echo "### 🐳 Docker Compose Health Check"
170168
echo "Validating compose configuration with DCLint..."
171169
} >> "$GITHUB_STEP_SUMMARY"
172-
170+
173171
# Run DCLint to check Docker Compose configuration
174172
if docker run --rm -v "$(pwd):/workspace" -w /workspace \
175173
docker.io/dockercomposelinter/dclint:latest . --formatter json 2>/dev/null; then
@@ -184,19 +182,19 @@ jobs:
184182
echo "### 📦 Containerfile Health Check"
185183
echo "Checking Containerfiles for common issues..."
186184
} >> "$GITHUB_STEP_SUMMARY"
187-
185+
188186
for containerfile in $(find . -name "Containerfile" -o -name "Dockerfile"); do
189187
echo "**Checking**: $containerfile" >> "$GITHUB_STEP_SUMMARY"
190-
188+
191189
# Check for common security issues
192190
if grep -q "RUN.*apt-get.*update.*&&.*apt-get.*install" "$containerfile"; then
193191
echo "✅ Uses combined RUN commands for apt-get" >> "$GITHUB_STEP_SUMMARY"
194192
fi
195-
193+
196194
if grep -q "USER.*root" "$containerfile"; then
197195
echo "⚠️ Uses root user - consider non-root user" >> "$GITHUB_STEP_SUMMARY"
198196
fi
199-
197+
200198
if grep -q "EXPOSE.*80\|EXPOSE.*443\|EXPOSE.*22" "$containerfile"; then
201199
echo "✅ Properly exposes common ports" >> "$GITHUB_STEP_SUMMARY"
202200
fi
@@ -231,22 +229,22 @@ jobs:
231229
if command -v gh >/dev/null 2>&1; then
232230
TOTAL_SIZE=0
233231
TOTAL_VERSIONS=0
234-
232+
235233
for service in unrealircd atheme unrealircd-webpanel; do
236234
# Get package info
237235
PACKAGE_INFO=$(gh api user/packages/container/irc-atl-chat-$service 2>/dev/null || echo '{"size_in_bytes": 0, "version_count": 0}')
238236
SIZE_BYTES=$(echo "$PACKAGE_INFO" | jq -r '.size_in_bytes // 0')
239237
VERSION_COUNT=$(echo "$PACKAGE_INFO" | jq -r '.version_count // 0')
240238
SIZE_GB=$(echo "scale=2; $SIZE_BYTES / 1024 / 1024 / 1024" | bc -l 2>/dev/null || echo "0")
241-
239+
242240
echo "**$service**: ${SIZE_GB}GB, $VERSION_COUNT versions"
243241
TOTAL_SIZE=$(echo "$TOTAL_SIZE + $SIZE_GB" | bc -l)
244242
TOTAL_VERSIONS=$((TOTAL_VERSIONS + VERSION_COUNT))
245243
done
246-
244+
247245
echo "**Total Registry Size**: ${TOTAL_SIZE}GB"
248246
echo "**Total Version Count**: $TOTAL_VERSIONS"
249-
247+
250248
if (( $(echo "$TOTAL_SIZE > 10" | bc -l) )); then
251249
echo "⚠️ **Warning**: Total registry size exceeds 10GB"
252250
else
@@ -274,26 +272,26 @@ jobs:
274272
{
275273
echo "### 🔒 SSL Certificate Health Check"
276274
echo "Checking for SSL-related files and configurations..."
277-
275+
278276
if [ -f "scripts/ssl-manager.sh" ]; then
279277
echo "✅ SSL management script exists"
280278
else
281279
echo "⚠️ SSL management script not found"
282280
fi
283-
281+
284282
if [ -d "data/letsencrypt" ]; then
285283
echo "✅ Let's Encrypt data directory exists"
286284
CERT_COUNT=$(find data/letsencrypt -name "*.pem" 2>/dev/null | wc -l)
287285
echo "**Certificate files found**: $CERT_COUNT"
288286
else
289287
echo "⚠️ Let's Encrypt data directory not found"
290288
fi
291-
289+
292290
if [ -f "cloudflare-credentials.ini.template" ]; then
293291
echo "✅ Cloudflare credentials template exists"
294292
else
295293
echo "⚠️ Cloudflare credentials template not found"
296294
fi
297-
295+
298296
echo ""
299297
} >> "$GITHUB_STEP_SUMMARY"

0 commit comments

Comments
 (0)