Improve and simplify caching

pull/1736/head
Collin Heist 1 year ago
parent 4287210c76
commit 489551aab3

@ -21,14 +21,6 @@ jobs:
id: buildx id: buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to Docker Hub - name: Login to Docker Hub
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
@ -51,13 +43,8 @@ jobs:
platforms: linux/amd64,linux/arm64,linux/arm/v7 platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/plex-meta-manager:develop tags: ${{ secrets.DOCKER_HUB_USERNAME }}/plex-meta-manager:develop
cache-from: type=local,src=/tmp/.buildx-cache cache-from: type=gha
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new cache-to: type=gha,mode=max
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Send Discord Commit Notification - name: Send Discord Commit Notification
uses: meisnate12/discord-notifications@master uses: meisnate12/discord-notifications@master

@ -17,14 +17,6 @@ jobs:
id: buildx id: buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to Docker Hub - name: Login to Docker Hub
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
@ -45,13 +37,8 @@ jobs:
platforms: linux/amd64,linux/arm64,linux/arm/v7 platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/plex-meta-manager:latest tags: ${{ secrets.DOCKER_HUB_USERNAME }}/plex-meta-manager:latest
cache-from: type=local,src=/tmp/.buildx-cache cache-from: type=gha
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new cache-to: type=gha,mode=max
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Discord Success Notification - name: Discord Success Notification
uses: meisnate12/discord-notifications@master uses: meisnate12/discord-notifications@master

@ -21,14 +21,6 @@ jobs:
id: buildx id: buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to Docker Hub - name: Login to Docker Hub
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
@ -51,13 +43,8 @@ jobs:
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
push: true push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/plex-meta-manager:nightly tags: ${{ secrets.DOCKER_HUB_USERNAME }}/plex-meta-manager:nightly
cache-from: type=local,src=/tmp/.buildx-cache cache-from: type=gha
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new cache-to: type=gha,mode=max
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Send Discord Commit Notification - name: Send Discord Commit Notification
uses: meisnate12/discord-notifications@master uses: meisnate12/discord-notifications@master

Loading…
Cancel
Save