cache-apt-pkgs-action icon indicating copy to clipboard operation
cache-apt-pkgs-action copied to clipboard

Cache not found for input key

Open lucmann opened this issue 2 months ago • 3 comments

Cache looks like to be uploaded successfully, but when a new release build is triggered, cache still not found.

2024-12-27T07:10:43.0897526Z Cache not found for input keys: cache-apt-pkgs_04ccdeec37eafbeb41950fb23cce66d3
...
2024-12-27T07:20:11.5746086Z Artifact cache-apt-pkgs-logs_04ccdeec37eafbeb41950fb23cce66d3 has been successfully uploaded!
2024-12-27T07:20:11.5825452Z ##[group]Run actions/cache/save@v4
2024-12-27T07:20:11.5825682Z with:
2024-12-27T07:20:11.5825859Z   path: ~/cache-apt-pkgs
2024-12-27T07:20:11.5826105Z   key: cache-apt-pkgs_04ccdeec37eafbeb41950fb23cce66d3
2024-12-27T07:20:11.5826403Z   enableCrossOsArchive: false
2024-12-27T07:20:11.5826761Z env:
2024-12-27T07:20:11.5826937Z   CACHE_KEY: 04ccdeec37eafbeb41950fb23cce66d3
2024-12-27T07:20:11.5827177Z ##[endgroup]
2024-12-27T07:20:11.7345286Z [command]/usr/bin/tar --posix -cf cache.tzst --exclude cache.tzst -P -C /home/runner/work/x-cheatsheet/x-cheatsheet --files-from manifest.txt --use-compress-program zstdmt
2024-12-27T07:21:04.5513283Z Cache Size: ~1947 MB (2041847070 B)
2024-12-27T07:21:04.9780123Z Cache saved successfully
2024-12-27T07:21:05.3223685Z Cache saved with key: cache-apt-pkgs_04ccdeec37eafbeb41950fb23cce66d3
2024-12-27T07:21:05.3329526Z ##[group]Run rm -rf ~/cache-apt-pkgs
2024-12-27T07:21:05.3329818Z [36;1mrm -rf ~/cache-apt-pkgs[0m
2024-12-27T07:21:05.3565726Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
2024-12-27T07:21:05.3566079Z env:
2024-12-27T07:21:05.3566288Z   CACHE_KEY: 04ccdeec37eafbeb41950fb23cce66d3
2024-12-27T07:21:05.3566560Z ##[endgroup]

full-log.zip

  • workflow setting:
name: Release

on:
  push:
    tags:
      - 'v*.*.*'  # This triggers the workflow for tags like v1.0.0, v2.1.0, etc.

jobs:
  release:
    runs-on: ubuntu-latest

    steps:
    - name: Checkout repository
      uses: actions/checkout@v2

    # It takes a while to install TeX Live packages, so we cache them
    - name: Cache TeX Live packages
      id: cache-texlive
      uses: awalsh128/cache-apt-pkgs-action@latest
      with:
        # The list generated by `apt list 'texlive-*' | awk -F'/' 'NR>1 {print $1}' | awk '{printf "%s ", $0}'` on a fresh Ubuntu 20.04
        packages: gh texlive texlive-base texlive-bibtex-extra texlive-binaries texlive-extra-utils texlive-font-utils texlive-fonts-extra-doc texlive-fonts-extra-links texlive-fonts-extra texlive-fonts-recommended-doc texlive-fonts-recommended texlive-formats-extra texlive-full texlive-games texlive-humanities-doc texlive-humanities texlive-lang-all texlive-lang-arabic texlive-lang-chinese texlive-lang-cjk texlive-lang-cyrillic texlive-lang-czechslovak texlive-lang-english texlive-lang-european texlive-lang-french texlive-lang-german texlive-lang-greek texlive-lang-italian texlive-lang-japanese texlive-lang-korean texlive-lang-other texlive-lang-polish texlive-lang-portuguese texlive-lang-spanish texlive-latex-base-doc texlive-latex-base texlive-latex-extra-doc texlive-latex-extra texlive-latex-recommended-doc texlive-latex-recommended texlive-luatex texlive-metapost-doc texlive-metapost texlive-music texlive-pictures-doc texlive-pictures texlive-plain-generic texlive-pstricks-doc texlive-pstricks texlive-publishers-doc texlive-publishers texlive-science-doc texlive-science texlive-xetex
        version: 1.0
        debug: true

    - name: Install TeX Live dependencies
      if: steps.cache-texlive.outputs.cache-hit != 'true'
      run: |
        sudo apt-get update
        sudo apt-get install -y 'texlive-*' gh

    - name: Build project
      run: |
        make
        ls -l

    - name: Create GitHub 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 }}
        body: |
          Release notes for ${{ github.ref }}
        draft: false
        prerelease: false

    # Upload PDF and PNG files as release assets in a loop
    # Due to the lack of support for wildcards in the `actions/upload-release-asset` action
    - name: Upload PDF Release Asset
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      run: |
        for file in ./*.pdf; do
          echo "Uploading $file..."
          gh release upload ${{ github.ref_name }} "$file" --clobber
        done

    - name: Upload PNG Release Asset
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      run: |
        for file in ./*cheatsheet*.png; do
          echo "Uploading $file..."
          gh release upload ${{ github.ref_name }} "$file" --clobber
        done

lucmann avatar Dec 27 '24 08:12 lucmann