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