Skip to content

Empty Packages list #181

@jg-development

Description

@jg-development

I am using this yaml:

      - name: cache php apt packages
        uses: awalsh128/cache-apt-pkgs-action@master
        with:
          packages: php8.4
          version: 1.0
          debug: true
          add-repository: ppa:ondrej/php

the result is:

[Security/composer-audit] [DEBUG] Writing entry to tarball workflow/1-composite-pre-cache.sh len:321
[Security/composer-audit] [DEBUG] Extracting content to '/var/run/act'
[Security/composer-audit]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/1-composite-pre-cache.sh] user= workdir=
[Security/composer-audit] [DEBUG] Exec command '[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/1-composite-pre-cache.sh]'
[Security/composer-audit] [DEBUG] Working directory '/home/xxx'
| + cache_dir=/home/runner/cache-apt-pkgs
| + version=2.0
| + execute_install_scripts=false
| + debug=true
| + add_repository=ppa:ondrej/php
| + input_packages=php8.4
| + log 'Normalizing package list...'
| + echo 'Normalizing package list...'
| Normalizing package list...
| ++ get_normalized_package_list php8.4
| +++ echo php8.4
| +++ sed 's/[,\]/ /g; s/\s\+/ /g; s/^\s\+//g; s/\s\+$//g'
| +++ sort '-t '
| ++ local packages=php8.4
| ++++ realpath -- /var/run/act/actions/awalsh128-cache-apt-pkgs-action@master/pre_cache_action.sh
| +++ dirname -- /run/act/actions/awalsh128-cache-apt-pkgs-action@master/pre_cache_action.sh
| ++ local script_dir=/run/act/actions/awalsh128-cache-apt-pkgs-action@master
| +++ dpkg --print-architecture
| ++ local architecture=amd64
| ++ '[' amd64 == arm64 ']'
| ++ /run/act/actions/awalsh128-cache-apt-pkgs-action@master/apt_query-x86 normalized-list php8.4
| exit status 100+ packages=
| + log done
| + echo done
| done
| + mkdir -p /home/runner/cache-apt-pkgs
| + log 'Validating action arguments (version='\''2.0'\'', packages='\'''\'')...'
| + echo 'Validating action arguments (version='\''2.0'\'', packages='\'''\'')...'
| Validating action arguments (version='2.0', packages='')...
| + grep -q ' '
| + test -z ''
| + case "$EMPTY_PACKAGES_BEHAVIOR" in
| + log aborted
| + echo aborted
| aborted
| + log 'Packages argument is empty.'
| + echo 'Packages argument is empty.'
| Packages argument is empty.
| + exit 3
[Security/composer-audit]   ❌  Failure - Main ${GITHUB_ACTION_PATH}/pre_cache_action.sh \
  ~/cache-apt-pkgs \
  "$VERSION" \
  "$EXEC_INSTALL_SCRIPTS" \
  "$DEBUG" \
  "$ADD_REPOSITORY" \
  "$PACKAGES"
if [ -f ~/cache-apt-pkgs/cache_key.md5 ]; then
  echo "CACHE_KEY=$(cat ~/cache-apt-pkgs/cache_key.md5)" >> $GITHUB_ENV
else
  echo "CACHE_KEY=" >> $GITHUB_ENV
fi
 [160.482741ms]
[Security/composer-audit] exitcode '3': failure

the packages arguments are not injected into the script.
any ideas?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions