Skip to content

Commit

Permalink
Use GA cache for docker
Browse files Browse the repository at this point in the history
  • Loading branch information
palkan committed Nov 24, 2021
1 parent 05daaaf commit e6235d9
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,16 @@ jobs:
- uses: docker/setup-buildx-action@v1
with:
install: true
driver-opts: |
network=host
- uses: docker/login-action@v1
with:
registry: registry.digitalocean.com
username: ${{ secrets.do_token }}
password: ${{ secrets.do_token }}
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: buildx-cache-${{ github.sha }}
restore-keys: |
buildx-cache
- name: Build Docker image
run: |
bundle exec kuby -e production build -- --cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache-new --load
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
bundle exec kuby -e production build -- --cache-from=type=gha --cache-to=type=gha,mode=max --load
- name: Push Docker image
run: |
bundle exec kuby -e production push
Expand Down

0 comments on commit e6235d9

Please sign in to comment.