Add file change check logic

This commit is contained in:
TheiLLeniumStudios
2023-02-06 10:17:08 +00:00
parent 8bd48aee05
commit d58e8ef837
2 changed files with 20 additions and 0 deletions
+5
View File
@@ -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 }}
+15
View File
@@ -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}"