mirror of
https://github.com/CivMC/Civ.git
synced 2026-07-18 00:20:44 +00:00
fix stacks and add faster minecraft deployment
This commit is contained in:
48
.github/workflows/ansible_update_server_minecraft.yml
vendored
Normal file
48
.github/workflows/ansible_update_server_minecraft.yml
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
name: 🏗️ Ansible | Update Server (Minecraft)
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
environment:
|
||||
description: 'Environment to Update'
|
||||
type: environment
|
||||
required: true
|
||||
default: Test
|
||||
|
||||
jobs:
|
||||
update-server:
|
||||
runs-on: ubuntu-latest
|
||||
environment: ${{inputs.environment}}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: ☕ Setup Java
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: 🐘 Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
|
||||
- name: 🐘 Gradle Build
|
||||
run: CI=true ./gradlew :ansible:build
|
||||
|
||||
- name: Inject secrets
|
||||
run: 'echo "$SECRETS_YML" > variables/secrets.yml'
|
||||
shell: bash
|
||||
working-directory: ./ansible
|
||||
env:
|
||||
SECRETS_YML: ${{secrets.SECRETS_YML}}
|
||||
SUDO_PASSWORD: ${{secrets.SUDO_PASSWORD}}
|
||||
|
||||
- name: Update Server (Minecraft)
|
||||
uses: dawidd6/action-ansible-playbook@v2
|
||||
with:
|
||||
playbook: ansible/playbooks/update-server-minecraft.yml
|
||||
requirements: ansible/requirements.yml
|
||||
key: ${{secrets.SSH_PRIVATE_KEY}}
|
||||
known_hosts: ${{secrets.SSH_KNOWN_HOSTS}}
|
||||
options: |
|
||||
--inventory ./ansible/inventories/civmc-${{inputs.environment}}.yml
|
||||
-e "ansible_become_password=${{secrets.SUDO_PASSWORD}}"
|
||||
Reference in New Issue
Block a user