Skip to content

Commit

Permalink
Add workflow initialisation action for code re-use.
Browse files Browse the repository at this point in the history
  • Loading branch information
ckelleyRH committed Jul 19, 2021
0 parents commit 6acdca8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Determine Fedora versions"
description: "Determine the latest and previous versions of Fedora to run the CI against"
outputs:
matrix:
description: "Fedora versions"
value: ${{ steps.set-matrix.outputs.matrix }}
runs:
using: "composite"
steps:
- id: set-matrix
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"
echo "::set-output name=matrix::{\"os\":[\"$previous\", \"$latest\"]}"
shell: bash

0 comments on commit 6acdca8

Please sign in to comment.