Skip to content

Commit

Permalink
Use org-level defined secret, if available
Browse files Browse the repository at this point in the history
  • Loading branch information
ckelleyRH committed Jul 20, 2021
1 parent 4c09565 commit 1b99d40
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
name: "Determine Fedora versions"
description: "Determine the latest and previous versions of Fedora to run the CI against"
inputs:
test-override:
description: 'Override matrix for testing'
required: true
outputs:
matrix:
description: "Fedora versions"
Expand All @@ -15,12 +11,12 @@ runs:
run: |
export latest=$(cat /etc/fedora-release | awk '{ print $3 }')
export previous=$(cat /etc/fedora-release | awk '{ print $3 - 1}')
echo "Running CI against Fedora $previous and $latest"
if [ "${{ inputs.test-override }}" == "" ]
if [ "${{ secrets.MATRIX }}" == "" ]
then
echo "::set-output name=matrix::{\"os\":[\"$previous\", \"$latest\"]}"
echo "Running CI against Fedora $previous and $latest"
else
echo "::set-output name=matrix::${{ inputs.test-override }}"
echo "::set-output name=matrix::${{ secrets.MATRIX }}"
echo "Test matrix defined: ${{ secrets.MATRIX }}"
fi
echo "::set-output name=matrix::{\"os\":[\"$previous\", \"$latest\"]}"
shell: bash

0 comments on commit 1b99d40

Please sign in to comment.