Skip to content

Commit

Permalink
ci: add stable and prerelease channels to our Move2Kube operator (#161)
Browse files Browse the repository at this point in the history
Signed-off-by: Harikrishnan Balagopal <harikrishmenon@gmail.com>
  • Loading branch information
HarikrishnanBalagopal authored Oct 5, 2023
1 parent 5b30223 commit 8219654
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/raise-operator-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,20 @@ 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
with:
script: |
const version = '${{ github.event.inputs.tag }}';
if(/^v\d+\.\d+\.\d+-\w+/.test(version)) {
core.setOutput('channel', 'prerelease');
} else {
core.setOutput('channel', 'stable');
}
- name: build the operator bundle and save to temp directory
run: |
cd operator/ || exit 1
VERSION='${{ github.event.inputs.tag }}' make bundle
VERSION='${{ github.event.inputs.tag }}' CHANNELS='${{ steps.get_channel.outputs.channel }}' 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
12 changes: 11 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,22 @@ 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
with:
script: |
const version = '${{ github.event.inputs.tag }}';
if(/^v\d+\.\d+\.\d+-\w+/.test(version)) {
core.setOutput('channel', 'prerelease');
} else {
core.setOutput('channel', 'stable');
}
- name: build the operator bundle and container images and push the images to quay
run: |
cd operator/ || exit 1
VERSION='${{ github.event.inputs.tag }}' make docker-build
VERSION='${{ github.event.inputs.tag }}' make docker-push
VERSION='${{ github.event.inputs.tag }}' make bundle
VERSION='${{ github.event.inputs.tag }}' CHANNELS='${{ steps.get_channel.outputs.channel }}' DEFAULT_CHANNEL='stable' make bundle
VERSION='${{ github.event.inputs.tag }}' make bundle-build
VERSION='${{ github.event.inputs.tag }}' make bundle-push
# build the operator bundle and container images
Expand Down

0 comments on commit 8219654

Please sign in to comment.