From ac2b230c171216c1977e50f62adfc624b90cecff Mon Sep 17 00:00:00 2001 From: David Schall Date: Sat, 10 Dec 2022 09:35:07 +0000 Subject: [PATCH] Workflow to update remote repository --- .github/workflows/update_remote.yml | 30 +++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/update_remote.yml diff --git a/.github/workflows/update_remote.yml b/.github/workflows/update_remote.yml new file mode 100644 index 0000000000..73d79f59b5 --- /dev/null +++ b/.github/workflows/update_remote.yml @@ -0,0 +1,30 @@ +name: Pull upstream automatically from https://gem5.googlesource.com/public/gem5 + +on: + # Possibility to run it manually + workflow_dispatch: + # Automated + schedule: + # Run this every day at 02:22 UTC + - cron: '22 2 1 * *' + + +jobs: + build: + runs-on: ubuntu-latest + + steps: + # Checkout the current repo + - uses: actions/checkout@v3 + # Fetch the history and unshallow the repo so that it can be used + - name: Fetch all history for all tags and branches + run: git fetch --prune --unshallow + # Pull the detached remote and do the magic + - name: Pull Detached Remote + uses: litetex/pull-detached-remote@ + with: + upstreamrepo: https://gem5.googlesource.com/public/gem5 + upstreambranch: master + env: + GITHUB_PAT: ${{ secrets.GH_PAT }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}