From c0c14dd368c77feb42142894f2812ca72f8771e0 Mon Sep 17 00:00:00 2001 From: Alexey Pustovalov Date: Tue, 21 May 2024 18:30:18 +0900 Subject: [PATCH] Updated build process for Zabbix agent (windows) --- .github/workflows/base_images_build_windows.yml | 5 +++-- .github/workflows/images_build_windows.yml | 13 +++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/base_images_build_windows.yml b/.github/workflows/base_images_build_windows.yml index 099e23e3b..ea37fc778 100644 --- a/.github/workflows/base_images_build_windows.yml +++ b/.github/workflows/base_images_build_windows.yml @@ -12,6 +12,7 @@ on: schedule: - cron: '0 10 * * 2,5' workflow_dispatch: + workflow_call: defaults: run: @@ -323,5 +324,5 @@ jobs: - name: Cache image digest uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 with: - path: ${{ env.BASE_IMAGE_NAME }}_${{ matrix.os }}_${{ matrix.component }}_${{ needs.init_build.outputs.current_branch }} - key: ${{ env.BASE_IMAGE_NAME }}-${{ matrix.os }} + path: ${{ env.BASE_IMAGE_NAME }}_${{ matrix.os }}_${{ matrix.component }} + key: ${{ env.BASE_IMAGE_NAME }}-${{ matrix.os }}-${{ needs.init_build.outputs.current_branch }} diff --git a/.github/workflows/images_build_windows.yml b/.github/workflows/images_build_windows.yml index a205085cb..9207bc6d4 100644 --- a/.github/workflows/images_build_windows.yml +++ b/.github/workflows/images_build_windows.yml @@ -140,6 +140,13 @@ jobs: echo "current_branch=$github_ref" >> $GITHUB_OUTPUT echo "sha_short=$sha_short" >> $GITHUB_OUTPUT + build_base: + uses: ./.github/workflows/base_images_build_windows.yml + if: ${{ github.event_name == 'release' }} + permissions: + contents: read + id-token: write + build_components: name: Build ${{ matrix.component }} sources on ${{ matrix.os }} needs: [ "init_build" ] @@ -208,10 +215,8 @@ jobs: - name: Download SHA256 tag of ${{ env.BASE_IMAGE_NAME }}:${{ matrix.os }} uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 with: - path: | - ${{ env.BASE_IMAGE_NAME }}_${{ matrix.os }}_${{ matrix.component }}_${{ needs.init_build.outputs.sha_short }} - ${{ env.BASE_IMAGE_NAME }}_${{ matrix.os }}_${{ matrix.component }}_${{ needs.init_build.outputs.current_branch }} - key: ${{ env.BASE_IMAGE_NAME }}-${{ matrix.os }} + path: ${{ env.BASE_IMAGE_NAME }}_${{ matrix.os }}_${{ matrix.component }} + key: ${{ env.BASE_IMAGE_NAME }}-${{ matrix.os }}-${{ needs.init_build.outputs.current_branch }} fail-on-cache-miss: true - name: Retrieve ${{ env.BASE_IMAGE_NAME }}:${{ matrix.os }} SHA256 tag