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