Skip to content

Commit c56e3fd

Browse files
committed
remove actions comments
1 parent ffc56d1 commit c56e3fd

File tree

3 files changed

+97
-1
lines changed

3 files changed

+97
-1
lines changed

.github/workflows/deploy-production.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,38 @@ jobs:
8585
echo "::warning file=$file::File '$file' is very large: $size. This can impact repository size and checkout times."
8686
done
8787
88+
# - name: Fail on Oversized Files
89+
# id: fail_on_oversized_files
90+
# run: |
91+
# #!/bin/bash
92+
# # This script is a stricter check that fails the workflow if files exceed size limits.
93+
# set -e
94+
95+
# # Thresholds in Megabytes (same as the warning step)
96+
# IMAGE_LIMIT_MB=2
97+
# ASSET_LIMIT_MB=10
98+
99+
# # Find oversized files and prepare a detailed report
100+
# OVERSIZED_FILES=$(find content -type f \
101+
# \( \( -name "*.png" -o -name "*.jpg" -o -name "*.jpeg" -o -name "*.svg" -o -name "*.gif" \) -size "+${IMAGE_LIMIT_MB}M" \) -o \
102+
# \( \( -name "*.pdf" -o -name "*.zip" -o -name "*.mp4" \) -size "+${ASSET_LIMIT_MB}M" \) \
103+
# -exec ls -lh {} + | awk '{printf " - %s (%s)\n", $9, $5}')
104+
105+
# # Check if the report is non-empty and fail the job if so
106+
# if [ -n "$OVERSIZED_FILES" ]; then
107+
# echo "::error::Found files exceeding size limits. This new check is failing the build as intended."
108+
# echo "--------------------------------------------------"
109+
# echo "Oversized Files Found:"
110+
# echo "$OVERSIZED_FILES"
111+
# echo "--------------------------------------------------"
112+
# echo "Limits:"
113+
# echo " - Images (PNG, JPG, SVG, GIF): ${IMAGE_LIMIT_MB}MB"
114+
# echo " - Assets (PDF, ZIP, MP4): ${ASSET_LIMIT_MB}MB"
115+
# exit 1
116+
# else
117+
# echo "No oversized files found. New check passed."
118+
# fi
119+
88120
- name: Compress Large Images
89121
run: |
90122
sudo apt-get update && sudo apt-get install -y jpegoptim optipng

.github/workflows/deploy-staging.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,38 @@ jobs:
8585
echo "::warning file=$file::File '$file' is very large: $size. This can impact repository size and checkout times."
8686
done
8787
88+
# - name: Fail on Oversized Files
89+
# id: fail_on_oversized_files
90+
# run: |
91+
# #!/bin/bash
92+
# # This script is a stricter check that fails the workflow if files exceed size limits.
93+
# set -e
94+
95+
# # Thresholds in Megabytes (same as the warning step)
96+
# IMAGE_LIMIT_MB=2
97+
# ASSET_LIMIT_MB=10
98+
99+
# # Find oversized files and prepare a detailed report
100+
# OVERSIZED_FILES=$(find content -type f \
101+
# \( \( -name "*.png" -o -name "*.jpg" -o -name "*.jpeg" -o -name "*.svg" -o -name "*.gif" \) -size "+${IMAGE_LIMIT_MB}M" \) -o \
102+
# \( \( -name "*.pdf" -o -name "*.zip" -o -name "*.mp4" \) -size "+${ASSET_LIMIT_MB}M" \) \
103+
# -exec ls -lh {} + | awk '{printf " - %s (%s)\n", $9, $5}')
104+
105+
# # Check if the report is non-empty and fail the job if so
106+
# if [ -n "$OVERSIZED_FILES" ]; then
107+
# echo "::error::Found files exceeding size limits. This new check is failing the build as intended."
108+
# echo "--------------------------------------------------"
109+
# echo "Oversized Files Found:"
110+
# echo "$OVERSIZED_FILES"
111+
# echo "--------------------------------------------------"
112+
# echo "Limits:"
113+
# echo " - Images (PNG, JPG, SVG, GIF): ${IMAGE_LIMIT_MB}MB"
114+
# echo " - Assets (PDF, ZIP, MP4): ${ASSET_LIMIT_MB}MB"
115+
# exit 1
116+
# else
117+
# echo "No oversized files found. New check passed."
118+
# fi
119+
88120
- name: Compress Large Images
89121
run: |
90122
sudo apt-get update && sudo apt-get install -y jpegoptim optipng

.github/workflows/preview.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
fetch-depth: 1
6868

6969
- name: Cleanup runner disk
70-
uses: ./.github/actions/cleanup-disk
70+
uses: ./.github/actions/cleanup-disk
7171
- uses: actions/setup-node@v4
7272
with:
7373
node-version: 18
@@ -103,6 +103,38 @@ jobs:
103103
echo "::warning file=$file::File '$file' is very large: $size. This can impact repository size and checkout times."
104104
done
105105
106+
# - name: Fail on Oversized Files
107+
# id: fail_on_oversized_files
108+
# run: |
109+
# #!/bin/bash
110+
# # This script is a stricter check that fails the workflow if files exceed size limits.
111+
# set -e
112+
113+
# # Thresholds in Megabytes (same as the warning step)
114+
# IMAGE_LIMIT_MB=2
115+
# ASSET_LIMIT_MB=10
116+
117+
# # Find oversized files and prepare a detailed report
118+
# OVERSIZED_FILES=$(find content -type f \
119+
# \( \( -name "*.png" -o -name "*.jpg" -o -name "*.jpeg" -o -name "*.svg" -o -name "*.gif" \) -size "+${IMAGE_LIMIT_MB}M" \) -o \
120+
# \( \( -name "*.pdf" -o -name "*.zip" -o -name "*.mp4" \) -size "+${ASSET_LIMIT_MB}M" \) \
121+
# -exec ls -lh {} + | awk '{printf " - %s (%s)\n", $9, $5}')
122+
123+
# # Check if the report is non-empty and fail the job if so
124+
# if [ -n "$OVERSIZED_FILES" ]; then
125+
# echo "::error::Found files exceeding size limits. This new check is failing the build as intended."
126+
# echo "--------------------------------------------------"
127+
# echo "Oversized Files Found:"
128+
# echo "$OVERSIZED_FILES"
129+
# echo "--------------------------------------------------"
130+
# echo "Limits:"
131+
# echo " - Images (PNG, JPG, SVG, GIF): ${IMAGE_LIMIT_MB}MB"
132+
# echo " - Assets (PDF, ZIP, MP4): ${ASSET_LIMIT_MB}MB"
133+
# exit 1
134+
# else
135+
# echo "No oversized files found. New check passed."
136+
# fi
137+
106138
- name: Compress Large Images
107139
run: |
108140
sudo apt-get update && sudo apt-get install -y jpegoptim optipng

0 commit comments

Comments
 (0)