From 8d9bef3f3cf281a5f337309a706e7d66c7ac666f 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 ++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/Sync with Upstream.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