Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix the github script in raise pr workflow to produce channel name output correctly #163

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/raise-operator-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,17 @@ jobs:
echo "installing yq..."
curl -L https://github.com/mikefarah/yq/releases/download/v4.13.5/yq_linux_amd64 -o /usr/local/bin/yq && chmod +x /usr/local/bin/yq
echo "yq installed"
- name: get_channel
uses: actions/github-script@v3
- id: get_channel
uses: actions/github-script@v6
with:
result-encoding: string
script: |
const version = '${{ github.event.inputs.tag }}';
if(/^v\d+\.\d+\.\d+-\w+/.test(version)) {
core.setOutput('channel', 'prerelease');
} else {
core.setOutput('channel', 'stable');
}
return /^v\d+\.\d+\.\d+-\w+/.test(version) ? 'prerelease' : 'stable';
- name: build the operator bundle and save to temp directory
run: |
cd operator/ || exit 1
VERSION='${{ github.event.inputs.tag }}' CHANNELS='${{ steps.get_channel.outputs.channel }}' DEFAULT_CHANNEL='stable' make bundle
VERSION='${{ github.event.inputs.tag }}' CHANNELS='${{ steps.get_channel.outputs.result }}' DEFAULT_CHANNEL='stable' make bundle
echo 'copy-bundle-into-tmp'
cp -r bundle/ /tmp/bundle-operator-move2kube
cp bundle.Dockerfile /tmp/bundle.Dockerfile
Expand Down
Loading