File tree Expand file tree Collapse file tree 3 files changed +55
-1
lines changed
Expand file tree Collapse file tree 3 files changed +55
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Push image to registry
2+ on :
3+ issue_comment :
4+
5+ jobs :
6+ install-podman :
7+ name : build-push-image
8+ if : github.event.issue.pull_request && contains(github.event.comment.body, '/build-push-container')
9+ runs-on : ubuntu-latest
10+
11+ steps :
12+ - name : Checkout Push to Registry action
13+ uses : actions/checkout@v4
14+
15+ - name : Install latest podman
16+ run : |
17+ bash .github/workflows/scripts/install_latest_podman.sh
18+
19+ # Build image using Buildah action
20+ - name : Build Image
21+ id : build_image
22+ uses : redhat-actions/buildah-build@v2
23+ with :
24+ image : ${{ secret.IMAGE_NAME }}
25+ layers : false
26+ tags : ${{ github.event.pull_request.number }}
27+ dockerfiles : |
28+ ./Dockerfile
29+
30+ # Authenticate to container image registry to push the image
31+ - name : Podman Login
32+ uses : redhat-actions/podman-login@v1
33+ with :
34+ registry : ${{ env.IMAGE_REGISTRY }}
35+ username : ${{ secrets.TEMP_USER }}
36+ password : ${{ secrets.TEMP_TOKEN }}
37+
38+ # Push the image to Image Registry)
39+ - name : Push To Image registry
40+ uses : ./
41+ id : push
42+ with :
43+ image : ${{ steps.build_image.outputs.image }}
44+ tags : ${{ steps.build_image.outputs.tags }}
45+ registry : ${{ env.IMAGE_REGISTRY }}/${{ env.TEMP_NAMESPACE }}
46+ extra-args : |
47+ --disable-content-trust
48+
49+ - name : Echo outputs
50+ run : |
51+ echo "${{ toJSON(steps.push.outputs) }}"
Original file line number Diff line number Diff line change 1+ sudo apt-get update
2+ sudo apt-get -y upgrade
3+ sudo apt-get -y install podman
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ IMAGE_BUILD_CMD = $(shell which podman 2>/dev/null || which docker)
22IMAGE_REGISTRY ?= "quay.io"
33REGISTRY_NAMESPACE ?= "opendatahub"
44IMAGE_NAME ="opendatahub-tests"
5- IMAGE_TAG ?= "latest"
5+ IMAGE_TAG ?= "latest-test "
66
77FULL_OPERATOR_IMAGE ?= "$(IMAGE_REGISTRY ) /$(REGISTRY_NAMESPACE ) /$(IMAGE_NAME ) :$(IMAGE_TAG ) "
88
You can’t perform that action at this time.
0 commit comments