From fd6a40d15e987365b1cc4b2080952c32457f83d5 Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Sat, 4 Jan 2025 23:11:58 +0000 Subject: [PATCH] fix: use environment variables to pass information to step --- .github/workflows/reusable-build.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index ccbcdb5c..26bc09b4 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -58,15 +58,20 @@ jobs: - name: Matrix Variables shell: bash + env: + MATRIX_SOURCE_IMAGE: ${{ matrix.source_image }} + MATRIX_IMAGE_NAME: ${{ matrix.image_name }} run: | - if [[ -z "${{ matrix.source_image }}" ]]; then - SOURCE_IMAGE=${{ matrix.source_image }} + if [[ -z $MATRIX_SOURCE_IMAGE ]]; then + echo "MATRIX_SOURCE_IMAGE not empty" + SOURCE_IMAGE=$MATRIX_SOURCE_IMAGE else - SOURCE_IMAGE=${{ matrix.image_name }} + echo "MATRIX_SOURCE_IMAGE empty" + SOURCE_IMAGE=$MATRIX_IMAGE_NAME fi echo "SOURCE_ORG=fedora-ostree-desktops" >> $GITHUB_ENV - echo "IMAGE_NAME=${{ matrix.image_name }}-main" >> $GITHUB_ENV + echo "IMAGE_NAME=$MATRIX_IMAGE_NAME-main" >> $GITHUB_ENV echo "SOURCE_IMAGE=$SOURCE_IMAGE" >> $GITHUB_ENV - name: Generate tags