From c6be47b0fa74ec5804987e00f6bcc6dc86258ca9 Mon Sep 17 00:00:00 2001 From: xMikux <26039249+xMikux@users.noreply.github.com> Date: Fri, 13 Sep 2024 13:15:58 +0800 Subject: [PATCH] test: add more debug --- .github/compose/docker-compose.yml | 6 +-- .github/workflows/resuable_ia.yml | 61 +++++++++++++++++++++++------- 2 files changed, 50 insertions(+), 17 deletions(-) diff --git a/.github/compose/docker-compose.yml b/.github/compose/docker-compose.yml index e4d8d6a0..07121f91 100644 --- a/.github/compose/docker-compose.yml +++ b/.github/compose/docker-compose.yml @@ -3,9 +3,9 @@ services: container_name: itemsadder_server image: ghcr.io/xmikux/itemsadder-image:latest volumes: - # - type: bind - # source: ${PWD}/external - # target: /app/external + - type: bind + source: ${PWD}/external + target: /app/external - type: bind source: ${PWD}/Resourcepack/contents target: /app/plugins/ItemsAdder/contents diff --git a/.github/workflows/resuable_ia.yml b/.github/workflows/resuable_ia.yml index fd9bd6cc..659ec6d2 100644 --- a/.github/workflows/resuable_ia.yml +++ b/.github/workflows/resuable_ia.yml @@ -24,17 +24,29 @@ jobs: with: fetch-depth: 0 - # - name: Setup - S3cmd Cli Tool - # uses: s3-actions/s3cmd@v1.7.0 - # with: - # provider: "vultr" - # region: "sgp1" - # access_key: ${{ secrets.S3_ACCESS_KEY }} - # secret_key: ${{ secrets.S3_SECRET_KEY }} - - # - name: S3 - Download Plugins - # run: | - # s3cmd get s3://${{ secrets.S3_BUCKET_NAME }}/itemsaddres maps-cache-data.tar.xz + - name: Setup - S3cmd Cli Tool + uses: s3-actions/s3cmd@v1.7.0 + with: + provider: "vultr" + region: "sgp1" + access_key: ${{ secrets.S3_ACCESS_KEY }} + secret_key: ${{ secrets.S3_SECRET_KEY }} + + - + name: Setup - mcrcon + run: | + mkdir tools + cd tools || exit 1 + wget -O mcrcon.tar.gz https://github.com/Tiiffi/mcrcon/releases/download/v0.7.2/mcrcon-0.7.2-linux-x86-64.tar.gz + tar xzvf mcrcon.tar.gz + rm LICENSE mcrcon.tar.gz + working-directory: .github + + + - name: S3 - Download Plugins + run: | + mkdir external + s3cmd get s3://${{ secrets.S3_BUCKET_NAME }}/itemsadder/ItemsAdder.jar external/ItemsAdder.jar - name: Setup - IA Minecraft Server @@ -50,8 +62,29 @@ jobs: with: container-name: itemsadder_server timeout: 60 - - - name: DEBUG - Get compose log + + - + name: mcrcon - Run IA commands + run: | + $GITHUB_WORKSPACE/.github/tools/mcrcon -w 10 "iareload" "iazip" + env: + MCRCON_PASS: ${{ secrets.RCON_PASSWORD }} + + - + name: DEBUG - Get compose log run: | docker compose -f .github/compose/docker-compose.yml logs > .github/compose.log - cat .github/compose.log + + - + name: DEBUG - Upload compose log + uses: actions/upload-artifact@v4 + with: + name: compose-log + path: .github/compose.log + + - + name: DEBUG - Upload generated pack + uses: actions/upload-artifact@v4 + with: + name: ia_generatedpack + path: output/*.zip