Skip to content

move patch package dep to root since we want to patch for any workspa… #32

move patch package dep to root since we want to patch for any workspa…

move patch package dep to root since we want to patch for any workspa… #32

name: Mirror react-router-busy to Own Repo
on:
push:
schedule:
# Only sync to destination once a week
- cron: '0 0 * * 0'
pull_request_target:
# TODO Call when a PR affecting this package is merged or release is made
jobs:
move-code:
# Just don't run push in monorepo since we use cron there
# Still run on push in destination repo since it might be needed
# Note PR opened in dest repo pushes commit to source repo and now it's not run, doesn't seem to matter but if it does check actor
# And when PR merged in source, it still closes PR in destination but doesn't update destination repo
# if: github.event_name != 'push' || github.repository != 'bitofbreeze/mono'
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run Copybara
uses: bitofbreeze/copybara-action@main
with:
access_token: ${{ secrets.COPY_GITHUB_REPO_TOKEN }}
ssh_key: ${{ secrets.COPY_SSH_KEY_RR_BUSY }}
sot_repo: bitofbreeze/mono
destination_repo: bitofbreeze/react-router-busy
push_files: "glob(['**'], exclude = ['apps/**', 'packages/**', '.github/workflows/*.yml']) + glob(['packages/react-router-busy/**', '.github/workflows/packages.react-router-busy.*.yml'])"
# TODO Test if not doing squash shows commits in destination when not touching this package
push_mode: "ITERATIVE"
# Make sure to always remove init-history after first copybara push, else PRs created in destination will fail the workflow since --init-history is not compatible with CHANGE_REQUEST
# copybara_options: --init-history