Skip to content

Commit

Permalink
Add upstreamSync action
Browse files Browse the repository at this point in the history
Add upstreamSync action

Add upstreamSync action

Add upstreamSync action

Add upstreamSync action

Add upstreamSync action
  • Loading branch information
ferben committed Jan 1, 2024
1 parent 8cb4c96 commit 40db2e2
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/upstreamSync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Sync Upstream

env:
# Required, URL to upstream (fork base)
UPSTREAM_URL: "https://github.com/aonez/Keka.git"
# Required, token to authenticate bot, could use ${{ secrets.GITHUB_TOKEN }}
# Over here, we use a PAT instead to authenticate workflow file changes.
WORKFLOW_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Optional, defaults to main
UPSTREAM_BRANCH: "master"
# Optional, defaults to UPSTREAM_BRANCH
DOWNSTREAM_BRANCH: "master"
# Optional fetch arguments
FETCH_ARGS: ""
# Optional merge arguments
MERGE_ARGS: ""
# Optional push arguments
PUSH_ARGS: ""
# Optional toggle to spawn time logs (keeps action active)
SPAWN_LOGS: "false" # "true" or "false"

# This runs every day on 1801 UTC
on:
schedule:
- cron: "0 16 * * *"
# Allows manual workflow run (must in default branch to work)
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: GitHub Sync to Upstream Repository
uses: dabreadman/[email protected]
with:
upstream_repo: ${{ env.UPSTREAM_URL }}
upstream_branch: ${{ env.UPSTREAM_BRANCH }}
downstream_branch: ${{ env.DOWNSTREAM_BRANCH }}
token: ${{ env.WORKFLOW_TOKEN }}
fetch_args: ${{ env.FETCH_ARGS }}
merge_args: ${{ env.MERGE_ARGS }}
push_args: ${{ env.PUSH_ARGS }}
spawn_logs: ${{ env.SPAWN_LOGS }}

0 comments on commit 40db2e2

Please sign in to comment.