Skip to content

Commit

Permalink
fix: github workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksii Orel <[email protected]>
  • Loading branch information
olexii4 committed Apr 30, 2024
1 parent 1b8d648 commit 293b647
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 27 deletions.
File renamed without changes.
29 changes: 29 additions & 0 deletions .github/workflows/qemu-image-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build of the QEMU container image

on:
push:
branches: [dockerfile]

jobs:
build_image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to quay.io
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Build and push image
uses: docker/build-push-action@v4
with:
context: .
file: dockerfiles/qemu.Dockerfile
push: true
tags: quay.io/che-incubator/openwrt-runner:latest
15 changes: 0 additions & 15 deletions dockerfiles/Dockerfile

This file was deleted.

13 changes: 1 addition & 12 deletions dockerfiles/qemu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ RUN apk add --no-cache \
&& \
rm -f /usr/share/qemu/edk2-*

# Add OpenWRT image
ENV IMAGE_FILE="openwrt-x86-generic-generic-ext4-combined.img.gz"

WORKDIR /var/lib/qemu-image

COPY "output/${IMAGE_FILE}" "/var/lib/qemu-image/${IMAGE_FILE}"

# Support Arbitrary User IDs in container
RUN echo -e '#!/bin/sh\n\
set -ex \n\
Expand All @@ -38,11 +31,7 @@ fi \n\
# Provision VM disk image
RUN echo -e '#!/bin/sh\n\
set -ex \n\
if [ ! -f /var/lib/qemu/image.qcow2 ]; then \n\
gunzip --stdout "/var/lib/qemu-image/${IMAGE_FILE}" > /var/lib/qemu/image.raw || true \n\
qemu-img convert -f raw -O qcow2 /var/lib/qemu/image.raw /var/lib/qemu/image.qcow2 \n\
rm /var/lib/qemu/image.raw \n\
fi \n\
qemu-img convert -f raw -O qcow2 /projects/openwrt-helloworld/output/image.raw /var/lib/qemu/image.qcow2 \n\
if [ -n "${QEMU_STORAGE}" ]; then \n\
qemu-img resize /var/lib/qemu/image.qcow2 "${QEMU_STORAGE}" \n\
fi \n\
Expand Down

0 comments on commit 293b647

Please sign in to comment.