From 3d4cefad437edd728d8c6ca9930405ba125c6959 Mon Sep 17 00:00:00 2001 From: "Philip H." <47042125+pheiduck@users.noreply.github.com> Date: Sun, 25 May 2025 16:02:18 +0200 Subject: [PATCH 1/2] linux.yml: improvements --- .github/workflows/linux.yml | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 5f7a807..860da7e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -7,10 +7,22 @@ jobs: os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm] runs-on: ${{ matrix.os }} steps: - - uses: awalsh128/cache-apt-pkgs-action@latest - with: - packages: zsh zsh-common - uses: actions/checkout@main + - name: Cache apt packages + uses: actions/cache@main + with: + path: | + /var/cache/apt/archives + /var/lib/apt/lists + key: ${{ runner.os }}-apt-${{ matrix.os }}-${{ hashFiles('**/airconnect/airconnect_installer') }} + restore-keys: | + ${{ runner.os }}-apt-${{ matrix.os }}- + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y zsh + - name: Testing Shell script run: | cd airconnect @@ -22,14 +34,21 @@ jobs: other-scripts: runs-on: ubuntu-latest steps: - - uses: actions/checkout@main + - name: Cache downloaded scripts + uses: actions/cache@main + with: + path: | + ${{ github.workspace }}/pihole-cloudflared + ${{ github.workspace }}/update_fastfetch + key: ${{ runner.os }}-scripts-${{ hashFiles('**/*.sh') }} + restore-keys: | + ${{ runner.os }}-scripts- - - name: Run sript 'pihole-cloudflared' + - name: Run script 'pihole-cloudflared' run: | sudo bash pihole-cloudflared - - - name: Run sript 'update_fastfetch' + - name: Run script 'update_fastfetch' run: | sudo bash update_fastfetch From 89770d3d111d62706d242bd439d70872c28dd1f4 Mon Sep 17 00:00:00 2001 From: "Philip H." <47042125+pheiduck@users.noreply.github.com> Date: Sun, 25 May 2025 16:06:43 +0200 Subject: [PATCH 2/2] fixup: linux.yml --- .github/workflows/linux.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 860da7e..5f95ce2 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -8,19 +8,23 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@main + - name: Prepare APT cache dir + run: | + mkdir -p "$RUNNER_TEMP/apt-cache"/{archives,lists} - name: Cache apt packages uses: actions/cache@main with: path: | - /var/cache/apt/archives - /var/lib/apt/lists + ${{ runner.temp }}/apt-cache/archives + ${{ runner.temp }}/apt-cache/lists key: ${{ runner.os }}-apt-${{ matrix.os }}-${{ hashFiles('**/airconnect/airconnect_installer') }} restore-keys: | ${{ runner.os }}-apt-${{ matrix.os }}- - - name: Install dependencies run: | - sudo apt-get update + sudo apt-get update \ + -o Dir::Cache::Archives="$RUNNER_TEMP/apt-cache/archives" \ + -o Dir::Cache::Lists="$RUNNER_TEMP/apt-cache/lists" sudo apt-get install -y zsh - name: Testing Shell script @@ -46,9 +50,7 @@ jobs: ${{ runner.os }}-scripts- - name: Run script 'pihole-cloudflared' - run: | - sudo bash pihole-cloudflared + run: sudo bash pihole-cloudflared - name: Run script 'update_fastfetch' - run: | - sudo bash update_fastfetch + run: sudo bash update_fastfetch