Skip to content

Update Fork

Update Fork #497

Workflow file for this run

name: Update Fork
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
auto-update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.PAT }} # So that the workflow triggers on fork update
- uses: fregante/setup-git-user@v2
- name: Check if fork is synced with upstream
id: check_sync
uses: MadLadSquad/[email protected]
with:
upstream-url: "https://github.com/iJSD-Org/IacDiscordNotifs"
first-branch: main
second-branch: main
- name: Rebase on top of base branch
if: steps.check_sync.outputs.behind > 0
run: |
git remote add upstream https://github.com/iJSD-Org/IacDiscordNotifs
git fetch upstream
git rebase upstream/main
git commit --amend --no-edit
git push -f