mirror of
https://github.com/0x5t4l1n/Keylogger.git
synced 2026-05-26 19:36:31 +00:00
feat: add auto-increment counter workflow and initial counter in README
Agent-Logs-Url: https://github.com/Stalin-143/Keylogger/sessions/d5a82ee9-733e-4c4a-be4c-cf6f392e4a96 Co-authored-by: Stalin-143 <161853795+Stalin-143@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
949005c236
commit
161dd2660a
@@ -0,0 +1,29 @@
|
||||
name: Auto Increment Counter
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
increment:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Increment counter in README
|
||||
run: |
|
||||
current=$(grep -oP '(?<=Counter: )\d+' README.md)
|
||||
new=$((current + 2))
|
||||
sed -i "s/Counter: ${current}/Counter: ${new}/" README.md
|
||||
echo "Counter updated from ${current} to ${new}"
|
||||
|
||||
- name: Commit and push
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add README.md
|
||||
git commit -m "chore: increment counter to $(grep -oP '(?<=Counter: )\d+' README.md)"
|
||||
git push
|
||||
@@ -1,5 +1,9 @@
|
||||
# Keylogger :)
|
||||
|
||||
<!-- COUNTER -->
|
||||
Counter: 1
|
||||
<!-- /COUNTER -->
|
||||
|
||||
[](https://github.com/Stalin-143/Keylogger/graphs/contributors)
|
||||
|
||||

|
||||
|
||||
Reference in New Issue
Block a user