Skip to content

Commit 1c15945

Browse files
committed
initial commit
journey before destination
0 parents  commit 1c15945

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

.github/workflows/comment.yml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Comment Posting PRs
2+
3+
permissions:
4+
contents: read
5+
pull-requests: write
6+
issues: write
7+
8+
on:
9+
push:
10+
branches:
11+
- 'main'
12+
pull_request:
13+
branches:
14+
- '*'
15+
16+
jobs:
17+
analyze_flash:
18+
name: Analyzing ${{ matrix.target }}
19+
runs-on: ubuntu-24.04
20+
outputs:
21+
buildate: ${{ steps.builder.outputs.buildate }}
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
submodules: recursive
27+
28+
- name: Build Target
29+
id: builder
30+
run:|
31+
echo "buildate=$(bash ./build.sh) >> $GITHUB_OUTPUT
32+
33+
post_pr_comment:
34+
name: Publish Results
35+
runs-on: ubuntu-24.04
36+
needs: [analyze_flash]
37+
steps:
38+
- name: Find Comment
39+
uses: peter-evans/find-comment@v3
40+
id: fc
41+
with:
42+
issue-number: ${{ github.event.pull_request.number }}
43+
comment-author: 'github-actions[bot]'
44+
body-includes: "Current Date"
45+
46+
- name: Set Build Time
47+
id: bt
48+
run: |
49+
echo "timestamp=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_OUTPUT
50+
51+
- name: Create or update comment
52+
uses: peter-evans/create-or-update-comment@v4
53+
with:
54+
comment-id: ${{ steps.fc.outputs.comment-id }}
55+
issue-number: ${{ github.event.pull_request.number }}
56+
body: |
57+
## 🔎 Current Date:
58+
```
59+
${{ needs.analyze_flash.outputs.buildate }}
60+
```
61+
edit-mode: replace

build.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
date '+%Y-%m-%d %H:%M:%S'

0 commit comments

Comments
 (0)