Update .gitea/workflows/diagnose.yaml
Diagnose GitHub sync / diagnose (push) Successful in 0s
Mirror to GitHub / mirror (push) Successful in 2s

This commit is contained in:
Moody6 committed 2026-10-19 11:44:51 +00:00
1 parent 0d26916458
commit 867cc17ebf
1 file changed
+18 -10
+18 -10
View File
@@ -1,5 +1,5 @@
name: Diagnose GitHub mirror
name: Diagnose GitHub sync
on:
push:
@@ -11,16 +11,24 @@ jobs:
diagnose:
runs-on: ubuntu-latest
steps:
- name: Check source and credentials
- name: Check GitHub access
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
set -eu
echo "Triggered ref: $GITHUB_REF"
echo "Source commit: $GITHUB_SHA"
if [ -z "$GH_TOKEN" ]; then
echo "ERROR: GH_TOKEN is empty or unavailable"
exit 1
fi
echo "GitHub token is present"
git --version
REPO="tafakkur/PyNix-Website"
AUTH="$(printf 'x-access-token:%s' "$GH_TOKEN" | base64 | tr -d '\n')"
git_auth() {
git -c http.extraheader="AUTHORIZATION: basic $AUTH" "$@"
}
echo "Checking GitHub repository access..."
git_auth ls-remote \
"https://github.com/${REPO}.git" refs/heads/main
echo "Checking source commit..."
echo "$GITHUB_SHA"
echo "GitHub read access succeeded."