ci: rework build
Some checks failed
Build containers / Build and push image (asahi-cosmic, 43) (push) Failing after 3h12m30s
Some checks failed
Build containers / Build and push image (asahi-cosmic, 43) (push) Failing after 3h12m30s
This commit is contained in:
@@ -10,74 +10,56 @@ on:
|
||||
jobs:
|
||||
build_push:
|
||||
name: Build and push image
|
||||
runs-on: job-v2
|
||||
|
||||
runs-on: wesley-arm
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
image: [asahi-cosmic]
|
||||
version: [43] #Build current stable,next stable/rawhide (if not branched)
|
||||
|
||||
container:
|
||||
image: "quay.io/fedora-ostree-desktops/buildroot:43"
|
||||
options: "--security-opt apparmor=unconfined --privileged --user 0:0 --device=/dev/kvm --device=/dev/fuse --volume /:/run/host:rw --arch arm64"
|
||||
|
||||
image: "quay.io/fedora-ostree-desktops/buildroot:${{ matrix.version }}"
|
||||
options: "--security-opt=label=disable --privileged --user 0:0 --device=/dev/fuse --volume /:/run/host:rw"
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
dnf install -y nodejs
|
||||
dnf upgrade -y --enablerepo=updates-testing --refresh rpm-ostree
|
||||
|
||||
- name: Install latest rpm-ostree package from testing repos
|
||||
run: |
|
||||
dnf upgrade -y --enablerepo=updates-testing --refresh rpm-ostree
|
||||
dnf install -y nodejs
|
||||
mkdir -p ~/.docker
|
||||
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build Bootable Container image
|
||||
run: |
|
||||
./builder.sh "${{ matrix.image }}" "${{ matrix.version }}"
|
||||
|
||||
- name: Prepare Docker config directory
|
||||
run: mkdir -p /root/.docker
|
||||
|
||||
- name: Login to Container Registry
|
||||
- name: Log in
|
||||
uses: redhat-actions/podman-login@v1
|
||||
if: (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && 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 container image to container registry
|
||||
id: push
|
||||
- name: Build rootfs
|
||||
run: |
|
||||
# Determine buildid (same logic as upstream)
|
||||
if [[ -f ".buildid" ]]; then
|
||||
buildid="$(< .buildid)"
|
||||
else
|
||||
buildid="$(date '+%Y%m%d.0')"
|
||||
echo "${buildid}" > .buildid
|
||||
fi
|
||||
sudo ./builder.sh asahi-cosmic 43
|
||||
|
||||
version="${{ matrix.version }}"
|
||||
image="${{ matrix.image }}"
|
||||
- name: Build container
|
||||
id: build
|
||||
uses: job79/buildah-build@65b3793a1370c1ccd74a5c0d090d70eb9637a4ef
|
||||
with:
|
||||
image: misthios/${{ matrix.image }}
|
||||
tags: ${{ matrix.version }}
|
||||
containerfiles: ./Containerfile
|
||||
build-args: IMAGE=${{ matrix.image }}
|
||||
|
||||
# Path to the OCI archive produced by builder.sh
|
||||
archive="images/${image}/manifest.ociarchive"
|
||||
|
||||
echo "Pushing ${archive} as ${image}:${version}.${buildid}"
|
||||
|
||||
# Push version.buildid
|
||||
skopeo copy \
|
||||
--authfile /tmp/auth.json \
|
||||
--retry-times 3 \
|
||||
--dest-compress-format zstd \
|
||||
oci-archive:${archive} \
|
||||
docker://git.plabble.org/misthios/${image}:${version}.${buildid}
|
||||
|
||||
# Push version
|
||||
skopeo copy \
|
||||
--authfile /tmp/auth.json \
|
||||
--retry-times 3 \
|
||||
--dest-compress-format zstd \
|
||||
docker://git.plabble.org/misthios/${image}:${version}.${buildid} \
|
||||
docker://git.plabble.org/misthios/${image}:${version}
|
||||
- name: Push
|
||||
uses: redhat-actions/push-to-registry@v2
|
||||
with:
|
||||
image: ${{ steps.build.outputs.image }}
|
||||
tags: ${{ steps.build.outputs.tags }}
|
||||
registry: git.plabble.org
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
extra-args: |
|
||||
--compression-format=zstd
|
||||
--compression-level=12
|
||||
|
||||
Reference in New Issue
Block a user