-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/Cmb-Minigames/CmbMinigame…
- Loading branch information
Showing
20 changed files
with
928 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Optimize resource pack | ||
on: [push] | ||
jobs: | ||
packsquash: | ||
name: Optimize resource pack | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # A non-shallow repository clone is required | ||
- name: Run PackSquash | ||
uses: ComunidadAylas/PackSquash-action@v4 | ||
with: | ||
packsquash_version: latest # Uses the latest PackSquash release supported by the action |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: 'Upload Resource Pack' | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
resource_pack_url: | ||
description: 'Resource Pack URL' | ||
required: true | ||
default: '' | ||
resource_pack_hash: | ||
description: 'Resource Pack Hash' | ||
required: true | ||
default: '' | ||
|
||
jobs: | ||
upload: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install SSH client and sshpass | ||
run: sudo apt-get update && sudo apt-get install -y openssh-client sshpass | ||
|
||
- name: Download server.properties | ||
env: | ||
SSH_USERNAME: ${{ secrets.SSH_USERNAME }} | ||
SSH_DOMAIN: ${{ secrets.SSH_DOMAIN }} | ||
SSH_PORT: ${{ secrets.SSH_PORT }} | ||
SSH_PASSWORD: ${{ secrets.SSH_PASSWORD }} | ||
run: | | ||
sshpass -p $SSH_PASSWORD sftp -o StrictHostKeyChecking=no -P $SSH_PORT $SSH_USERNAME@$SSH_DOMAIN << EOF | ||
get server.properties server.properties | ||
bye | ||
EOF | ||
- name: Update server.properties | ||
env: | ||
RESOURCE_PACK_URL: ${{ github.event.inputs.resource_pack_url }} | ||
RESOURCE_PACK_HASH: ${{ github.event.inputs.resource_pack_hash }} | ||
run: | | ||
sed -i "s|^resource-pack=.*|resource-pack=${RESOURCE_PACK_URL}|" server.properties | ||
sed -i "s|^resource-pack-sha1=.*|resource-pack-sha1=${RESOURCE_PACK_HASH}|" server.properties | ||
- name: Upload server.properties | ||
env: | ||
SSH_USERNAME: ${{ secrets.SSH_USERNAME }} | ||
SSH_DOMAIN: ${{ secrets.SSH_DOMAIN }} | ||
SSH_PORT: ${{ secrets.SSH_PORT }} | ||
SSH_PASSWORD: ${{ secrets.SSH_PASSWORD }} | ||
run: | | ||
sshpass -p $SSH_PASSWORD sftp -o StrictHostKeyChecking=no -P $SSH_PORT $SSH_USERNAME@$SSH_DOMAIN << EOF | ||
put server.properties server.properties | ||
bye | ||
EOF |
Oops, something went wrong.