Some checks failed
Build container images / Build and push image (base, 43) (push) Failing after 26s
75 lines
2.0 KiB
YAML
75 lines
2.0 KiB
YAML
name: Build container images
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
branches: ["main"]
|
|
push:
|
|
branches: ["main"]
|
|
|
|
jobs:
|
|
build_push:
|
|
name: Build and push image
|
|
runs-on: job-v2
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
image: [base]
|
|
version: [43]
|
|
|
|
container:
|
|
image: "registry.fedoraproject.org/fedora:rawhide"
|
|
options: "--privileged --user 0:0 --device=/dev/kvm --device=/dev/fuse --volume /:/run/host:rw"
|
|
|
|
steps:
|
|
- name: Install dependencies
|
|
run: |
|
|
dnf install -y bootc-image-builder skopeo ostree nodejs
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build OCI bootc image
|
|
run: |
|
|
mkdir -p output
|
|
bootc-image-builder \
|
|
--type oci \
|
|
--output output \
|
|
manifests/${{ matrix.image }}.yaml
|
|
|
|
- name: Prepare Docker config directory
|
|
run: mkdir -p /root/.docker
|
|
|
|
- name: Login to Container Registry
|
|
uses: redhat-actions/podman-login@v1
|
|
if: github.ref == 'refs/heads/main'
|
|
with:
|
|
registry: git.plabble.org
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
auth_file_path: /tmp/auth.json
|
|
|
|
- name: Push OCI image to registry
|
|
run: |
|
|
if [[ -f ".buildid" ]]; then
|
|
buildid="$(< .buildid)"
|
|
else
|
|
buildid="$(date '+%Y%m%d.0')"
|
|
echo "${buildid}" > .buildid
|
|
fi
|
|
|
|
version="${{ matrix.version }}"
|
|
image="${{ matrix.image }}"
|
|
oci_dir="output/oci"
|
|
|
|
skopeo copy \
|
|
--authfile /tmp/auth.json \
|
|
oci:${oci_dir} \
|
|
docker://git.plabble.org/misthios/${image}:${version}.${buildid}
|
|
|
|
skopeo copy \
|
|
--authfile /tmp/auth.json \
|
|
docker://git.plabble.org/misthios/${image}:${version}.${buildid} \
|
|
docker://git.plabble.org/misthios/${image}:${version}
|