From d8a0a84ac479d8fdf3b99ff5f147c8abf58fde9e Mon Sep 17 00:00:00 2001 From: JoshuaLicense Date: Tue, 2 Jul 2024 15:39:06 +0100 Subject: [PATCH] ci: pass major.minor on schedule build only (cherry picked from commit a43d91724e578498144e731e4b408a8a5f27f340) --- .github/workflows/cd.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index a5d2b72..325529e 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -20,6 +20,8 @@ jobs: outputs: tag_name: ${{ steps.release.outputs.tag_name }} release_created: ${{ steps.release.outputs.release_created }} + major: ${{ steps.release.outputs.major }} + minor: ${{ steps.release.outputs.minor }} steps: - uses: googleapis/release-please-action@v4 id: release @@ -78,7 +80,7 @@ jobs: - base: ${{ github.event_name == 'schedule' || needs.release-please.outputs.release_created || contains(needs.orchestrator.outputs.changed-directories, 'php/8.3/cli') && 'ignored' || 'php/8.3/cli' }} uses: ./.github/workflows/docker.yaml with: - image-version: ${{ (needs.release-please.outputs.release_created || github.event_name == 'schedule') && needs.release-please.outputs.tag_name || github.sha }} + image-version: ${{ github.event_name == 'schedule' && format('{0}.{1}', needs.release-please.outputs.major, needs.release-please.outputs.minor) || (needs.release-please.outputs.release_created && needs.release-please.outputs.tag_name || github.sha) }} dockerfile-directory: ${{ matrix.base }} repository: ${{ matrix.base }} push: true