Migrate caching to Registry

This commit is contained in:
Seth Simmons
2021-03-24 13:06:09 -04:00
parent 3f302e090c
commit 9e7e51711f
2 changed files with 5 additions and 37 deletions

View File

@@ -1,4 +1,4 @@
name: "Update Image and Push to Github Packages and Docker Hub"
name: "Update Image and Push to Github Packages and Docker Hub Daily"
on:
schedule:
- cron: "0 12 * * *" # Run every day at noon.
@@ -11,14 +11,6 @@ jobs:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
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 GitHub Container Registry
uses: docker/login-action@v1
@@ -49,16 +41,8 @@ jobs:
ghcr.io/sethsimmons/simple-monerod:${{ steps.get_tag.outputs.tag }}
sethsimmons/simple-monerod:latest
sethsimmons/simple-monerod:${{ steps.get_tag.outputs.tag }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
-
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
cache-from: type=registry,ref=sethsimmons/simple-monerod:latest
cache-to: type=inline
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}