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

[WIP} Build and Install operator for test suite setup for PR checks #154

Closed
wants to merge 3 commits into from
Closed
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
50 changes: 50 additions & 0 deletions .github/workflows/build-operator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build operator for PR_check

on:
pull_request_target:
types: [opened,labeled,unlabeled ,synchronized]
branches:
- 'main'
paths-ignore:
- 'LICENSE'
- '**/.gitignore'
- '**.md'
- '*.txt'
- '.github/**'

jobs:
push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: "refs/pull/${{ github.event.number }}/merge"

- name: Install operator-sdk
run: make install-operator-sdk

- name: Create a test container image registry
run: |
echo "Installing publicly accessible registry"
./oc new-project public-registry
./oc new-app registry
./oc expose service registry
registry_url=$(./oc get routes | grep registry | awk '{print $2}')
./oc patch image.config.openshift.io/cluster -p "{\"spec\":{\"registrySources\":{\"insecureRegistries\":[\"$registry_url:80\"]}}}" --type=merge

- name: Image Build
run: |
make build
make image-build -e IMG=${{registry_url}}/project-codeflare/codeflare-operator:${{ github.event.number }}

- name: Image Push
run: |
make image-push -e IMG=${registry_url}/project-codeflare/codeflare-operator:${{ github.event.number }}