Skip to content
name: Sync Changes to Fork
on:
pull_request:
types:
- closed
jobs:
sync_fork:
if: ${{ github.event.pull_request.merged == true }}
runs-on: ubuntu-latest
steps:
- name: Checkout foo repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.ref }}
# - name: Set up GitHub CLI
# uses: cli/setup-gh@v1
# with:
# version: latest
- name: Configure Git
run: |
git config user.email "actions@github.com"
git config user.name "GitHub Actions"
- name: Sync Fork
run: |
BASE_BRANCH=${{ github.event.pull_request.base.ref }}
gh auth login
gh auth refresh -s workflow
gh repo sync adskyiproger/poc-core-test-my --branch ${BASE_BRANCH}
gh auth logout