diff --git a/.github/workflows/build-push-image.yml b/.github/workflows/build-push-image.yml new file mode 100644 index 000000000..2157d224c --- /dev/null +++ b/.github/workflows/build-push-image.yml @@ -0,0 +1,36 @@ +name: Build and push +on: + workflow_run: + workflows: ["Dummy run"] + types: + - completed + +permissions: + pull-requests: write + contents: write + +jobs: + test-run: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - run: echo "this is triggered" + - name: Install latest podman + run: | + bash .github/workflows/scripts/install_latest_podman.sh + - name: Build Image + id: build_image + uses: redhat-actions/buildah-build@v2 + with: + image: "opendatahub-tests" + layers: false + tags: ${{ github.event.pull_request.number }} + containerfiles: | + Dockerfile + - name: Podman Login + uses: redhat-actions/podman-login@v1 + with: + registry: ${{ secrets.IMAGE_REGISTRY }} + username: ${{ secrets.TEMP_USER }} + password: ${{ secrets.TEMP_TOKEN }} diff --git a/.github/workflows/dummy_workflow.yml b/.github/workflows/dummy_workflow.yml new file mode 100644 index 000000000..ab131593a --- /dev/null +++ b/.github/workflows/dummy_workflow.yml @@ -0,0 +1,9 @@ +name: Dummy run +on: + pull_request: + +jobs: + test-run: + runs-on: ubuntu-latest + steps: + - run: echo "this is triggered" diff --git a/.github/workflows/scripts/install_latest_podman.sh b/.github/workflows/scripts/install_latest_podman.sh new file mode 100644 index 000000000..ceedbe03c --- /dev/null +++ b/.github/workflows/scripts/install_latest_podman.sh @@ -0,0 +1,3 @@ +sudo apt-get update +sudo apt-get -y upgrade +sudo apt-get -y install podman diff --git a/Makefile b/Makefile index 7229e87f2..1513a0d2f 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ IMAGE_BUILD_CMD = $(shell which podman 2>/dev/null || which docker) IMAGE_REGISTRY ?= "quay.io" REGISTRY_NAMESPACE ?= "opendatahub" IMAGE_NAME="opendatahub-tests" -IMAGE_TAG ?= "latest" +IMAGE_TAG ?= "latest-test" FULL_OPERATOR_IMAGE ?= "$(IMAGE_REGISTRY)/$(REGISTRY_NAMESPACE)/$(IMAGE_NAME):$(IMAGE_TAG)"