mirror of
https://github.com/tj-actions/install-postgresql.git
synced 2024-12-20 01:18:18 +00:00
Updated cache location for windows
This commit is contained in:
parent
50ccdd3b84
commit
485db8ac03
1 changed files with 3 additions and 4 deletions
|
@ -14,12 +14,11 @@ runs:
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
if [[ "${{ runner.os }}" == "Linux" ]]; then
|
if [[ "${{ runner.os }}" == "Linux" ]]; then
|
||||||
cache_dir=$(apt-cache policy postgresql-${{ inputs.postgresql_version }} | awk '/Filename/ {print $2}')
|
cache_dir="$(apt-cache policy postgresql-${{ inputs.postgresql_version }} | awk '/Filename/ {print $2}')"
|
||||||
elif [[ "${{ runner.os }}" == "macOS" ]]; then
|
elif [[ "${{ runner.os }}" == "macOS" ]]; then
|
||||||
cache_dir=$(brew --cache postgresql@${{ inputs.postgresql_version }})
|
cache_dir="$(brew --cache postgresql@${{ inputs.postgresql_version }})"
|
||||||
elif [[ "${{ runner.os }}" == "Windows" ]]; then
|
elif [[ "${{ runner.os }}" == "Windows" ]]; then
|
||||||
choco search postgresql --download-cache
|
cache_dir="~/AppData/Local/Temp/chocolatey/postgresql-${{ inputs.postgresql_version }}"
|
||||||
cache_dir=$(choco cache list | grep 'postgresql${{ inputs.postgresql_version }}')
|
|
||||||
fi
|
fi
|
||||||
echo "cache_dir=$cache_dir" >> "$GITHUB_OUTPUT"
|
echo "cache_dir=$cache_dir" >> "$GITHUB_OUTPUT"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
Loading…
Add table
Reference in a new issue