File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -33,11 +33,18 @@ jobs:
3333 token : ${{ secrets.GITHUB_TOKEN }}
3434
3535 - name : Update Issue created-at time
36+ if : steps.check-nonce.outputs.contains_nonce == 'true'
37+ id : update-timestamp
3638 run : |
37- # Update the "Last Issue create at" time
39+ # Update the "Last Issue created at" time
3840 TIMESTAMP=$(date -u +"%Y-%m-%d %H:%M:%S UTC")
41+ echo "timestamp=$TIMESTAMP" >> $GITHUB_OUTPUT
42+ echo "Generated timestamp: $TIMESTAMP"
3943
40-
44+ # Update the timestamp in the baseline section
45+ sed -i 's/Last Issue created at: `[^`]*`/Last Issue created at: `'"$TIMESTAMP"'`/g' README.md
46+ echo "Updated README.md with new timestamp in baseline section"
47+
4148
4249 - name : Update nonce in README
4350 if : steps.check-nonce.outputs.contains_nonce == 'true'
4653 NEW_NONCE=$(printf "%06d" $((RANDOM % 1000000)))
4754 echo "Generated new nonce: $NEW_NONCE"
4855
49- # Get current timestamp in UTC
50- TIMESTAMP=$(date -u +"%Y-%m-%d %H:%M:%S UTC")
51- echo "Current timestamp: $TIMESTAMP"
56+ # Reuse timestamp from previous step
57+ TIMESTAMP="${{ steps.update-timestamp.outputs.timestamp }}"
58+ echo "Using timestamp from previous step : $TIMESTAMP"
5259
5360 # Find and replace nonce=NNNNNN pattern with new nonce
5461 # Only within the NONCE section markers
You can’t perform that action at this time.
0 commit comments