Skip to content

Commit f880ac9

Browse files
achilleas-ksupakeen
authored andcommitted
github: publish upstream container to ghcr
At some point we stopped building and pushing the container to ghcr to focus on having only Konflux builds and a single source of the upstream (though, more like "midstream") container on quay.io. However, Konflux builds are not entirely reliable and are inaccessible to external users and contributors. So while the container itself is publicly available under the quay.io/centos-bootc namespace, investigating (and solving) build failures requires contacting people with access to the private job logs. Re-enabling ghcr builds allows us (and practically anyone) to easily investigate and solve build failures and gives us a reliable upstream container available shortly after every PR is merged, making troubleshooting against the latest version a lot easier. This reverts commit 62dda27. See also discussion in #1000.
1 parent 705d069 commit f880ac9

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/build.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,19 @@ name: Build containers
33
on:
44
pull_request:
55
branches: [main]
6+
workflow_dispatch:
67
# for merge queue
78
merge_group:
9+
push:
10+
branches: [main]
811

912
env:
13+
REGISTRY: ghcr.io
1014
IMAGE_NAME: ${{ github.repository }}
1115

1216
permissions:
1317
contents: read
18+
packages: write
1419

1520
jobs:
1621
build:
@@ -25,3 +30,19 @@ jobs:
2530
image: ${{ env.IMAGE_NAME }}
2631
tags: "latest"
2732
containerfiles: Containerfile
33+
34+
- name: Log in to the Container registry
35+
if: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'push') && github.ref == 'refs/heads/main' }}
36+
uses: redhat-actions/podman-login@v1
37+
with:
38+
registry: ${{ env.REGISTRY }}
39+
username: ${{ github.actor }}
40+
password: ${{ secrets.GITHUB_TOKEN }}
41+
42+
- name: Push to GitHub Container Repository
43+
if: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'push') && github.ref == 'refs/heads/main' }}
44+
uses: redhat-actions/push-to-registry@v2
45+
with:
46+
image: ${{ env.IMAGE_NAME }}
47+
tags: "latest"
48+
registry: ${{ env.REGISTRY }}

0 commit comments

Comments
 (0)