Skip to content

Sync Upstream

Sync Upstream #28

Workflow file for this run

name: Sync Upstream
on:
workflow_dispatch:
schedule:
- cron: "22 2 * * *"
jobs:
syncDocs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Reset the default branch with upstream changes
run: |
git remote add upstream https://github.com/zwoo-hq/docs.git
git fetch upstream main:upstream-main
git reset --hard upstream-main
- name: Get current date
id: date
run: echo "DATE=$(date +'%m/%d/%Y')" >> $GITHUB_OUTPUT
- name: Check for unpushed commits
id: check_unpushed
run: |
git diff --exit-code || echo "HAS_COMMITS=true" >> $GITHUB_OUTPUT
- name: Create Pull Request
if: ${{ steps.check_unpushed.outputs.HAS_COMMITS == 'true' }}
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.WORKFLOW_TOKEN }}
branch: upstream-changes
branch-suffix: short-commit-hash
assignees: fabiankachlock
title: "chore(sync): with upstream changes"
body: |
# Sync Upstream Changes
Synced changes as of ${{ steps.date.outputs.DATE }}.
This PR is automatically created by the [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action.