Skip to content

Commit

Permalink
modify cache directory name to account for / in platform name
Browse files Browse the repository at this point in the history
  • Loading branch information
ckuhtz committed Jul 10, 2024
1 parent aa8a244 commit 152d752
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,23 @@ jobs:
password: ${{ secrets.GHCR_TOKEN }}
logout: false

- name: Create a variable with platform '${{ matrix.platform }}' value
run: echo "PLATFORM=${{ matrix.platform }}" >> $GITHUB_ENV

- name: Swap / for - in '${{ matrix.platform }}' and create local_platform variable
id: local_platform
run: |
LOCAL_PLATFORM="${PLATFORM//\/\-}"
echo "LOCAL_PLATFORM=${LOCAL_PLATFORM}" >> $GITHUB_ENV
echo "::set-output name=local_platform::${LOCAL_PLATFORM}"
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-${{ matrix.platform }}-buildx-${{ github.sha }}
key: ${{ runner.os }}-${{ steps.local_platform.outputs.local_platform }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ matrix.platform }}-buildx-
${{ runner.os }}-${{ steps.local_platform.outputs.local_platform }}-buildx-
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down

0 comments on commit 152d752

Please sign in to comment.