mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-06-20 09:57:43 +02:00
Preparation for multistage builds
This commit is contained in:
parent
43628f0e2f
commit
1de5bcf429
20
.github/workflows/build_images.yml
vendored
20
.github/workflows/build_images.yml
vendored
@ -155,7 +155,12 @@ jobs:
|
|||||||
- name: Image digest
|
- name: Image digest
|
||||||
run: |
|
run: |
|
||||||
echo ${{ steps.docker_build.outputs.digest }}
|
echo ${{ steps.docker_build.outputs.digest }}
|
||||||
echo "${{ steps.docker_build.outputs.digest }}" > /tmp/${{ matrix.build }}_${{ matrix.os }}
|
echo "${{ steps.docker_build.outputs.digest }}" > base_build/${{ matrix.build }}_${{ matrix.os }}
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: my-artifact
|
||||||
|
path: base_build/${{ matrix.build }}_${{ matrix.os }}
|
||||||
|
|
||||||
build_base_database:
|
build_base_database:
|
||||||
timeout-minutes: 70
|
timeout-minutes: 70
|
||||||
@ -269,6 +274,14 @@ jobs:
|
|||||||
echo ::set-output name=image_tag_versions::$(printf -- ",%s" "${TAGS_ARRAY[@]}")
|
echo ::set-output name=image_tag_versions::$(printf -- ",%s" "${TAGS_ARRAY[@]}")
|
||||||
echo ::set-output name=base_tag::${TAGS_ARRAY[1]#*:}
|
echo ::set-output name=base_tag::${TAGS_ARRAY[1]#*:}
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: my-artifact
|
||||||
|
path: base_build
|
||||||
|
|
||||||
|
- name: Display structure of downloaded files
|
||||||
|
run: ls -R
|
||||||
|
|
||||||
- name: Prepare tags
|
- name: Prepare tags
|
||||||
id: prepare_tags
|
id: prepare_tags
|
||||||
run: |
|
run: |
|
||||||
@ -284,12 +297,13 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat /tmp/build-base_${{ matrix.os }}
|
BASE_TAG=$(cat base_build/${{ matrix.build }}_${{ matrix.os }})
|
||||||
|
|
||||||
echo ::set-output name=image_tag_versions::${TAGS}
|
echo ::set-output name=image_tag_versions::${TAGS}
|
||||||
echo ::set-output name=image_name::${IMAGE_NAME}
|
echo ::set-output name=image_name::${IMAGE_NAME}
|
||||||
echo ::set-output name=base_tag::${BASE_TAG}
|
echo ::set-output name=base_tag::${BASE_TAG}
|
||||||
|
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
id: docker_build
|
id: docker_build
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
@ -299,7 +313,7 @@ jobs:
|
|||||||
platforms: ${{ steps.platform.outputs.list }}
|
platforms: ${{ steps.platform.outputs.list }}
|
||||||
push: ${{ secrets.AUTO_PUSH_IMAGES }}
|
push: ${{ secrets.AUTO_PUSH_IMAGES }}
|
||||||
tags: ${{ steps.prepare_tags.outputs.image_tag_versions }}
|
tags: ${{ steps.prepare_tags.outputs.image_tag_versions }}
|
||||||
build-args: zabbix/zabbix-build-base:${{ steps.prepare_tags.outputs.base_tag }}
|
build-args: zabbix/zabbix-build-base@${{ steps.prepare_tags.outputs.base_tag }}
|
||||||
|
|
||||||
- name: Image digest
|
- name: Image digest
|
||||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user