This commit is contained in:
1 parent
572c4b2bd1
commit
f5230de24e
1 file changed
-34
@@ -1,34 +0,0 @@
|
|||||||
|
|
||||||
name: Diagnose GitHub sync
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
diagnose:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Check GitHub access
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
||||||
run: |
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
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."
|
|
||||||
Reference in new issue
Block a user