↓ Skip to main content

GitHub Actions - Cache APT Packages v1 Released

·1 min
Andrew Walsh
Author
Andrew Walsh
Coder with a passion for most all things technological.

I created a GitHub action awalsh128/cache-apt-packages that allows caching of Advanced Package Tool (APT) package dependencies to improve workflow execution time instead of installing the packages on every run.

Here is an example using it to cache Doxygen dependencies.

name: Create Documentation
on: push
jobs:

  build_and_deploy_docs:
    runs-on: ubuntu-latest
    name: Build Doxygen documentation and deploy
    steps:
      - uses: actions/checkout@v2
      - uses: awalsh128/cache-apt-pkgs-action-action@v1
        with:
          packages: dia doxygen doxygen-doc doxygen-gui doxygen-latex graphviz mscgen

      - name: Build        
        run: |
          cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}      
          cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

      - name: Deploy
        uses: JamesIves/[email protected]
        with:
          branch: gh-pages
          folder: ${{github.workspace}}/build/website

This action is a composition of actions/cache and the apt utility. For more information, see the repository README on GitHub.

Related

VSCode Keep Sorted Extension

··8 mins
VSCode Keep Sorted Extension Note Updated October 2026 for version 1.0.2. This post originally announced the 0.0.1 release in December 2025. Commands, settings, and features below reflect the latest version.