mirror of
https://github.com/chatmail/relay.git
synced 2026-05-12 17:14:36 +00:00
docker: slim build by excluding .git and non-essential files
Replace the in-Dockerfile `git rev-parse HEAD` with a GIT_HASH build arg passed from docker-compose (local) or github.sha (CI), defaulting to "unknown" when unset. Also exclude .github/, docs/, tests/, and *.md (except www/**/*.md).
This commit is contained in:
2
.github/workflows/docker-build.yaml
vendored
2
.github/workflows/docker-build.yaml
vendored
@@ -72,3 +72,5 @@ jobs:
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
build-args: |
|
||||
GIT_HASH=${{ github.sha }}
|
||||
|
||||
Reference in New Issue
Block a user