mirror of
https://github.com/awalsh128/cache-apt-pkgs-action.git
synced 2026-07-31 19:09:06 +00:00
Add regression 156 workflow coverage and tighten workflow permissions
This commit is contained in:
parent
dd861124da
commit
ccaf722e7c
3
.github/workflows/action-tests.yml
vendored
3
.github/workflows/action-tests.yml
vendored
|
|
@ -11,6 +11,9 @@ on:
|
||||||
push:
|
push:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DEBUG: ${{ github.event.inputs.debug || false }}
|
DEBUG: ${{ github.event.inputs.debug || false }}
|
||||||
# Test for overrides in built in shell options (regression issue 98).
|
# Test for overrides in built in shell options (regression issue 98).
|
||||||
|
|
|
||||||
|
|
@ -106,17 +106,22 @@ for installed_package in ${installed_packages}; do
|
||||||
get_tar_relpath "${f}"
|
get_tar_relpath "${f}"
|
||||||
if [ -L "${f}" ]; then
|
if [ -L "${f}" ]; then
|
||||||
symlink_path="${f}"
|
symlink_path="${f}"
|
||||||
for i in $(seq 1 40); do
|
# Guard against circular links while still supporting deep alternatives chains.
|
||||||
|
max_symlink_depth=40
|
||||||
|
for i in $(seq 1 ${max_symlink_depth}); do
|
||||||
if [ ! -L "${symlink_path}" ]; then
|
if [ ! -L "${symlink_path}" ]; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|
||||||
target="$(readlink "${symlink_path}")"
|
target="$(readlink "${symlink_path}")"
|
||||||
if [ "${target:0:1}" = "/" ]; then
|
case "${target}" in
|
||||||
target_path="${target}"
|
/*)
|
||||||
else
|
target_path="${target}"
|
||||||
target_path="$(dirname "${symlink_path}")/${target}"
|
;;
|
||||||
fi
|
*)
|
||||||
|
target_path="$(dirname "${symlink_path}")/${target}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [ -f "${target_path}" ] || [ -L "${target_path}" ]; then
|
if [ -f "${target_path}" ] || [ -L "${target_path}" ]; then
|
||||||
get_tar_relpath "${target_path}"
|
get_tar_relpath "${target_path}"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue