File tree Expand file tree Collapse file tree 3 files changed +56
-1
lines changed
Expand file tree Collapse file tree 3 files changed +56
-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+ types : [ created ]
5+
6+ jobs :
7+ install-podman :
8+ name : build-push-image
9+ if : github.event.issue.pull_request && contains(github.event.comment.body, '/build-push-container')
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout Push to Registry action
14+ uses : actions/checkout@v4
15+
16+ - name : Install latest podman
17+ run : |
18+ bash .github/workflows/scripts/install_latest_podman.sh
19+
20+ # Build image using Buildah action
21+ - name : Build Image
22+ id : build_image
23+ uses : redhat-actions/buildah-build@v2
24+ with :
25+ image : ${{ secret.IMAGE_NAME }}
26+ layers : false
27+ tags : ${{ github.event.pull_request.number }}
28+ dockerfiles : |
29+ ./Dockerfile
30+
31+ # Authenticate to container image registry to push the image
32+ - name : Podman Login
33+ uses : redhat-actions/podman-login@v1
34+ with :
35+ registry : ${{ env.IMAGE_REGISTRY }}
36+ username : ${{ secrets.TEMP_USER }}
37+ password : ${{ secrets.TEMP_TOKEN }}
38+
39+ # Push the image to Image Registry)
40+ - name : Push To Image registry
41+ uses : ./
42+ id : push
43+ with :
44+ image : ${{ steps.build_image.outputs.image }}
45+ tags : ${{ steps.build_image.outputs.tags }}
46+ registry : ${{ env.IMAGE_REGISTRY }}/${{ env.TEMP_NAMESPACE }}
47+ extra-args : |
48+ --disable-content-trust
49+
50+ - name : Echo outputs
51+ run : |
52+ 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