Skip to content

Commit

Permalink
fix: use environment variables to pass information to step
Browse files Browse the repository at this point in the history
  • Loading branch information
p5 authored Jan 4, 2025
1 parent 81f52fb commit fd6a40d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fd6a40d

Please sign in to comment.