diff --git a/.github/workflows/mirror-repo-events-to-logs.yml b/.github/workflows/mirror-repo-events-to-logs.yml index fb1911f..bf3fb51 100644 --- a/.github/workflows/mirror-repo-events-to-logs.yml +++ b/.github/workflows/mirror-repo-events-to-logs.yml @@ -20,6 +20,8 @@ permissions: jobs: mirror-event-log: runs-on: ubuntu-latest + env: + LOG_ROOT_DIR: openlearnx-events steps: - name: Ensure personal access token exists env: @@ -53,7 +55,7 @@ jobs: export TZ=UTC DAY="$(date +%F)" - LOG_DIR="logs-repo/openlearnx-events/$DAY" + LOG_DIR="logs-repo/${LOG_ROOT_DIR}/$DAY" mkdir -p "$LOG_DIR" LOG_FILE="$LOG_DIR/events.jsonl" @@ -102,6 +104,6 @@ jobs: exit 0 fi - git add openlearnx-events + git add "${LOG_ROOT_DIR}" git commit -m "log(OpenLearnX): ${{ github.event_name }} @ ${{ github.run_id }}" git push diff --git a/README.md b/README.md index bf13f48..7f60a47 100644 --- a/README.md +++ b/README.md @@ -123,9 +123,10 @@ It captures repository events (push, pull request activity, stars, forks, create 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. --- -