From 50b3814ee1666f626495f9979f4e04ea16075239 Mon Sep 17 00:00:00 2001 From: TheiLLeniumStudios <104288623+TheiLLeniumStudios@users.noreply.github.com> Date: Thu, 9 Feb 2023 16:11:02 +0000 Subject: [PATCH] Add curl to dockerfile --- Dockerfile | 2 +- example-pipelines/frw-sftp.yaml | 36 +++++++++++++++++++++++++++++++++ example-pipelines/frw.yaml | 36 +++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 example-pipelines/frw-sftp.yaml create mode 100644 example-pipelines/frw.yaml diff --git a/Dockerfile b/Dockerfile index 8eebf34..11877dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Container image that runs your code FROM alpine:3.17 -RUN apk add --no-cache git jq +RUN apk add --no-cache git jq curl # Use icecon instead. For some reason rcon-cli doesn't send a valid command #ARG RCON_VERSION="0.10.2" diff --git a/example-pipelines/frw-sftp.yaml b/example-pipelines/frw-sftp.yaml new file mode 100644 index 0000000..baa2a8b --- /dev/null +++ b/example-pipelines/frw-sftp.yaml @@ -0,0 +1,36 @@ +name: "Sync and Restart Resources" +on: + push: + branches: + - main +jobs: + sync-restart: + runs-on: "ubuntu-latest" + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: "Pull remote changes" + uses: appleboy/ssh-action@v0.1.7 + env: + REPO_PATH: "C:/ServerResources" + with: + host: ${{ secrets.SSH_HOST }} + username: Administrator + #key: ${{ secrets.SSH_KEY }} + password: ${{ secrets.SSH_PASSWORD }} + port: 22 + script: | + cd ${{ env.REPO_PATH }} && git pull + - name: "Restart resources / server" + uses: illeniumstudios/fivem-resource-watcher@main + env: + GITHUB_EVENT_BEFORE: ${{ github.event.before }} + with: + serverIP: ${{ secrets.SSH_HOST }} + serverPort: 30120 + rconPassword: ${{ secrets.RCON_PASSWORD }} + restartIndividualResources: true + resourcesToIgnore: "" + restartServerWhen0Players: false diff --git a/example-pipelines/frw.yaml b/example-pipelines/frw.yaml new file mode 100644 index 0000000..baa2a8b --- /dev/null +++ b/example-pipelines/frw.yaml @@ -0,0 +1,36 @@ +name: "Sync and Restart Resources" +on: + push: + branches: + - main +jobs: + sync-restart: + runs-on: "ubuntu-latest" + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: "Pull remote changes" + uses: appleboy/ssh-action@v0.1.7 + env: + REPO_PATH: "C:/ServerResources" + with: + host: ${{ secrets.SSH_HOST }} + username: Administrator + #key: ${{ secrets.SSH_KEY }} + password: ${{ secrets.SSH_PASSWORD }} + port: 22 + script: | + cd ${{ env.REPO_PATH }} && git pull + - name: "Restart resources / server" + uses: illeniumstudios/fivem-resource-watcher@main + env: + GITHUB_EVENT_BEFORE: ${{ github.event.before }} + with: + serverIP: ${{ secrets.SSH_HOST }} + serverPort: 30120 + rconPassword: ${{ secrets.RCON_PASSWORD }} + restartIndividualResources: true + resourcesToIgnore: "" + restartServerWhen0Players: false