Created
November 3, 2025 08:26
-
-
Save aaronedev/e4ae20e5653244c9ee9c643d3c28a0c9 to your computer and use it in GitHub Desktop.
sync workflow github fork from upstream
This file contains hidden or 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
| # yamllint disable rule:truthy | |
| # yamllint disable rule:document-start | |
| name: Sync Upstream | |
| on: | |
| schedule: | |
| - cron: "0 5 * * 0" | |
| workflow_dispatch: | |
| jobs: | |
| sync-main: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| env: | |
| UPSTREAM_REPO: https://github.com/oribarilan/lensline.nvim | |
| TARGET_BRANCH: main | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Configure git | |
| run: | | |
| git config user.name "${GITHUB_ACTOR}" | |
| git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
| - name: Merge upstream main | |
| run: | | |
| git remote add upstream "${UPSTREAM_REPO}" | |
| git fetch upstream "${TARGET_BRANCH}" | |
| git checkout "${TARGET_BRANCH}" | |
| git merge --no-edit "upstream/${TARGET_BRANCH}" | |
| - name: Push changes | |
| run: git push origin "${TARGET_BRANCH}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment