mirror of
https://github.com/sethforprivacy/p2pool-docker.git
synced 2025-12-12 01:42:48 -05:00
Migrate caching to Registry
This commit is contained in:
22
.github/workflows/update-base-image.yml
vendored
22
.github/workflows/update-base-image.yml
vendored
@@ -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:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 12 * * *" # Run every day at noon.
|
- cron: "0 12 * * *" # Run every day at noon.
|
||||||
@@ -11,14 +11,6 @@ jobs:
|
|||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
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
|
name: Login to GitHub Container Registry
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
@@ -49,16 +41,8 @@ jobs:
|
|||||||
ghcr.io/sethsimmons/simple-monerod:${{ steps.get_tag.outputs.tag }}
|
ghcr.io/sethsimmons/simple-monerod:${{ steps.get_tag.outputs.tag }}
|
||||||
sethsimmons/simple-monerod:latest
|
sethsimmons/simple-monerod:latest
|
||||||
sethsimmons/simple-monerod:${{ steps.get_tag.outputs.tag }}
|
sethsimmons/simple-monerod:${{ steps.get_tag.outputs.tag }}
|
||||||
cache-from: type=local,src=/tmp/.buildx-cache
|
cache-from: type=registry,ref=sethsimmons/simple-monerod:latest
|
||||||
cache-to: type=local,dest=/tmp/.buildx-cache-new
|
cache-to: type=inline
|
||||||
-
|
|
||||||
# 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
|
|
||||||
-
|
-
|
||||||
name: Image digest
|
name: Image digest
|
||||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||||
20
.github/workflows/update-image-on-push.yml
vendored
20
.github/workflows/update-image-on-push.yml
vendored
@@ -12,14 +12,6 @@ jobs:
|
|||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
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
|
name: Login to GitHub Container Registry
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
@@ -50,16 +42,8 @@ jobs:
|
|||||||
ghcr.io/sethsimmons/simple-monerod:${{ steps.get_tag.outputs.tag }}
|
ghcr.io/sethsimmons/simple-monerod:${{ steps.get_tag.outputs.tag }}
|
||||||
sethsimmons/simple-monerod:latest
|
sethsimmons/simple-monerod:latest
|
||||||
sethsimmons/simple-monerod:${{ steps.get_tag.outputs.tag }}
|
sethsimmons/simple-monerod:${{ steps.get_tag.outputs.tag }}
|
||||||
cache-from: type=local,src=/tmp/.buildx-cache
|
cache-from: type=registry,ref=sethsimmons/simple-monerod:latest
|
||||||
cache-to: type=local,dest=/tmp/.buildx-cache-new
|
cache-to: type=inline
|
||||||
-
|
|
||||||
# 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
|
|
||||||
-
|
-
|
||||||
name: Image digest
|
name: Image digest
|
||||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||||
Reference in New Issue
Block a user