Skip to content

Commit 4d7f02a

Browse files
committed
ci: Push built images to ghcr.io
It'll be really handy to have reference images which are tracking git main of bootc for all the streams. (TODO: switch these to be multi-arch at least for amd64, or maybe we should use Konflux to do this) Signed-off-by: Colin Walters <[email protected]>
1 parent d596a32 commit 4d7f02a

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ name: CI
1010

1111
permissions:
1212
actions: read
13+
packages: write
1314

1415
on:
1516
push:
@@ -23,6 +24,7 @@ env:
2324
# Something seems to be setting this in the default GHA runners, which breaks bcvk
2425
# as the default runner user doesn't have access
2526
LIBVIRT_DEFAULT_URI: "qemu:///session"
27+
DEV_IMAGE: ghcr.io/bootc-dev/dev-bootc
2628

2729
concurrency:
2830
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -156,6 +158,21 @@ jobs:
156158
with:
157159
name: tmt-log-PR-${{ github.event.number }}-${{ matrix.test_os }}-ostree-${{ env.ARCH }}
158160
path: /var/tmp/tmt
161+
162+
- name: Login to ghcr.io
163+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
164+
uses: redhat-actions/podman-login@v1
165+
with:
166+
registry: ghcr.io
167+
username: ${{ github.actor }}
168+
password: ${{ secrets.GITHUB_TOKEN }}
169+
170+
- name: Push container image
171+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
172+
run: |
173+
podman tag localhost/bootc ${{ env.DEV_IMAGE }}:${{ matrix.test_os }}
174+
podman push ${{ env.DEV_IMAGE }}:${{ matrix.test_os }}
175+
159176
# This variant does composefs testing
160177
test-integration-cfs:
161178
strategy:
@@ -200,3 +217,17 @@ jobs:
200217
with:
201218
name: tmt-log-PR-${{ github.event.number }}-${{ matrix.test_os }}-cfs-${{ env.ARCH }}
202219
path: /var/tmp/tmt
220+
221+
- name: Login to ghcr.io
222+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
223+
uses: redhat-actions/podman-login@v1
224+
with:
225+
registry: ghcr.io
226+
username: ${{ github.actor }}
227+
password: ${{ secrets.GITHUB_TOKEN }}
228+
229+
- name: Push container image
230+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
231+
run: |
232+
podman tag localhost/bootc ${{ env.DEV_IMAGE }}:stream10-uki
233+
podman push ${{ env.DEV_IMAGE }}:stream10-uki

0 commit comments

Comments
 (0)