mirror of
https://github.com/th30d4y/OpenLearnX.git
synced 2026-05-26 11:25:49 +00:00
fix: prevent mirror-event-log from failing when PAT is missing
Agent-Logs-Url: https://github.com/th30d4y/OpenLearnX/sessions/46d635ed-7046-41a5-a1d6-d39ad7d81a99 Co-authored-by: Stalin-143 <161853795+Stalin-143@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
458f19ffc2
commit
ea70ede503
@@ -28,11 +28,12 @@ jobs:
|
||||
LOGS_REPO_PAT: ${{ secrets.LOGS_REPO_PAT }}
|
||||
run: |
|
||||
if [ -z "$LOGS_REPO_PAT" ]; then
|
||||
echo "Missing required secret: LOGS_REPO_PAT. See README.md for setup instructions."
|
||||
exit 1
|
||||
echo "::warning::Missing required secret: LOGS_REPO_PAT. Skipping event mirroring. See README.md for setup instructions."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
- name: Checkout logs repository
|
||||
if: ${{ secrets.LOGS_REPO_PAT != '' }}
|
||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
||||
with:
|
||||
repository: th30d4y/LOGS
|
||||
@@ -40,6 +41,7 @@ jobs:
|
||||
path: logs-repo
|
||||
|
||||
- name: Append event payload to daily log file
|
||||
if: ${{ secrets.LOGS_REPO_PAT != '' }}
|
||||
env:
|
||||
SOURCE_REPOSITORY: ${{ github.repository }}
|
||||
SOURCE_EVENT_NAME: ${{ github.event_name }}
|
||||
@@ -98,6 +100,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Commit and push logs
|
||||
if: ${{ secrets.LOGS_REPO_PAT != '' }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
cd logs-repo
|
||||
|
||||
Reference in New Issue
Block a user