mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2024-11-22 15:53:35 +01:00
Prepare universal workflow
This commit is contained in:
parent
28d105ffbc
commit
8a65ef82f6
20
.github/workflows/images_build.yml
vendored
20
.github/workflows/images_build.yml
vendored
@ -858,6 +858,22 @@ jobs:
|
||||
"$BASE_IMAGE"
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Prepare cache data
|
||||
id: cache_data
|
||||
env:
|
||||
BASE_IMAGE_TAG: ${{ steps.base_build.outputs.base_build_image }}
|
||||
run: |
|
||||
cache_images=""
|
||||
if [[ ! -z "$BASE_IMAGE_TAG" ]]; then
|
||||
cache_images="type=gha,scope=$BASE_IMAGE_TAG\ntype=registry,ref=$BASE_IMAGE_TAG"
|
||||
fi
|
||||
|
||||
echo "::group::Base images cache"
|
||||
echo "$cache_images"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "cache_from=$cache_images" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and push image
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v5
|
||||
@ -871,9 +887,7 @@ jobs:
|
||||
labels: |
|
||||
org.opencontainers.image.revision=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
|
||||
org.opencontainers.image.created=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
|
||||
cache-from: |
|
||||
type=gha,scope=${{ steps.base_build.outputs.base_build_image }}
|
||||
type=registry,ref=${{ steps.base_build.outputs.base_build_image }}
|
||||
cache-from: ${{ steps.cache_data.outputs.cache_from }}
|
||||
|
||||
- name: Sign the images with GitHub OIDC Token
|
||||
env:
|
||||
|
Loading…
Reference in New Issue
Block a user