mirror of
https://github.com/aimingmed/aimingmed-ai.git
synced 2026-02-07 15:53:45 +08:00
update
This commit is contained in:
parent
30dd0de6de
commit
e9d1cfe6a2
45
.github/workflows/template_build.yml
vendored
45
.github/workflows/template_build.yml
vendored
@ -91,39 +91,7 @@ jobs:
|
|||||||
echo "Attempting to pull intermediate image for cache: ${{ steps.tags.outputs.image_repo_path }}:${{ inputs.intermediate_container }}"
|
echo "Attempting to pull intermediate image for cache: ${{ steps.tags.outputs.image_repo_path }}:${{ inputs.intermediate_container }}"
|
||||||
docker pull ${{ steps.tags.outputs.image_repo_path }}:${{ inputs.intermediate_container }} || true
|
docker pull ${{ steps.tags.outputs.image_repo_path }}:${{ inputs.intermediate_container }} || true
|
||||||
|
|
||||||
- name: Build Intermediate Image
|
- name: Build Final Image
|
||||||
# Builds the intermediate target if specified
|
|
||||||
if: inputs.intermediate_container != ''
|
|
||||||
run: |
|
|
||||||
echo "Building intermediate image: ${{ steps.tags.outputs.image_repo_path }}:${{ inputs.intermediate_container }}"
|
|
||||||
docker build \
|
|
||||||
-f ${{ inputs.dockerfile }} \
|
|
||||||
--pull \
|
|
||||||
--cache-from type=registry,ref=${{ steps.tags.outputs.image_repo_path }}:${{ inputs.intermediate_container }} \
|
|
||||||
-t ${{ steps.tags.outputs.image_repo_path }}:${{ inputs.intermediate_container }} \
|
|
||||||
--target ${{ inputs.intermediate_container }} \
|
|
||||||
${{ inputs.args }} \
|
|
||||||
${{ inputs.build_context }}
|
|
||||||
|
|
||||||
- name: Build Final Image (with Intermediate Cache)
|
|
||||||
# Builds the final image using intermediate cache if specified
|
|
||||||
if: inputs.intermediate_container != ''
|
|
||||||
run: |
|
|
||||||
echo "Building final image with intermediate cache..."
|
|
||||||
docker build \
|
|
||||||
-f ${{ inputs.dockerfile }} \
|
|
||||||
--pull \
|
|
||||||
--cache-from type=registry,ref=${{ steps.tags.outputs.image_repo_path }}:latest \
|
|
||||||
--cache-from type=registry,ref=${{ steps.tags.outputs.image_repo_path }}:${{ inputs.intermediate_container }} \
|
|
||||||
-t ${{ steps.tags.outputs.image_repo_path }}:${{ steps.tags.outputs.tag_build_id }} \
|
|
||||||
-t ${{ steps.tags.outputs.image_repo_path }}:${{ steps.tags.outputs.tag_commit_sha }} \
|
|
||||||
-t ${{ steps.tags.outputs.image_repo_path }}:latest \
|
|
||||||
${{ inputs.args }} \
|
|
||||||
${{ inputs.build_context }}
|
|
||||||
|
|
||||||
- name: Build Final Image (without Intermediate Cache)
|
|
||||||
# Builds the final image without intermediate cache if not specified
|
|
||||||
if: inputs.intermediate_container == ''
|
|
||||||
run: |
|
run: |
|
||||||
echo "Building final image without intermediate cache..."
|
echo "Building final image without intermediate cache..."
|
||||||
docker build \
|
docker build \
|
||||||
@ -140,13 +108,6 @@ jobs:
|
|||||||
# Pushes the final tags (build id, commit sha, latest)
|
# Pushes the final tags (build id, commit sha, latest)
|
||||||
run: |
|
run: |
|
||||||
echo "Pushing final image tags..."
|
echo "Pushing final image tags..."
|
||||||
# docker push ${{ steps.tags.outputs.image_repo_path }}:${{ steps.tags.outputs.tag_build_id }}
|
docker push ${{ steps.tags.outputs.image_repo_path }}:${{ steps.tags.outputs.tag_build_id }}
|
||||||
# docker push ${{ steps.tags.outputs.image_repo_path }}:${{ steps.tags.outputs.tag_commit_sha }}
|
docker push ${{ steps.tags.outputs.image_repo_path }}:${{ steps.tags.outputs.tag_commit_sha }}
|
||||||
docker push ${{ steps.tags.outputs.image_repo_path }}:latest
|
docker push ${{ steps.tags.outputs.image_repo_path }}:latest
|
||||||
|
|
||||||
- name: Push Intermediate Image
|
|
||||||
# Pushes the intermediate tag if it was built
|
|
||||||
if: inputs.intermediate_container != ''
|
|
||||||
run: |
|
|
||||||
echo "Pushing intermediate image tag..."
|
|
||||||
docker push ${{ steps.tags.outputs.image_repo_path }}:${{ inputs.intermediate_container }}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user