Skip to content

Commit

Permalink
add sync-merge.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidHenryThoreau committed Oct 31, 2024
1 parent ea34503 commit 5c36d03
Showing 1 changed file with 6 additions and 32 deletions.
38 changes: 6 additions & 32 deletions .github/workflows/sync-merge.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,18 @@
name: Sync Upstream

env:
# Required, URL to upstream (fork base)
UPSTREAM_URL: "https://github.com/SamR1/FitTrackee.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.WORKFLOW_TOKEN }}
WORKFLOW_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Optional, defaults to master
UPSTREAM_BRANCH: "master"
# Optional, defaults to UPSTREAM_BRANCH
DOWNSTREAM_BRANCH: ""
# Optional fetch arguments
FETCH_ARGS: "--tags"
# Optional merge arguments
MERGE_ARGS: ""
# Optional push arguments
PUSH_ARGS: "--tags --force"
# 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 22 * * *'
# Allows manual workflow run (must in default branch to work)
- cron: '00 22 * * *'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: GitHub Sync to Upstream Repository
uses: dabreadman/sync-upstream-repo@v1.3.0
uses: rovast/sync-upstream-repo@v0.0.1
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 }}
upstream_repo: https://github.com/SamR1/FitTrackee.git
upstream_branch: master
downstream_branch: master
token: ${{ secrets.PAT_TOKEN }}

0 comments on commit 5c36d03

Please sign in to comment.