This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
env: | |
GH_TOKEN: ${{ secrets.REPOSITORY_TOKEN }} | |
run: | | |
BASE_BRANCH=${{ github.event.pull_request.base.ref }} | |
gh auth login --with-token <<< "$GH_TOKEN" | |
echo $BASE_BRANCH | |
gh repo sync adskyiproger/poc-core-test-my --branch main | |
gh auth logout": |