From 7eca548bf38214f8418f5141bd3c57a7c758359a Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Sat, 12 Apr 2025 18:57:33 -0700 Subject: [PATCH 1/2] Fix docker digest in CI workflow --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1c8c9b032..c23e89373 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -129,7 +129,7 @@ jobs: --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \ --header "Authorization: Bearer $token" \ "https://registry-1.docker.io/v2/${{ env.PLEX_CONTAINER }}/manifests/${{ env.PLEX_CONTAINER_TAG }}" \ - | jq -r '.config.digest') + | sha256sum | head -c 64) echo "Digest: $digest" echo "digest=$digest" >> $GITHUB_OUTPUT From c76116ffe600c19db85f8af67579bfa1d3f705ea Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Sat, 12 Apr 2025 19:20:02 -0700 Subject: [PATCH 2/2] Always cache PMS Docker image --- .github/workflows/ci.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c23e89373..1968d7add 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -133,9 +133,9 @@ jobs: echo "Digest: $digest" echo "digest=$digest" >> $GITHUB_OUTPUT - - name: Cache PMS Docker image + - name: Restore cached PMS Docker image id: docker-cache - uses: actions/cache@v4 + uses: actions/cache/restore@v4 with: path: ~/.cache/docker/plexinc key: ${{ runner.os }}-docker-pms-${{ steps.docker-digest.outputs.digest }} @@ -208,6 +208,12 @@ jobs: name: coverage-${{ matrix.plex }}-${{ steps.python.outputs.python-version }} path: .coverage + - name: Save PMS Docker image cache + if: always() && steps.docker-cache.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + key: ${{ steps.docker-cache.outputs.cache-primary-key }} + path: ~/.cache/docker/plexinc coverage: name: Process test coverage (${{ matrix.plex }})