mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-05-20 07:19:54 +02:00
Revert "Fix caching directories outside of the working directory (relative paths)"
This commit is contained in:
parent
78809b91d7
commit
143c84bf60
7 changed files with 20 additions and 48 deletions
|
@ -7,11 +7,5 @@ if [ -z "$prefix" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
path="$2"
|
||||
if [ -z "$path" ]; then
|
||||
echo "Must supply path argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p $path
|
||||
echo "$prefix $GITHUB_RUN_ID" > $path/test-file.txt
|
||||
mkdir test-cache
|
||||
echo "$prefix $GITHUB_RUN_ID" > test-cache/test-file.txt
|
|
@ -73,7 +73,6 @@ test("create tar", async () => {
|
|||
"-cz",
|
||||
"-f",
|
||||
CacheFilename,
|
||||
"-P",
|
||||
"-C",
|
||||
workspace,
|
||||
"--files-from",
|
||||
|
|
|
@ -7,12 +7,6 @@ if [ -z "$prefix" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
path="$2"
|
||||
if [ -z "$path" ]; then
|
||||
echo "Must specify path argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Sanity check GITHUB_RUN_ID defined
|
||||
if [ -z "$GITHUB_RUN_ID" ]; then
|
||||
echo "GITHUB_RUN_ID not defined"
|
||||
|
@ -20,7 +14,7 @@ if [ -z "$GITHUB_RUN_ID" ]; then
|
|||
fi
|
||||
|
||||
# Verify file exists
|
||||
file="$path/test-file.txt"
|
||||
file="test-cache/test-file.txt"
|
||||
echo "Checking for $file"
|
||||
if [ ! -e $file ]; then
|
||||
echo "File does not exist"
|
||||
|
@ -33,4 +27,4 @@ echo "File content:\n$content"
|
|||
if [ -z "$(echo $content | grep --fixed-strings "$prefix $GITHUB_RUN_ID")" ]; then
|
||||
echo "Unexpected file content"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue