From ba676c620fdd90fb53061c4270ea1973bd84c4b0 Mon Sep 17 00:00:00 2001 From: Vishwajeet Yadav Date: Sun, 28 Apr 2024 20:29:43 +0530 Subject: [PATCH] Merge pull request #4 from consumet/main feat(gogoanime): get direct download links from download url (#598) --- .github/workflows/Sync with Upstream.yml | 45 ++++++++++++++++++++++++ .github/workflows/sync.yml | 32 +++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 .github/workflows/Sync with Upstream.yml create mode 100644 .github/workflows/sync.yml diff --git a/.github/workflows/Sync with Upstream.yml b/.github/workflows/Sync with Upstream.yml new file mode 100644 index 00000000..9d35ffa0 --- /dev/null +++ b/.github/workflows/Sync with Upstream.yml @@ -0,0 +1,45 @@ +name: Sync with Upstream + +on: + schedule: + - cron: '0 8 * * *' # Run every day at 8 AM UTC + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set Git identity + run: | + git config --global user.name "VISHWAJ33T" + git config --global user.email "vishwajeety14122@gmail.com" + + - name: Add upstream remote + run: | + if ! git remote | grep -q '^upstream$'; then + git remote add upstream https://github.com/consumet/api.consumet.org + fi + + - name: Fetch upstream changes + run: | + git fetch upstream + + - name: Rebase changes + run: | + if ! git rebase upstream/main; then + echo "Rebase failed, resolving conflicts..." + if ! git rebase --abort; then + echo "Error: Rebase abort failed" + exit 1 + fi + exit 1 + fi + + - name: Push changes + run: | + if ! git push origin HEAD --force-with-lease; then + echo "Push failed, force push might be required" + exit 1 + fi diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml new file mode 100644 index 00000000..d67ce5ad --- /dev/null +++ b/.github/workflows/sync.yml @@ -0,0 +1,32 @@ +name: Sync with Upstream + +on: + schedule: + - cron: '0 8 * * *' # Run every day at 8 AM UTC + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set Git identity + run: | + git config --global user.name "VISHWAJ33T" + git config --global user.email "vishwajeety14122@gmail.com" + + - name: Add upstream remote + run: git remote add upstream https://github.com/consumet/api.consumet.org + env: + UPSTREAM_REPO_URL: https://github.com/consumet/api.consumet.org + + - name: Fetch upstream changes + run: git fetch upstream + + - name: Rebase changes + run: git rebase upstream/main + + - name: Push changes + run: | + git push origin HEAD --force-with-lease \ No newline at end of file