Skip to content

Add workflow to auto-sync README.md to organization profile#1

Closed
Copilot wants to merge 3 commits into
mainfrom
copilot/featuresync-readme-md
Closed

Add workflow to auto-sync README.md to organization profile#1
Copilot wants to merge 3 commits into
mainfrom
copilot/featuresync-readme-md

Conversation

Copy link
Copy Markdown

Copilot AI commented Nov 24, 2025

Adds a GitHub Actions workflow that automatically keeps .github/profile/README.md synchronized with the repository root README.md.

Changes

  • .github/workflows/sync-profile-readme.yml: New workflow that triggers on README.md changes and via manual dispatch
    • Copies root README to profile directory
    • Commits as github-actions[bot] only when changes detected
    • Scoped to contents: write permission

Behavior

Triggers on:

  • Push events modifying README.md
  • Manual workflow_dispatch

On trigger, the workflow:

  1. Creates .github/profile/ if needed
  2. Copies README.md.github/profile/README.md
  3. Commits and pushes if diff detected

This ensures the organization profile README stays current without manual intervention.

Original prompt

Add a GitHub Actions workflow that copies the repository root README.md to .github/profile/README.md so the profile README stays in sync. Create a new branch named feature/sync-readme.md and open a pull request with the workflow file. The PR should contain only the workflow file that performs the sync; no other files are required.

Files to add:

  1. .github/workflows/sync-profile-readme.yml

Contents:

name: Sync profile README

on:
push:
paths:
- 'README.md'
workflow_dispatch: {}

jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: true
- name: Sync README to .github/profile/README.md
run: |
mkdir -p .github/profile
cp README.md .github/profile/README.md
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
if ! git diff --quiet -- .github/profile/README.md; then
git add .github/profile/README.md
git commit -m "chore: sync .github/profile/README.md from root README.md"
git push
else
echo "No changes to commit"
fi

Notes:

  • PR branch: feature/sync-readme.md
  • PR title: feature/sync-readme.md
  • This workflow will run when README.md is pushed and can be triggered manually via workflow_dispatch. It commits the copied file back to the default branch when changes are detected.

Please create the PR with just this file.

This pull request was created as a result of the following prompt from Copilot chat.

Add a GitHub Actions workflow that copies the repository root README.md to .github/profile/README.md so the profile README stays in sync. Create a new branch named feature/sync-readme.md and open a pull request with the workflow file. The PR should contain only the workflow file that performs the sync; no other files are required.

Files to add:

  1. .github/workflows/sync-profile-readme.yml

Contents:

name: Sync profile README

on:
push:
paths:
- 'README.md'
workflow_dispatch: {}

jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: true
- name: Sync README to .github/profile/README.md
run: |
mkdir -p .github/profile
cp README.md .github/profile/README.md
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
if ! git diff --quiet -- .github/profile/README.md; then
git add .github/profile/README.md
git commit -m "chore: sync .github/profile/README.md from root README.md"
git push
else
echo "No changes to commit"
fi

Notes:

  • PR branch: feature/sync-readme.md
  • PR title: feature/sync-readme.md
  • This workflow will run when README.md is pushed and can be triggered manually via workflow_dispatch. It commits the copied file back to the default branch when changes are detected.

Please create the PR with just this file.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add workflow to sync profile README Add workflow to auto-sync README.md to organization profile Nov 24, 2025
Copilot AI requested a review from PureKrome November 24, 2025 13:37
@PureKrome PureKrome closed this Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants