diff --git a/action.yml b/action.yml index d7097a4..a82f143 100644 --- a/action.yml +++ b/action.yml @@ -17,6 +17,10 @@ inputs: description: "Password that you have set for rcon" required: true default: "" + resourcesFolder: + description: "Resources folder" + required: false + default: "resources" runs: using: "docker" image: "Dockerfile" @@ -25,3 +29,4 @@ runs: - ${{ inputs.serverIP }} - ${{ inputs.serverPort }} - ${{ inputs.rconPassword }} + - ${{ inputs.resourcesFolder }} diff --git a/entrypoint.sh b/entrypoint.sh index 9681dfe..45f76fc 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -6,3 +6,18 @@ echo "$3" echo "$4" printenv +${GITHUB_SHA} + +if [ ${GITHUB_BASE_REF} ]; then + # Pull Request + git fetch origin ${GITHUB_BASE_REF} --depth=1 + export DIFF=$( git diff --name-only origin/${GITHUB_BASE_REF} ${GITHUB_SHA} ) + echo "Diff between origin/${GITHUB_BASE_REF} and ${GITHUB_SHA}" +else + # Push + git fetch origin ${GITHUB_EVENT_BEFORE} --depth=1 + export DIFF=$( git diff --name-only ${GITHUB_EVENT_BEFORE} ${GITHUB_SHA} ) + echo "Diff between ${GITHUB_EVENT_BEFORE} and ${GITHUB_SHA}" +fi + +echo "${DIFF}"