Skip to content

Commit fa22062

Browse files
committed
update
1 parent bae626b commit fa22062

12 files changed

Lines changed: 329 additions & 219 deletions

File tree

actions/aws-cloudfront-invalidation/action.yml

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ inputs:
3333
required: false
3434
default: 'false'
3535

36+
show_summary:
37+
description: 'Print summary in the job summary'
38+
required: false
39+
default: 'true'
40+
summary_limit:
41+
description: 'Max number of lines (paths) to show in summary'
42+
required: false
43+
default: '250'
44+
3645
outputs:
3746
invalidation_id:
3847
description: 'ID of the created invalidation'
@@ -137,8 +146,8 @@ runs:
137146
ID=$(echo "$RESP" | jq -r '.Invalidation.Id')
138147
STATUS=$(echo "$RESP" | jq -r '.Invalidation.Status')
139148
140-
echo "invalidation_id=$ID" >> "$GITHUB_OUTPUT"
141-
echo "status=$STATUS" >> "$GITHUB_OUTPUT"
149+
echo "invalidation_id=$ID" >> "$GITHUB_OUTPUT"
150+
echo "status=$STATUS" >> "$GITHUB_OUTPUT"
142151
echo "caller_reference=$CALLER_REF" >> "$GITHUB_OUTPUT"
143152
144153
echo "✅ Invalidation created: $ID (status: $STATUS)"
@@ -177,27 +186,53 @@ runs:
177186
fi
178187
179188
- name: Summary
180-
if: always()
189+
if: always() && inputs.show_summary == 'true'
181190
shell: bash
182191
run: |
183192
set -euo pipefail
184193
185194
STATUS_ICON="❌"
186-
[[ "${{ steps.invalidate.outputs.invalidation_id }}" != "" ]] && STATUS_ICON="✅"
195+
[[ -n "${{ steps.invalidate.outputs.invalidation_id }}" ]] && STATUS_ICON="✅"
187196
197+
DIST="${{ inputs.distribution_id }}"
188198
ID="${{ steps.invalidate.outputs.invalidation_id }}"
189-
CF_LINK="https://console.aws.amazon.com/cloudfront/v4/home#/distributions/${DIST}/invalidations/${ID}"
199+
CF_LINK=""
200+
if [[ -n "$DIST" && -n "$ID" ]]; then
201+
CF_LINK="https://console.aws.amazon.com/cloudfront/v4/home#/distributions/${DIST}/invalidations/${ID}"
202+
fi
203+
204+
LIMIT="${{ inputs.summary_limit }}"
205+
[[ "$LIMIT" =~ ^[0-9]+$ ]] || LIMIT="250"
206+
207+
PATHS_RAW="${{ inputs.paths }}"
208+
mapfile -t P_ARR < <(printf '%s\n' $PATHS_RAW)
209+
TOTAL="${#P_ARR[@]}"
210+
SHOW="$LIMIT"; (( TOTAL < LIMIT )) && SHOW="$TOTAL"
190211
191212
{
192213
echo "## 📊 CloudFront Invalidation ${STATUS_ICON}"
193214
echo "- **Invalidation ID:** \`${ID:-N/A}\`"
194215
echo "- **Status:** \`${{ steps.invalidate.outputs.status || 'N/A' }}\`"
195-
echo "- **Paths:** \`${{ inputs.paths }}\`"
196216
echo "- **CallerReference:** \`${{ steps.invalidate.outputs.caller_reference || 'auto' }}\`"
197-
if [[ -n "$ID" ]]; then
217+
echo "- **Distribution:** \`${DIST}\`"
218+
if [[ -n "$CF_LINK" ]]; then
198219
echo "- **Console:** ${CF_LINK}"
199220
fi
200221
222+
echo ""
223+
if (( TOTAL > 0 )); then
224+
if (( TOTAL <= LIMIT )); then
225+
echo "### Paths"
226+
else
227+
echo "### Paths (first ${LIMIT} of ${TOTAL})"
228+
fi
229+
echo '```'
230+
for ((i=0;i<SHOW;i++)); do
231+
printf '%s\n' "${P_ARR[i]}"
232+
done
233+
echo '```'
234+
fi
235+
201236
echo ""
202237
if [[ "${{ inputs.wait_for_completion }}" == "true" ]]; then
203238
echo "⏱️ Waited for completion: **true**"

actions/aws-cloudfront-invalidation/readme.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,15 @@ jobs:
4242
## 📥 Inputs
4343
| **Name** | **Required** | **Description** | **Default** |
4444
|--------------------|--------------|---------------------------------------------------------------------------------------------------------|-------------|
45-
| `aws_region` | ✅ Yes | AWS region (used by the CLI) | - |
45+
| `aws_region` | ✅ Yes | AWS region (used by the CLI) | - |
4646
| `distribution_id` | ✅ Yes | CloudFront distribution ID (format: E + 13 alphanumeric chars, e.g. `E1234567890ABC`) | - |
47-
| `aws_access_key` | ❌ No | AWS access key ID (optional if using OIDC) | - |
48-
| `aws_secret_key` | ❌ No | AWS secret access key (optional if using OIDC) | - |
49-
| `role_to_assume` | ❌ No | AWS IAM role ARN to assume (OIDC) | - |
50-
| `paths` | ❌ No | Space‑separated list of paths to invalidate (must start with `/`; max 1000 entries; wildcards allowed) | `/*` |
51-
| `caller_reference` | ❌ No | Custom caller reference for idempotency (auto‑generated if not provided) | - |
47+
| `aws_access_key` | ❌ No | AWS access key ID (optional if using OIDC) | - |
48+
| `aws_secret_key` | ❌ No | AWS secret access key (optional if using OIDC) | - |
49+
| `role_to_assume` | ❌ No | AWS IAM role ARN to assume (OIDC) | - |
50+
| `paths` | ❌ No | Space‑separated list of paths to invalidate (must start with `/`; max 1000 entries; wildcards allowed) | `/*` |
51+
| `caller_reference` | ❌ No | Custom caller reference for idempotency (auto‑generated if not provided) | - |
52+
| `show_summary` | ❌ No | Print summary with task output in job summary | `true` |
53+
| `summary_limit` | ❌ No | Max number of output lines to show in summary | `250` |
5254

5355
## 📤 Outputs
5456
| **Name** | **Description** |

actions/aws-lambda-restart/action.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@ inputs:
3939
required: false
4040
default: 'true'
4141

42+
show_summary:
43+
description: 'Print summary in the job summary'
44+
required: false
45+
default: 'true'
46+
summary_limit:
47+
description: 'Max number of lines to show in summary (kept for consistency)'
48+
required: false
49+
default: '250'
50+
4251
outputs:
4352
function_arn:
4453
description: 'Lambda function ARN'
@@ -190,7 +199,7 @@ runs:
190199
echo "✅ Function is Active"
191200
192201
- name: Summary
193-
if: always()
202+
if: always() && inputs.show_summary == 'true'
194203
shell: bash
195204
run: |
196205
set -euo pipefail
@@ -200,15 +209,18 @@ runs:
200209
STATUS_ICON="✅"
201210
fi
202211
212+
LIMIT="${{ inputs.summary_limit }}"
213+
[[ "$LIMIT" =~ ^[0-9]+$ ]] || LIMIT="250"
214+
203215
{
204216
echo "## 🚀 Lambda Update ${STATUS_ICON}"
205217
echo "- **Function:** \`${{ inputs.function_name }}\`"
206218
echo "- **Region:** \`${{ inputs.aws_region }}\`"
207-
# echo "- **Image:** \`${{ steps.resolve_image.outputs.image_uri }}\`"
219+
echo "- **Image:** \`${{ steps.resolve_image.outputs.image_uri || 'N/A' }}\`"
208220
if [[ "${{ steps.update_code.outcome }}" == "success" ]]; then
209-
# echo "- **Function ARN:** \`${{ steps.update_code.outputs.function_arn }}\`"
210-
echo "- **Code SHA256:** \`${{ steps.update_code.outputs.code_sha256 }}\`"
211-
echo "- **Last Modified:** \`${{ steps.update_code.outputs.last_modified }}\`"
221+
echo "- **Function ARN:** \`${{ steps.update_code.outputs.function_arn || 'N/A' }}\`"
222+
echo "- **Code SHA256:** \`${{ steps.update_code.outputs.code_sha256 || 'N/A' }}\`"
223+
echo "- **Last Modified:** \`${{ steps.update_code.outputs.last_modified || 'N/A' }}\`"
212224
echo "- **Waited for Active:** \`${{ inputs.wait_for_update }}\`"
213225
else
214226
echo "- **Status:** Update failed — check logs above"

actions/aws-lambda-restart/readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ jobs:
5656
| `repository` | ❌ No | ECR repository name (used if `image_uri` not provided) | - |
5757
| `image_tag` | ❌ No | ECR image tag (used with `repository`) | `latest` |
5858
| `wait_for_update` | ❌ No | Wait for function update to complete (`true`/`false`) | `true` |
59+
| `show_summary` | ❌ No | Print summary with task output in job summary | `true` |
60+
| `summary_limit` | ❌ No | Max number of output lines to show in summary | `250` |
5961

6062
## 📤 Outputs
6163
| **Name** | **Description** |

actions/aws-s3-sync/action.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ inputs:
4343
required: false
4444
default: 'true'
4545

46+
show_summary:
47+
description: 'Print summary in the job summary'
48+
required: false
49+
default: 'true'
50+
summary_limit:
51+
description: 'Max number of output lines to show in summary (kept for consistency)'
52+
required: false
53+
default: '250'
54+
4655
outputs:
4756
files_uploaded:
4857
description: 'Number of uploaded files'
@@ -234,7 +243,7 @@ runs:
234243
echo "sync_duration=$SYNC_DURATION" >> "$GITHUB_OUTPUT"
235244
236245
- name: Summary
237-
if: always()
246+
if: always() && inputs.show_summary == 'true'
238247
shell: bash
239248
run: |
240249
set -euo pipefail
@@ -244,11 +253,15 @@ runs:
244253
BYTES="${{ steps.analyze.outputs.total_size || 0 }}"
245254
MB=$(awk "BEGIN {printf \"%.2f\", (${BYTES})/1024/1024}")
246255
256+
# limit is kept for API parity with other actions
257+
LIMIT="${{ inputs.summary_limit }}"
258+
[[ "$LIMIT" =~ ^[0-9]+$ ]] || LIMIT="250"
259+
247260
{
248261
echo "## ☁️ S3 Sync ${STATUS_ICON}"
249262
echo "- **Bucket:** \`${{ inputs.bucket_name }}\`"
250263
echo "- **Source:** \`${{ inputs.source_dir }}\`"
251-
# echo "- **Target:** \`${{ steps.url.outputs.s3_url }}\`"
264+
echo "- **Target:** \`${{ steps.url.outputs.s3_url }}\`"
252265
echo "- **Region:** \`${{ inputs.aws_region }}\`"
253266
echo "- **Delete removed:** \`${{ inputs.delete_removed }}\`"
254267
echo "- **Cache-Control:** \`${{ inputs.cache_control || 'N/A' }}\`"

actions/aws-s3-sync/readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ jobs:
6262
| `exclude_patterns` | ❌ No | Space‑separated exclude patterns passed to `aws s3 sync --exclude` | `.git/* .github/* .gitignore .gitattributes` |
6363
| `cache_control` | ❌ No | Value for `Cache-Control` header applied to uploads | - |
6464
| `content_type_detection` | ❌ No | Enable automatic content-type guessing based on file extension (true/false) | true |
65+
| `show_summary` | ❌ No | Print summary with task output in job summary | `true` |
66+
| `summary_limit` | ❌ No | Max number of output lines to show in summary | `250` |
6567

6668
## 📤 Outputs
6769
| **Name** | **Description** |

actions/docker-build-push/action.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,15 @@ inputs:
4848
required: false
4949
default: 'Dockerfile'
5050

51+
show_summary:
52+
description: 'Print summary in the job summary'
53+
required: false
54+
default: 'true'
55+
summary_limit:
56+
description: 'Max number of output lines to show in summary (kept for consistency)'
57+
required: false
58+
default: '250'
59+
5160
outputs:
5261
image_digest:
5362
description: 'Pushed image manifest-list digest (sha256:...)'
@@ -266,7 +275,7 @@ runs:
266275
echo "image_ref=${IMAGE}@${DIGEST}" >> "$GITHUB_OUTPUT"
267276
268277
- name: Summary
269-
if: always()
278+
if: always() && inputs.show_summary == 'true'
270279
shell: bash
271280
env:
272281
BUILD_ARGS_JSON: ${{ inputs.build_args }}
@@ -275,6 +284,7 @@ runs:
275284
REGISTRY: ${{ inputs.registry }}
276285
REPO: ${{ inputs.repository }}
277286
TAG: ${{ inputs.tag }}
287+
LIMIT: ${{ inputs.summary_limit }}
278288
run: |
279289
set -euo pipefail
280290
@@ -283,6 +293,8 @@ runs:
283293
STATUS_ICON="✅"
284294
fi
285295
296+
[[ "$LIMIT" =~ ^[0-9]+$ ]] || LIMIT="250"
297+
286298
if [[ "$REGISTRY" != "docker.io" && "$REPO" != "${REGISTRY}/"* ]]; then
287299
IMAGE="${REGISTRY}/${REPO}"
288300
else

actions/docker-build-push/readme.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
|------------------|--------------|-----------------------------------------------------------------------------------------------------|---------------------------------------------|
5454
| `docker_user` | ✅ Yes | Registry username (Docker Hub by default) | - |
5555
| `docker_token` | ✅ Yes | Registry access token / password | - |
56-
| `repository` | ✅ Yes | Image repository (e.g. `user/image` or `ghcr.io/org/image` with non-default registry) | - |
56+
| `repository` | ✅ Yes | Image repository (e.g. `user/image` or `ghcr.io/org/image` with non-default registry) | - |
5757
| `tag` | ✅ Yes | Image tag (e.g. `v1.0.0`, `sha`) | - |
5858
| `registry` | ❌ No | Registry host (e.g. `docker.io`, `ghcr.io`) | `docker.io` |
5959
| `push_latest` | ❌ No | Also tag and push `:latest` (`true`/`false`) | `false` |
@@ -62,6 +62,8 @@ jobs:
6262
| `artifact_name` | ❌ No | If set, downloads artifact and uses it as build context | `''` |
6363
| `context_path` | ❌ No | Build context path (relative to repo root or artifact root) | `.` |
6464
| `dockerfile_path`| ❌ No | Path to Dockerfile (relative to `context_path`) | `Dockerfile` |
65+
| `show_summary` | ❌ No | Print summary with task output in job summary | `true` |
66+
| `summary_limit` | ❌ No | Max number of output lines to show in summary | `250` |
6567

6668
## 📤 Outputs
6769
| **Name** | **Description** |

0 commit comments

Comments
 (0)