Skip to content

Commit

Permalink
feat(cd): docker build caching
Browse files Browse the repository at this point in the history
  • Loading branch information
proffapt committed Jun 30, 2024
1 parent caf406d commit fba8972
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/dockerhub-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,25 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Cache Docker layers naarad-ntfy
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache-naarad-ntfy
key: ${{ runner.os }}-buildx-naarad-ntfy-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-naarad-ntfy-
- name: Build & Push naarad-ntfy
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile-build
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/naarad-ntfy:latest
cache-from: type=local,src=/tmp/.buildx-cache-naarad-ntfy
cache-to: type=local,dest=/tmp/.buildx-cache-naarad-ntfy-new,mode=max

- name: Move naarad-ntfy cache
run: |
rm -rf /tmp/.buildx-cache-naarad-ntfy
mv /tmp/.buildx-cache-naarad-ntfy-new /tmp/.buildx-cache-naarad-ntfy

0 comments on commit fba8972

Please sign in to comment.