From 73fc7e1997c1f665fc2d813cde7f90d5c6a0215c Mon Sep 17 00:00:00 2001 From: themodernhakr Date: Wed, 26 Feb 2025 11:37:21 -0600 Subject: [PATCH 1/5] add action workflow --- action.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 action.yaml diff --git a/action.yaml b/action.yaml new file mode 100644 index 0000000..5a41dc2 --- /dev/null +++ b/action.yaml @@ -0,0 +1,15 @@ +name: remote ssh command +on: [push] +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: executing remote ssh commands using password + uses: appleboy/ssh-action@v1.2.1 + with: + host: ${{ secrets.HOST }} + username: linuxserver.io + password: ${{ secrets.PASSWORD }} + port: ${{ secrets.PORT }} + script: whoami From b6cf09bb6aef4bc3746ceccef4034f10193befea Mon Sep 17 00:00:00 2001 From: themodernhakr Date: Wed, 26 Feb 2025 11:40:53 -0600 Subject: [PATCH 2/5] move workflow to correct directory --- action.yaml => .gitea/workflows/action.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename action.yaml => .gitea/workflows/action.yaml (100%) diff --git a/action.yaml b/.gitea/workflows/action.yaml similarity index 100% rename from action.yaml rename to .gitea/workflows/action.yaml From 183b1b689cba8a7ea93e5ac514385252bc821d94 Mon Sep 17 00:00:00 2001 From: ehrumsey Date: Wed, 26 Feb 2025 11:46:35 -0600 Subject: [PATCH 3/5] change name and username for workflow --- .gitea/workflows/action.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index 5a41dc2..630154a 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -5,11 +5,11 @@ jobs: name: Build runs-on: ubuntu-latest steps: - - name: executing remote ssh commands using password + - name: update server datapack folder uses: appleboy/ssh-action@v1.2.1 with: host: ${{ secrets.HOST }} - username: linuxserver.io + username: sadmin password: ${{ secrets.PASSWORD }} port: ${{ secrets.PORT }} script: whoami From c2e0cf3e2d824182b3c22d92e8647dcb8b162a37 Mon Sep 17 00:00:00 2001 From: themodernhakr Date: Wed, 26 Feb 2025 13:24:27 -0600 Subject: [PATCH 4/5] limit action to master pr's and move script to file --- action.yaml | 17 +++++++++++++++++ scripts/update_servers.sh | 1 + 2 files changed, 18 insertions(+) create mode 100644 action.yaml create mode 100644 scripts/update_servers.sh diff --git a/action.yaml b/action.yaml new file mode 100644 index 0000000..f0d8a30 --- /dev/null +++ b/action.yaml @@ -0,0 +1,17 @@ +name: remote ssh command +on: + pull_request: + branches: master +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: executing remote ssh commands using password + uses: appleboy/ssh-action@v1.2.1 + with: + host: ${{ secrets.HOST }} + username: linuxserver.io + password: ${{ secrets.PASSWORD }} + port: ${{ secrets.PORT }} + script_path: scripts/update_servers.sh diff --git a/scripts/update_servers.sh b/scripts/update_servers.sh new file mode 100644 index 0000000..5c0132d --- /dev/null +++ b/scripts/update_servers.sh @@ -0,0 +1 @@ +whoami From 439f59c9c1b5179f9d84e963ae5862ed3fe72cee Mon Sep 17 00:00:00 2001 From: themodernhakr Date: Wed, 26 Feb 2025 13:32:25 -0600 Subject: [PATCH 5/5] rename workflow and steps --- action.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yaml b/action.yaml index f0d8a30..ad4e05a 100644 --- a/action.yaml +++ b/action.yaml @@ -1,4 +1,4 @@ -name: remote ssh command +name: Deploy datapack to prod on: pull_request: branches: master @@ -7,7 +7,7 @@ jobs: name: Build runs-on: ubuntu-latest steps: - - name: executing remote ssh commands using password + - name: Updating prod servers... uses: appleboy/ssh-action@v1.2.1 with: host: ${{ secrets.HOST }}