From 462739c2ef60a638b86d3ccdc2c746a8674a13eb Mon Sep 17 00:00:00 2001 From: Tim203 Date: Wed, 29 Jan 2025 12:35:57 +0100 Subject: [PATCH] Moved to a PR based system, which notifies on conflict --- .github/pull.yml | 9 +++++++ .github/workflows/publish.yml | 26 +++++++++++++++++++ .github/workflows/sync-publish.yml | 41 ------------------------------ 3 files changed, 35 insertions(+), 41 deletions(-) create mode 100644 .github/pull.yml create mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/sync-publish.yml diff --git a/.github/pull.yml b/.github/pull.yml new file mode 100644 index 0000000000..c457afb922 --- /dev/null +++ b/.github/pull.yml @@ -0,0 +1,9 @@ +version: "1" +rules: + - base: master # Target branch + upstream: SpigotMC:master # Must be in the same fork network. + mergeMethod: hardreset # Optional, one of [none, merge, squash, rebase, hardreset], Default: none. + mergeUnstable: false # merge pull request even when the mergeable_state is not clean. Default: false + conflictReviewers: # Optional, on merge conflict assign a reviewer + - Tim203 +conflictLabel: "merge-conflict" # Optional, on merge conflict assign a custom label, Default: merge-conflict \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000000..e487eb2c49 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,26 @@ +name: Sync and publish to opencollab repo + +on: + workflow_dispatch: + push: + branches: + - "master" + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + java-version: 8 + distribution: zulu + server-id: opencollab + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + - name: Publish package + run: mvn --batch-mode deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + MAVEN_USERNAME: ${{ vars.DEPLOY_USER }} + MAVEN_PASSWORD: ${{ secrets.DEPLOY_PASS }} diff --git a/.github/workflows/sync-publish.yml b/.github/workflows/sync-publish.yml deleted file mode 100644 index 8daba25e58..0000000000 --- a/.github/workflows/sync-publish.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Sync and publish to opencollab repo - -on: - schedule: - - cron: '1 18 * * *' - workflow_dispatch: - inputs: - sync_test_mode: - description: 'Test fork sync config' - type: boolean - default: false - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Sync upstream changes - id: sync - uses: aormsby/Fork-Sync-With-Upstream-action@v3.4.1 - with: - target_sync_branch: master - target_repo_token: ${{ secrets.GITHUB_TOKEN }} - upstream_sync_repo: SpigotMC/BungeeCord - upstream_sync_branch: master - test_mode: ${{ inputs.sync_test_mode }} - - uses: actions/setup-java@v4 - if: steps.sync.outputs.has_new_commits == 'true' - with: - java-version: 8 - distribution: zulu - server-id: opencollab - server-username: MAVEN_USERNAME - server-password: MAVEN_PASSWORD - - name: Publish package - if: steps.sync.outputs.has_new_commits == 'true' - run: mvn --batch-mode deploy - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - MAVEN_USERNAME: ${{ vars.DEPLOY_USER }} - MAVEN_PASSWORD: ${{ secrets.DEPLOY_PASS }}