Add GIT_COMMIT build arg to ensure cache invalidation between different commits on the same branch
This commit is contained in:
parent
778de46e31
commit
e54d689376
|
@ -46,6 +46,7 @@ jobs:
|
|||
build-args: |
|
||||
FARMOS_REPO=https://github.com/${{ env.FARMOS_REPO }}
|
||||
FARMOS_VERSION=${{ env.FARMOS_VERSION }}
|
||||
GIT_COMMIT=${{ github.sha }}
|
||||
tags: farmos/farmos:3.x
|
||||
cache-from: type=gha,scope=prod
|
||||
cache-to: type=gha,scope=prod
|
||||
|
@ -67,6 +68,7 @@ jobs:
|
|||
build-args: |
|
||||
FARMOS_REPO=https://github.com/${{ env.FARMOS_REPO }}
|
||||
FARMOS_VERSION=${{ env.FARMOS_VERSION }}
|
||||
GIT_COMMIT=${{ github.sha }}
|
||||
tags: farmos/farmos:3.x-dev
|
||||
cache-from: |
|
||||
type=gha,scope=prod
|
||||
|
|
|
@ -55,6 +55,10 @@ RUN build-farmOS.sh
|
|||
# Create layer with farmOS sources.
|
||||
FROM composer-file as farmos-sources
|
||||
|
||||
# Declare the git commit hash argument used for build cache invalidation between
|
||||
# different commits on the same branch in GitHub actions.
|
||||
ARG GIT_COMMIT=unknown
|
||||
|
||||
# Install sources.
|
||||
RUN composer install --no-dev
|
||||
|
||||
|
|
Loading…
Reference in New Issue