Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate integration of upstream changes #32

Open
janhalen opened this issue Aug 13, 2024 · 0 comments
Open

Automate integration of upstream changes #32

janhalen opened this issue Aug 13, 2024 · 0 comments

Comments

@janhalen
Copy link
Member

To automate the maintenance of this templates dependencies, it should be considered whether a "fork like“ sync method with upstream changes should be added.

It could check weekly as the dependabot checks

Something like this:

name: Update from Upstream

on:
  schedule:
    - cron: '0 0 * * 0'  # Runs weekly at midnight UTC on Sundays

jobs:
  update:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout Downstream Repository
        uses: actions/checkout@v2
        with:
          repository: your-username/your-repo
          token: ${{ secrets.GITHUB_TOKEN }}

      - name: Add Upstream Repository
        run: git remote add upstream https://github.com/upstream-username/upstream-repo.git

      - name: Fetch Upstream Changes
        run: git fetch upstream

      - name: Create Pull Request
        uses: peter-evans/create-pull-request@v3
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          commit-message: Update from upstream
          branch: update-from-upstream
          title: Update from upstream
          body: This PR updates the downstream repository with changes from the upstream repository.
          base: main
          head: upstream/main

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

No branches or pull requests

1 participant