-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow initialisation action for code re-use.
- Loading branch information
0 parents
commit 6acdca8
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |