Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another Packages argument cannot be empty. when it is not. #137

Open
xavierrigau opened this issue Aug 30, 2024 · 1 comment
Open

Another Packages argument cannot be empty. when it is not. #137

xavierrigau opened this issue Aug 30, 2024 · 1 comment
Assignees

Comments

@xavierrigau
Copy link

Seem similar to #116 but that issue has no resolution.

    - name: Apt dependencies
      uses: awalsh128/cache-apt-pkgs-action@a6c3917cc929dd0345bfb2d3feaf9101823370ad # v1.4.2
      with:
        packages: libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
        version: 1.4.2
        debug: true

Seem like the normalized list is ok normalized-list libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb

Run awalsh128/cache-apt-pkgs-action@a6c3917cc929dd0345bfb2d3feaf9101823370ad
Run ${GITHUB_ACTION_PATH}/pre_cache_action.sh \
+ cache_dir=/home/runner/cache-apt-pkgs
+ version=1.4.2
+ execute_install_scripts=false
+ debug=true
+ input_packages='libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb'
+ log 'Normalizing package list...'
++ date +%T.%3N
+ echo 00:18:03.982 'Normalizing package list...'
00:18:03.982 Normalizing package list...
++ get_normalized_package_list 'libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb'
+++ echo 'libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb'
+++ sed 's/[,\]/ /g; s/\s\+/ /g; s/^\s\+//g; s/\s\+$//g'
+++ sort '-t '
++ local 'packages=libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb'
++++ realpath -- /runner/_work/_actions/awalsh128/cache-apt-pkgs-action/a6c3917cc929dd0345bfb2d3feaf9101823370ad/pre_cache_action.sh
+++ dirname -- /runner/_work/_actions/awalsh128/cache-apt-pkgs-action/a6c3917cc929dd0345bfb2d3feaf9101823370ad/pre_cache_action.sh
++ local script_dir=/runner/_work/_actions/awalsh128/cache-apt-pkgs-action/a6c3917cc929dd0345bfb2d3feaf9101823370ad
+++ dpkg --print-architecture
++ local architecture=amd64
++ '[' amd64 == arm64 ']'
++ /runner/_work/_actions/awalsh128/cache-apt-pkgs-action/a6c3917cc929dd0345bfb2d3feaf9101823370ad/apt_query normalized-list libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
+ packages=
+ log done
++ date +%T.%3N
+ echo 00:18:04.033 done
00:18:04.033 done
+ mkdir -p /home/runner/cache-apt-pkgs
+ log 'Validating action arguments (version='\''1.4.2'\'', packages='\'''\'')...'
++ date +%T.%3N
+ echo 00:18:04.037 'Validating action arguments (version='\''1.4.2'\'', packages='\'''\'')...'
00:18:04.037 Validating action arguments (version='1.4.2', packages='')...
+ grep -q ' '
+ test -z ''
+ log aborted
++ date +%T.%3N
+ echo 00:18:04.040 aborted
00:18:04.040 aborted
+ log 'Packages argument cannot be empty.'
++ date +%T.%3N
+ echo 00:18:04.042 'Packages argument cannot be empty.'
00:18:04.042 Packages argument cannot be empty.
+ exit 3
Error: Process completed with exit code 3.
@xiwangly2
Copy link

I have the same problem, it doesn't work properly in this OS environment.
Debian 12 aarch64

root@orangepi5plus:~# uname -a
Linux orangepi5plus.lan 6.1.43-rockchip-rk3588 #1.0.8 SMP Tue May  7 04:30:57 UTC 2024 aarch64 GNU/Linux

I use this device, Aciton works properly:
Debian 12 x86_64

root@hrss:~# uname -a
Linux hrss.lan 6.1.0-21-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.90-1 (2024-05-03) x86_64 GNU/Linux

Both devices use the same deployment method, I use Docker to run Gitea
This is my complete yaml file content:

name: Release

on:
  push:
    tags:
      - '*'

jobs:
  build:

    runs-on: ubuntu-latest

    env:
      RUNNER_TOOL_CACHE: /toolcache

    steps:
      - name: Set up Go
        uses: actions/setup-go@v2
        with:
          go-version: '1.23'
          cache: 'go-build'

      - name: Setup Environment
        uses: actions/setup-node@v3
        with:
          node-version: '16'

      - name: Checkout
        uses: actions/checkout@v4

      - name: Cache APT packages
        uses: awalsh128/cache-apt-pkgs-action@latest
        with:
          packages: zip
          version: 1.0

      - name: Compute hash for Maven pom.xml files
        id: pom-hash
        uses: https://gitea.com/actions/[email protected]
        with:
          patterns: '**/pom.xml'

      - name: Compute hash for Node package-lock.json files
        id: package-lock-hash
        uses: https://gitea.com/actions/[email protected]
        with:
          patterns: '**/package-lock.json'

      - name: Cache Maven packages
        uses: actions/cache@v3
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ steps.pom-hash.outputs.hash }}
          restore-keys: |
            ${{ runner.os }}-maven-

      - name: Get npm cache directory
        id: npm-cache-dir
        shell: bash
        run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT

      - name: Cache npm packages
        uses: actions/cache@v3
        with:
          path: ${{ steps.npm-cache-dir.outputs.dir }}
          key: ${{ runner.os }}-node-${{ steps.package-lock-hash.outputs.hash }}
          restore-keys: |
            ${{ runner.os }}-node-

      - name: Setup Maven
        uses: s4u/[email protected]
        with:
          java-version: '21'
          java-distribution: 'temurin'
          maven-version: '3.9.8'
          cache-dir: ~/.m2

      - name: Build with Maven
        run: mvn -B package --file pom.xml

      - name: Build with Node
        run: |
          cp ruoyi-ui/_prod.vue.config.js ruoyi-ui/vue.config.js
          cd ruoyi-ui
          npm install --registry=https://registry.npmmirror.com
          npm run build:prod
          zip -r dist.zip dist
          cd ..

      - name: Copy files
        run: |
          find ruoyi-admin/target -name "*.jar" -print0 | while IFS= read -r -d '' file; do
            cp "$file" "hrss.jar"
          done
          cp ruoyi-admin/src/main/resources/_prod.application.yml application.yml
          cp ruoyi-admin/src/main/resources/_prod.application-druid.yml application-druid.yml
          cp ruoyi-ui/dist.zip .

      - name: Create Release
        id: create_release
        uses: actions/create-release@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          tag_name: ${{ github.ref }}
          release_name: Release ${{ github.ref }}
          draft: false
          prerelease: false

      - name: Generate SHA256 hashes
        run: |
          sha256sum hrss.jar > hrss.jar.sha256
          sha256sum application.yml > application.yml.sha256
          sha256sum application-druid.yml > application-druid.yml.sha256
          sha256sum dist.zip > dist.zip.sha256

      - name: Upload Release Asset
        id: upload-release-asset
        uses: https://gitea.com/actions/release-action@main
        with:
          files: |
            hrss.jar
            application.yml
            application-druid.yml
            dist.zip
            hrss.jar.sha256
            application.yml.sha256
            application-druid.yml.sha256
            dist.zip.sha256
          api_key: ${{ secrets.GITHUB_TOKEN }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants