initial creation of new config type
This commit is contained in:
@@ -16,31 +16,31 @@ jobs:
|
||||
path: .
|
||||
|
||||
- name: Transfer files
|
||||
uses: burnett01/rsync-deployments@7.0.1
|
||||
uses: burnett01/rsync-deployments@8.0.4
|
||||
with:
|
||||
switches: -azvr --delete --exclude=".gitignore" --exclude=".git" --exclude=".gitea" --exclude="data" --exclude=".env"
|
||||
path: .
|
||||
remote_path: /home/${{ secrets.USERNAME }}/minecraft-server-example-folder
|
||||
remote_path: /home/${{ secrets.USERNAME }}/minecraft-server-ironveil
|
||||
remote_host: ${{ secrets.HOST }}
|
||||
remote_user: ${{ secrets.USERNAME }}
|
||||
remote_key: ${{ secrets.KEY }}
|
||||
|
||||
- name: Stop container
|
||||
uses: appleboy/ssh-action@v1.2.0
|
||||
uses: appleboy/ssh-action@v1.2.5
|
||||
with:
|
||||
host: ${{ secrets.host }}
|
||||
username: ${{ secrets.USERNAME }}
|
||||
key: ${{ secrets.KEY }}
|
||||
script: |
|
||||
cd minecraft-server-example-folder
|
||||
cd minecraft-server-ironveil
|
||||
docker compose down
|
||||
|
||||
- name: Start container
|
||||
uses: appleboy/ssh-action@v1.2.0
|
||||
uses: appleboy/ssh-action@v1.2.5
|
||||
with:
|
||||
host: ${{ secrets.host }}
|
||||
username: ${{ secrets.USERNAME }}
|
||||
key: ${{ secrets.KEY }}
|
||||
script: |
|
||||
cd minecraft-server-example-folder
|
||||
cd minecraft-server-ironveil
|
||||
docker compose up -d
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
name: Build and Publish Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v[0-9]+.[0-9]+.[0-9]+
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKER_USERNAME }}/ironveil:${{ github.ref_name }}
|
||||
@@ -9,11 +9,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Restart container
|
||||
uses: appleboy/ssh-action@v1.2.0
|
||||
uses: appleboy/ssh-action@v1.2.5
|
||||
with:
|
||||
host: ${{ secrets.host }}
|
||||
username: ${{ secrets.USERNAME }}
|
||||
key: ${{ secrets.KEY }}
|
||||
script: |
|
||||
cd minecraft-server-example-folder
|
||||
cd minecraft-server-ironveil
|
||||
docker compose restart
|
||||
|
||||
Reference in New Issue
Block a user