Skip to content

Commit ae66052

Browse files
committed
fix: use platform-compatible date formatting in workflow
- Fix date formatting to be compatible with GitHub Actions runners (Linux) - Use TZ=UTC instead of -u flag for better compatibility - Remove unnecessary timestamp environment variable - Ensure all date commands use the same format
1 parent 6eb9c32 commit ae66052

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

.github/workflows/docs-unified.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,6 @@ jobs:
296296
# Post initial comment with preview links
297297
- name: Post initial preview comment
298298
if: inputs.post-comment == 'true' && inputs.generate-preview == 'true' && (inputs.pr-number != '' || github.event.pull_request)
299-
env:
300-
TIMESTAMP: ${{ steps.start-time.outputs.timestamp }}
301299
uses: marocchino/sticky-pull-request-comment@v2.9.2
302300
with:
303301
header: docs-preview-comment
@@ -314,8 +312,8 @@ jobs:
314312
- [Installation Guide](https://coder.com/docs/@${{ steps.context-info.outputs.sanitized_branch }}/install)
315313
- [Quickstart](https://coder.com/docs/@${{ steps.context-info.outputs.sanitized_branch }}/tutorials/quickstart)
316314
317-
<sub>⏳ Validating documentation... (Started at $(date -u -d @$TIMESTAMP '+%Y-%m-%d %H:%M:%S UTC'))</sub>
318-
<sub>⏱️ Status update: Waiting for validation results - last update: $(date -u '+%Y-%m-%d %H:%M:%S UTC')</sub>
315+
<sub>⏳ Validating documentation... (Started at $(TZ=UTC date '+%Y-%m-%d %H:%M:%S UTC'))</sub>
316+
<sub>⏱️ Status update: Waiting for validation results - last update: $(TZ=UTC date '+%Y-%m-%d %H:%M:%S UTC')</sub>
319317
320318
# Get changed files
321319
- name: Get changed files
@@ -345,7 +343,7 @@ jobs:
345343
- [Installation Guide](https://coder.com/docs/@${{ steps.context-info.outputs.sanitized_branch }}/install)
346344
- [Quickstart](https://coder.com/docs/@${{ steps.context-info.outputs.sanitized_branch }}/tutorials/quickstart)
347345
348-
<sub>⏳ Found ${{ steps.changed-files.outputs.all_changed_files_count }} markdown files to validate. Starting validation at $(date -u '+%Y-%m-%d %H:%M:%S UTC')...</sub>
346+
<sub>⏳ Found ${{ steps.changed-files.outputs.all_changed_files_count }} markdown files to validate. Starting validation at $(TZ=UTC date '+%Y-%m-%d %H:%M:%S UTC')...</sub>
349347
350348
# Run MegaLinter (documentation flavor)
351349
- name: MegaLinter Documentation
@@ -673,7 +671,7 @@ jobs:
673671
echo "- **Validation Success**: $SUCCESS% ($PASSING/$TOTAL checks passed)" >> $TEMP_FILE
674672
echo "- **Processing Time**: $DURATION" >> $TEMP_FILE
675673
echo "" >> $TEMP_FILE
676-
echo "<sub>⏱️ Validation completed in $DURATION | Completed at $(date -u '+%Y-%m-%d %H:%M:%S UTC') | [View Workflow Run]($WORKFLOW_RUN)</sub>" >> $TEMP_FILE
674+
echo "<sub>⏱️ Validation completed in $DURATION | Completed at $(TZ=UTC date '+%Y-%m-%d %H:%M:%S UTC') | [View Workflow Run]($WORKFLOW_RUN)</sub>" >> $TEMP_FILE
677675
678676
# Export content to GitHub output
679677
echo "comment<<EOF" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)