mirror of
https://github.com/th30d4y/OpenLearnX.git
synced 2026-05-26 19:26:33 +00:00
Clarify PAT permissions and centralize log root path in workflow
Agent-Logs-Url: https://github.com/th30d4y/OpenLearnX/sessions/17fba2c8-4f49-4a78-9dc4-483acc8cc945 Co-authored-by: Stalin-143 <161853795+Stalin-143@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
86346a3e9e
commit
fdc4d67e48
@@ -20,6 +20,8 @@ permissions:
|
|||||||
jobs:
|
jobs:
|
||||||
mirror-event-log:
|
mirror-event-log:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
LOG_ROOT_DIR: openlearnx-events
|
||||||
steps:
|
steps:
|
||||||
- name: Ensure personal access token exists
|
- name: Ensure personal access token exists
|
||||||
env:
|
env:
|
||||||
@@ -53,7 +55,7 @@ jobs:
|
|||||||
export TZ=UTC
|
export TZ=UTC
|
||||||
|
|
||||||
DAY="$(date +%F)"
|
DAY="$(date +%F)"
|
||||||
LOG_DIR="logs-repo/openlearnx-events/$DAY"
|
LOG_DIR="logs-repo/${LOG_ROOT_DIR}/$DAY"
|
||||||
mkdir -p "$LOG_DIR"
|
mkdir -p "$LOG_DIR"
|
||||||
LOG_FILE="$LOG_DIR/events.jsonl"
|
LOG_FILE="$LOG_DIR/events.jsonl"
|
||||||
|
|
||||||
@@ -102,6 +104,6 @@ jobs:
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git add openlearnx-events
|
git add "${LOG_ROOT_DIR}"
|
||||||
git commit -m "log(OpenLearnX): ${{ github.event_name }} @ ${{ github.run_id }}"
|
git commit -m "log(OpenLearnX): ${{ github.event_name }} @ ${{ github.run_id }}"
|
||||||
git push
|
git push
|
||||||
|
|||||||
@@ -123,9 +123,10 @@ It captures repository events (push, pull request activity, stars, forks, create
|
|||||||
|
|
||||||
Add this repository secret in **OpenLearnX**:
|
Add this repository secret in **OpenLearnX**:
|
||||||
|
|
||||||
- `LOGS_REPO_PAT`: a Personal Access Token with write access to `th30d4y/LOGS` (for example, `contents:write` on that repo).
|
- `LOGS_REPO_PAT`: a Personal Access Token that can write to `th30d4y/LOGS`.
|
||||||
|
- Fine-grained PAT: grant repository access to `th30d4y/LOGS` with **Contents: Read and write**.
|
||||||
|
- Classic PAT: use **repo** scope.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user