Skip to content

Commit 5b9c4ff

Browse files
alicefrjlebon
authored andcommitted
ci: push operator image in a separate job
Define the push also in a separate job as the build. In order to reference the same image, also in this stage it needs to be loaded by the tarball created at the previous stage. Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
1 parent 950dd36 commit 5b9c4ff

1 file changed

Lines changed: 18 additions & 3 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ jobs:
111111
timeout-minutes: 30
112112
permissions:
113113
contents: read
114-
env:
115-
IMAGE: ghcr.io/${{ github.repository }}
116114
steps:
117115
- name: Checkout
118116
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
@@ -188,8 +186,25 @@ jobs:
188186
path: _output/logs/
189187
if-no-files-found: ignore
190188

189+
push:
190+
if: github.event_name == 'push'
191+
runs-on: ubuntu-latest
192+
needs: e2e
193+
permissions:
194+
contents: read
195+
packages: write
196+
env:
197+
IMAGE: ghcr.io/${{ github.repository }}
198+
steps:
199+
- name: Download operator image
200+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
201+
with:
202+
name: operator-image
203+
204+
- name: Load operator image
205+
run: podman load -i operator-image.tar
206+
191207
- name: Push to GHCR
192-
if: github.event_name == 'push'
193208
env:
194209
ACTOR: ${{ github.actor }}
195210
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)