mirror of
https://github.com/iLLeniumStudios/fivem-resource-watcher
synced 2024-02-26 13:38:52 +01:00
Add file change check logic
This commit is contained in:
@@ -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 }}
|
||||
|
||||
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user