fix: add --no-cache to docker builds to prevent stale images
All checks were successful
Dev / docker (push) Successful in 2m22s
All checks were successful
Dev / docker (push) Successful in 2m22s
Docker layer caching on the runner was reusing old layers even when source code changed, resulting in images with outdated code.
This commit is contained in:
parent
1c9de39079
commit
fab5ad29d4
2 changed files with 2 additions and 2 deletions
|
|
@ -37,7 +37,7 @@ jobs:
|
||||||
echo "${REGISTRY_TOKEN}" | docker login "${REGISTRY}" \
|
echo "${REGISTRY_TOKEN}" | docker login "${REGISTRY}" \
|
||||||
-u "${{ github.repository_owner }}" --password-stdin
|
-u "${{ github.repository_owner }}" --password-stdin
|
||||||
|
|
||||||
docker build \
|
docker build --no-cache \
|
||||||
--build-arg "VERSION=${VERSION}" \
|
--build-arg "VERSION=${VERSION}" \
|
||||||
-t "${IMAGE}:v${VERSION}" \
|
-t "${IMAGE}:v${VERSION}" \
|
||||||
-t "${IMAGE}:dev" \
|
-t "${IMAGE}:dev" \
|
||||||
|
|
|
||||||
|
|
@ -214,7 +214,7 @@ jobs:
|
||||||
-u "${{ github.repository_owner }}" --password-stdin
|
-u "${{ github.repository_owner }}" --password-stdin
|
||||||
|
|
||||||
# Build the image
|
# Build the image
|
||||||
docker build \
|
docker build --no-cache \
|
||||||
--build-arg "VERSION=${VERSION}" \
|
--build-arg "VERSION=${VERSION}" \
|
||||||
-t "${IMAGE}:${TAG}" \
|
-t "${IMAGE}:${TAG}" \
|
||||||
-t "${IMAGE}:${MAJOR}.${MINOR}" \
|
-t "${IMAGE}:${MAJOR}.${MINOR}" \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue