diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 965bcbd..2042481 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -6,7 +6,8 @@ on: jobs: auto-release: runs-on: ubuntu-latest - if: github.repository == 'itzg/docker-minecraft-bedrock-server' + # If forked, changed to your username to enable auto-releases + if: github.repository_owner == 'itzg' permissions: # allow for creating releases/tags contents: write diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ca488e4..6da0e7c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,9 +24,11 @@ on: jobs: build: runs-on: ubuntu-latest - if: github.repository == 'itzg/docker-minecraft-bedrock-server' env: IMAGE_BASE_NAME: minecraft-bedrock-server + # Assume they line up, but when forked change to your Docker Hub username + DOCKER_HUB_ORG: ${{ github.repository_owner }} + PUSH: ${{ github.repository_owner == 'itzg' }} steps: - name: Set up QEMU @@ -36,14 +38,14 @@ jobs: uses: docker/setup-buildx-action@v2 - name: Login to DockerHub - if: github.event_name != 'pull_request' + if: env.PUSH && github.event_name != 'pull_request' uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_USER }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to GHCR - if: github.event_name != 'pull_request' + if: env.PUSH && github.event_name != 'pull_request' uses: docker/login-action@v3.6.0 with: registry: ghcr.io @@ -69,7 +71,7 @@ jobs: - name: Build and push uses: docker/build-push-action@v4 with: - push: ${{ github.event_name != 'pull_request' }} + push: ${{ env.PUSH && github.event_name != 'pull_request' }} provenance: false platforms: linux/amd64,linux/arm64 tags: ${{ steps.meta.outputs.tags }} diff --git a/.github/workflows/issues-notify.yml b/.github/workflows/issues-notify.yml index b8f976a..f93bbe9 100644 --- a/.github/workflows/issues-notify.yml +++ b/.github/workflows/issues-notify.yml @@ -10,6 +10,7 @@ on: jobs: notify: + if: github.repository_owner == 'itzg' uses: itzg/github-workflows/.github/workflows/issues-notify-discord.yml@main secrets: discordWebhook: "${{secrets.DISCORD_ISSUES_WEBHOOK}}" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..e69de29 diff --git a/examples/two-servers/compose.yml b/examples/two-servers/compose.yml new file mode 100644 index 0000000..1278552 --- /dev/null +++ b/examples/two-servers/compose.yml @@ -0,0 +1,13 @@ +services: + bds1: + image: itzg/minecraft-bedrock-server + environment: + EULA: true + ports: + - "19111:19132/udp" + bds2: + image: itzg/minecraft-bedrock-server + environment: + EULA: true + ports: + - "19222:19132/udp" \ No newline at end of file