Skip to content

Commit

Permalink
Remove manager
Browse files Browse the repository at this point in the history
  • Loading branch information
rtm516 committed Aug 23, 2024
1 parent 3b395d7 commit 9a3d0c1
Show file tree
Hide file tree
Showing 98 changed files with 24 additions and 9,105 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/manager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Trigger Manager Build
on:
push:
branches:
- "master"
paths-ignore:
- '.gitignore'
- 'egg-m-c-xbox-broadcast.json'
- 'LICENSE'
- 'README.md'
- 'bootstrap/**'

jobs:
trigger:
runs-on: ubuntu-latest
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.TRIGGER_PAT }}
repository: MCXboxBroadcast/Manager
event-type: manager-build-event
32 changes: 0 additions & 32 deletions .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,6 @@ on:
- 'README.md'

jobs:
build-ui:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
working-directory: bootstrap\manager\src\ui
- name: Build
run: npm run build
working-directory: bootstrap\manager\src\ui
- uses: actions/upload-artifact@v4
if: success()
with:
name: UI
path: bootstrap\manager\src\ui\dist
if-no-files-found: error

build:
runs-on: ubuntu-latest
steps:
Expand All @@ -40,11 +19,6 @@ jobs:
distribution: temurin
- name: Checkout repository
uses: actions/checkout@v4
- name: Download UI
uses: actions/download-artifact@v4
with:
name: UI
path: bootstrap/manager/src/main/resources/static
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v3
- name: Set up JDK 17
Expand All @@ -70,9 +44,3 @@ jobs:
name: MCXboxBroadcastStandalone
path: bootstrap/standalone/build/libs/MCXboxBroadcastStandalone.jar
if-no-files-found: error
- uses: actions/upload-artifact@v4
if: success()
with:
name: MCXboxBroadcastManager
path: bootstrap/manager/build/libs/MCXboxBroadcastManager.jar
if-no-files-found: error
72 changes: 2 additions & 70 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,44 +11,16 @@ on:

env:
DOCKER_OWNER: ${{ github.repository_owner }}
DOCKER_CONTAINER: mcxboxbroadcast
DOCKER_CONTAINER_MANAGER: mcxboxbroadcast-manager
DOCKER_CONTAINER: standalone
DOCKER_TAG: ${{ github.ref_name }}

jobs:
build-ui:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
working-directory: bootstrap/manager/src/ui
- name: Build
run: npm run build
working-directory: bootstrap/manager/src/ui
- uses: actions/upload-artifact@v4
if: success()
with:
name: UI
path: bootstrap/manager/src/ui/dist
if-no-files-found: error

build:
needs: build-ui
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download UI
uses: actions/download-artifact@v4
with:
name: UI
path: bootstrap/manager/src/main/resources/static
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v3
- name: Set up JDK 17
Expand Down Expand Up @@ -87,12 +59,6 @@ jobs:
name: MCXboxBroadcastStandalone
path: bootstrap/standalone/build/libs/MCXboxBroadcastStandalone.jar
if-no-files-found: error
- uses: actions/upload-artifact@v4
if: success()
with:
name: MCXboxBroadcastManager
path: bootstrap/manager/build/libs/MCXboxBroadcastManager.jar
if-no-files-found: error
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
Expand All @@ -111,7 +77,7 @@ jobs:
uses: ncipollo/release-action@v1
if: success()
with:
artifacts: "bootstrap/geyser/build/libs/MCXboxBroadcastExtension.jar,bootstrap/standalone/build/libs/MCXboxBroadcastStandalone.jar,bootstrap/manager/build/libs/MCXboxBroadcastManager.jar,egg-m-c-xbox-broadcast.json"
artifacts: "bootstrap/geyser/build/libs/MCXboxBroadcastExtension.jar,bootstrap/standalone/build/libs/MCXboxBroadcastStandalone.jar,egg-m-c-xbox-broadcast.json"
allowUpdates: true
bodyFile: "release_notes.md"
draft: false
Expand Down Expand Up @@ -153,37 +119,3 @@ jobs:
run: |
[[ "${{ github.ref }}" == "refs/heads/master" ]] && docker push ghcr.io/$DOCKER_OWNER/$DOCKER_CONTAINER:latest
docker push ghcr.io/$DOCKER_OWNER/$DOCKER_CONTAINER:$DOCKER_TAG
docker-manager:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: MCXboxBroadcastManager
path: bootstrap/manager/build/libs
- name: Fix Docker environment variables
run: |
# Make lowercase
echo "DOCKER_OWNER=$(echo $DOCKER_OWNER | tr '[A-Z]' '[a-z]')" >> $GITHUB_ENV
echo "DOCKER_CONTAINER_MANAGER=$(echo $DOCKER_CONTAINER_MANAGER | tr '[A-Z]' '[a-z]')" >> $GITHUB_ENV
echo "DOCKER_TAG=$(echo $DOCKER_TAG | tr '[A-Z]' '[a-z]')" >> $GITHUB_ENV
# Replace / with _
echo "DOCKER_TAG=$(echo $DOCKER_TAG | sed -e 's/\//_/g')" >> $GITHUB_ENV
- name: Build the Docker image
run: |
docker build . --file bootstrap/manager/Dockerfile --tag $DOCKER_CONTAINER_MANAGER:$DOCKER_TAG
[[ "${{ github.ref }}" == "refs/heads/master" ]] && docker tag $DOCKER_CONTAINER_MANAGER:$DOCKER_TAG ghcr.io/$DOCKER_OWNER/$DOCKER_CONTAINER_MANAGER:latest
docker tag $DOCKER_CONTAINER_MANAGER:$DOCKER_TAG ghcr.io/$DOCKER_OWNER/$DOCKER_CONTAINER_MANAGER:$DOCKER_TAG
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin

- name: Push to GHCR
run: |
[[ "${{ github.ref }}" == "refs/heads/master" ]] && docker push ghcr.io/$DOCKER_OWNER/$DOCKER_CONTAINER_MANAGER:latest
docker push ghcr.io/$DOCKER_OWNER/$DOCKER_CONTAINER_MANAGER:$DOCKER_TAG
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -256,4 +256,3 @@ gradle-app.setting
# End of https://www.toptal.com/developers/gitignore/api/git,java,gradle,eclipse,netbeans,jetbrains+all,visualstudiocode

run/
run-manager/
37 changes: 0 additions & 37 deletions bootstrap/manager/.gitignore

This file was deleted.

14 changes: 0 additions & 14 deletions bootstrap/manager/Dockerfile

This file was deleted.

21 changes: 0 additions & 21 deletions bootstrap/manager/README.md

This file was deleted.

29 changes: 0 additions & 29 deletions bootstrap/manager/build.gradle.kts

This file was deleted.

21 changes: 0 additions & 21 deletions bootstrap/manager/docker-compose.yml

This file was deleted.

This file was deleted.

Loading

0 comments on commit 9a3d0c1

Please sign in to comment.