Skip to content

Commit

Permalink
Auto fetch from upstream and merge
Browse files Browse the repository at this point in the history
  • Loading branch information
CertificationSurya authored Nov 3, 2023
1 parent eaa6c22 commit 61b1326
Showing 1 changed file with 23 additions and 12 deletions.
35 changes: 23 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
name: Auto sync forked repo
---
name: Sync Forked Repo

env:
UPSTREAM_URL: "https://github.com/simranlotey/programs.git"
WORKFLOW_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
UPSTREAM_BRANCH: "master"
DOWNSTREAM_BRANCH: "master"
MERGE_ARGS: ""
PUSH_ARGS: ""

on:
schedule:
- cron: '55 23 * * *' # runs at 11:55 pm
push:
branches:
- master
- cron: '55 23 * * *'
# Allows manual workflow run (must in default branch to work)
workflow_dispatch:

jobs:
Github_Workflow_Sync:
build:
runs-on: ubuntu-latest
steps:
- name: Sync and merge upstream repository with your current repository
uses: dabreadman/sync-upstream-repo@v1.0.0.b
- name: GitHub Sync to Upstream Repository
uses: dabreadman/sync-upstream-repo@v1.2.0.b
with:
upstream_repo: "https://github.com/simranlotey/programs.git"
upstream_branch: master
downstream_branch: master
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
upstream_repo: ${{ env.UPSTREAM_URL }}
upstream_branch: ${{ env.UPSTREAM_BRANCH }}
downstream_branch: ${{ env.DOWNSTREAM_BRANCH }}
token: ${{ env.WORKFLOW_TOKEN }}
merge_args: ${{ env.MERGE_ARGS }}
push_args: ${{ env.PUSH_ARGS }}

0 comments on commit 61b1326

Please sign in to comment.