This commit is contained in:
1 parent
da2a978e3e
commit
aec451d103
1 file changed
+27
@@ -61,3 +61,30 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
git commit -m "chore: refresh profile README"
|
git commit -m "chore: refresh profile README"
|
||||||
git push
|
git push
|
||||||
|
|
||||||
|
# Mirrors README.md to the GitHub profile repo (jonbranan/jonbranan).
|
||||||
|
# Generation has to happen here: the Komodo and Vikunja blocks read
|
||||||
|
# 10.5.0.3, which a GitHub-hosted runner cannot reach. No-op until the
|
||||||
|
# GH_PROFILE_TOKEN secret exists.
|
||||||
|
- name: Mirror to GitHub
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
|
env:
|
||||||
|
GH_PROFILE_TOKEN: ${{ secrets.GH_PROFILE_TOKEN }}
|
||||||
|
run: |
|
||||||
|
if [ -z "$GH_PROFILE_TOKEN" ]; then
|
||||||
|
echo "GH_PROFILE_TOKEN not set - skipping GitHub mirror"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
rm -rf /tmp/gh-profile
|
||||||
|
git clone --depth 1 https://github.com/jonbranan/jonbranan.git /tmp/gh-profile
|
||||||
|
cp README.md /tmp/gh-profile/README.md
|
||||||
|
cd /tmp/gh-profile
|
||||||
|
git config user.name trex
|
||||||
|
git config user.email nanobot@jonb.io
|
||||||
|
git add README.md
|
||||||
|
if git diff --cached --quiet; then
|
||||||
|
echo "GitHub README already current"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
git commit -m "chore: sync profile README from git.jonb.io"
|
||||||
|
git push "https://x-access-token:${GH_PROFILE_TOKEN}@github.com/jonbranan/jonbranan.git" HEAD:main
|
||||||
Reference in new issue
Block a user