Skip to content

Sync profile README

Sync profile README #2

name: Sync profile README
on:
push:
paths:
- 'README.md'
workflow_dispatch: {}
permissions:
contents: write
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: true
- name: Create folder
run : mkdir -p .github/profile
- name: Copy README.md to .github/profile/README.md
run: cp README.md .github/profile/README.md
- name: Commit changes if there are any
run: |
if ! git diff --quiet -- .github/profile/README.md; then
git add .github/profile/README.md
# Use the triggering actor for the commit author/committer (applied only to this commit)
git -c user.name="${{ github.actor }}" -c user.email="${{ github.actor }}@users.noreply.github.com" commit -m "chore: sync .github/profile/README.md from root README.md"
git push
else
echo "No changes to commit"
fi