Skip to content

Commit

Permalink
Add PR build & cache (#4)
Browse files Browse the repository at this point in the history
Signed-off-by: zethson <[email protected]>
  • Loading branch information
Zethson authored Sep 4, 2023
1 parent 9f490f3 commit 6386f8e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/publish_ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
push:
tags:
- '*'
pull_request:
types:
- opened
- synchronize
workflow_dispatch:

env:
Expand Down Expand Up @@ -53,6 +57,16 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Cache Docker layers
uses: actions/cache@v2
with:
path: |
/root/.docker
/var/lib/docker
key: docker-${{ runner.os }}-${{ hashFiles(matrix.dockerfile) }}
restore-keys: |
docker-${{ runner.os }}-
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
Expand Down

0 comments on commit 6386f8e

Please sign in to comment.