From cd3b4f630267db0b0b30a4f550eb501cffb6e8a8 Mon Sep 17 00:00:00 2001 From: "dabreadman (YI XIANG TAN)" <43485369+dabreadman@users.noreply.github.com> Date: Sun, 24 Oct 2021 02:19:09 +0100 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..b3a6fd9a --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,41 @@ +# Template to sync with upstream +name: Sync Upstream + +env: + # Required, URL to upstream (fork base) + UPSTREAM_URL: "https://github.com/Footsiefat/zspotify.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 }} + # Required, is usually "master" or "main" + UPSTREAM_BRANCH: "main" + # Optional, defaults to UPSTREAM_BRANCH + DOWNSTREAM_BRANCH: "" + # Optional merge arguments + MERGE_ARGS: "" + # Optional push arguments + PUSH_ARGS: "" + +# This runs every day on 1801 UTC +on: + # Or on push, if for mirror it runs on workflow setup and changes + push: + schedule: + - cron: '1 18 * * *' + # 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/sync-upstream-repo@v1.0.0.b + with: + 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 }} +