Skip to content

Automate integration of upstream changes #32

@janhalen

Description

@janhalen

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions