Skip to content

Commit 7e4bcf3

Browse files
authored
Publish development binaries as OCI artifacts (#198)
Adds GitHub workflow to publish bcvk binaries from main branch to ghcr.io/bootc-dev/bcvk-binary as OCI artifacts. This enables testing unreleased features in downstream CI (like bootc) without building from the source. Binaries can be pulled with: oras pull ghcr.io/bootc-dev/bcvk-binary:x86_64-latest Fixes:#181 Assisted-by: Claude Code (Sonnet 4.5) Signed-off-by: gursewak1997 <gursmangat@gmail.com>
1 parent 3e2601c commit 7e4bcf3

2 files changed

Lines changed: 45 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,39 @@ jobs:
8080
target/bcvk-*.tar.gz.sha256
8181
retention-days: 7
8282

83+
publish-binary:
84+
runs-on: ubuntu-latest
85+
needs: build
86+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
87+
permissions:
88+
contents: read
89+
packages: write
90+
91+
steps:
92+
- name: Install ORAS CLI
93+
run: |
94+
# renovate: datasource=github-releases depName=oras-project/oras
95+
VERSION=1.2.2
96+
curl -LO https://github.com/oras-project/oras/releases/download/v${VERSION}/oras_${VERSION}_linux_amd64.tar.gz
97+
tar -xzf oras_${VERSION}_linux_amd64.tar.gz
98+
sudo mv oras /usr/local/bin/
99+
100+
- name: Download bcvk binary artifacts
101+
uses: actions/download-artifact@v4
102+
with:
103+
name: bcvk-binary
104+
105+
- name: Login to GitHub Container Registry
106+
run: |
107+
echo "${{ secrets.GITHUB_TOKEN }}" | oras login ghcr.io --username ${{ github.repository_owner }} --password-stdin
108+
109+
- name: Push binary as OCI artifact
110+
run: |
111+
for file in bcvk-*.tar.gz; do
112+
ARCH=$(echo "$file" | sed 's/bcvk-\(.*\)-unknown-linux-gnu\.tar\.gz/\1/')
113+
oras push "ghcr.io/bootc-dev/bcvk-binary:${ARCH}-latest" "$file:application/gzip" "${file}.sha256:text/plain"
114+
done
115+
83116
integration-tests:
84117
runs-on: ubuntu-24.04
85118
needs: build

docs/src/installation.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@ Optional:
1616
sudo usermod -a -G libvirt $USER
1717
```
1818

19+
## Development Binaries
20+
21+
Pre-built binaries from `main` are available as OCI artifacts:
22+
23+
```bash
24+
# Requires ORAS (https://oras.land/)
25+
# Note: This command pulls the x86_64 architecture binary
26+
oras pull ghcr.io/bootc-dev/bcvk-binary:x86_64-latest
27+
tar -xzf bcvk-x86_64-unknown-linux-gnu.tar.gz
28+
sudo install -m 755 bcvk-x86_64-unknown-linux-gnu /usr/local/bin/bcvk
29+
```
30+
1931
## Building from Source
2032

2133
Without cloning the repo:

0 commit comments

Comments
 (0)