-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #264 from mgoerens/get_ocp_range
Get OCP range from external library
- Loading branch information
Showing
8 changed files
with
148 additions
and
192 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,35 @@ | ||
name: 'Get OCP range' | ||
description: 'Get the range of OCP versions corresponding to the provided range of Kubernetes versions' | ||
inputs: | ||
kube-version-range: | ||
description: 'Range of Kubernetes versions' | ||
required: true | ||
outputs: | ||
ocp-version-range: | ||
description: "Corresponsing range of OCP versions" | ||
value: ${{ steps.run-get-ocp-range.outputs.ocp-version-range }} | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '>=1.20' | ||
|
||
- name: Install get-ocp-range | ||
shell: bash | ||
run: go install github.com/opdev/getocprange/cmd/get-ocp-range@latest | ||
|
||
- name: Run get-ocp-range | ||
id: run-get-ocp-range | ||
shell: bash | ||
run: | | ||
echo "::debug::Received kubeVersionRange to translate '${{ inputs.kube-version-range }}'" | ||
OCP_VERSION_RANGE=$(get-ocp-range '${{ inputs.kube-version-range }}') | ||
echo "ocp-version-range=$OCP_VERSION_RANGE" >> $GITHUB_OUTPUT | ||
echo "::debug::Successfully translated kubeVersionRange to OCPVersionRange $OCP_VERSION_RANGE" | ||
- name: Display error message if get-ocp-range failed | ||
if: ${{ failure() && steps.run-get-ocp-range.outcome == 'failure' }} | ||
shell: bash | ||
run: echo "::error file=.github/actions/get-ocp-range/action.yaml::Error running get-ocp-range" |
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
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
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
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
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
Oops, something went wrong.