Skip to content

Commit

Permalink
[workaround]docker build: no cache (#1829)
Browse files Browse the repository at this point in the history
Since using "cache" will cause:

> ERROR: failed to solve: cannot copy from stage "cache", it needs to be defined before current stage "builder"
  • Loading branch information
4eUeP authored Jul 9, 2024
1 parent 5c59fc2 commit a21a839
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
--build-arg LD_IMAGE=${{ matrix.ld_image }} \
--build-arg HSTREAM_VERSION=${{ env.LATEST_TAG }} \
--build-arg HSTREAM_VERSION_COMMIT=${{ env.CURRENT_COMMIT }} \
--build-arg BUILD_CACHE="no_cache" \
-t ${IMAGE_NAME}:${{ matrix.tag }}
- name: Push image to dockerhub
Expand All @@ -72,6 +73,7 @@ jobs:
--build-arg LD_IMAGE=${{ matrix.ld_image }} \
--build-arg HSTREAM_VERSION=${{ env.LATEST_TAG }} \
--build-arg HSTREAM_VERSION_COMMIT=${{ env.CURRENT_COMMIT }} \
--build-arg BUILD_CACHE="no_cache" \
--target builder \
-t ${BUILDER_IMAGE_NAME}:latest
# For cache
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/publish_latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
--build-arg LD_IMAGE=${{ matrix.ld_image }} \
--build-arg HSTREAM_VERSION=${{ env.LATEST_TAG }} \
--build-arg HSTREAM_VERSION_COMMIT=${{ env.CURRENT_COMMIT }} \
--build-arg BUILD_CACHE="no_cache" \
-t ${IMAGE_NAME}:${{ matrix.tag }}
- name: Push image to dockerhub
Expand All @@ -72,6 +73,7 @@ jobs:
--build-arg LD_IMAGE=${{ matrix.ld_image }} \
--build-arg HSTREAM_VERSION=${{ env.LATEST_TAG }} \
--build-arg HSTREAM_VERSION_COMMIT=${{ env.CURRENT_COMMIT }} \
--build-arg BUILD_CACHE="no_cache" \
--target builder \
-t ${BUILDER_IMAGE_NAME}:latest
# For cache
Expand Down

0 comments on commit a21a839

Please sign in to comment.