CI: initial hardcoded ci
Some checks failed
Build containers / Build and push image (base, 43) (push) Failing after 3m48s
Some checks failed
Build containers / Build and push image (base, 43) (push) Failing after 3m48s
This commit is contained in:
65
.gitea/workflows/build.yaml
Normal file
65
.gitea/workflows/build.yaml
Normal file
@@ -0,0 +1,65 @@
|
||||
name: Build containers
|
||||
|
||||
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: "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"
|
||||
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
dnf install -y nodejs
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install latest rpm-ostree package from testing repos
|
||||
run: |
|
||||
dnf upgrade -y --enablerepo=updates-testing --refresh rpm-ostree
|
||||
|
||||
- name: Build Bootable Container image
|
||||
run: |
|
||||
./builder.sh "${{ matrix.image }}" "${{ matrix.version }}"
|
||||
|
||||
- name: Compute version + buildid
|
||||
id: meta
|
||||
run: |
|
||||
if [[ -f ".buildid" ]]; then
|
||||
buildid="$(< .buildid)"
|
||||
else
|
||||
buildid="$(date '+%Y%m%d.0')"
|
||||
echo "${buildid}" > .buildid
|
||||
fi
|
||||
|
||||
echo "buildid=${buildid}" >> $GITHUB_OUTPUT
|
||||
echo "version=${{ matrix.version }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Push container image to registry
|
||||
uses: redhat-actions/push-to-registry@v2
|
||||
with:
|
||||
image: misthios/${{ matrix.image }}
|
||||
tags: |
|
||||
${{ steps.meta.outputs.version }}.${{ steps.meta.outputs.buildid }}
|
||||
${{ steps.meta.outputs.version }}
|
||||
registry: git.plabble.org
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
extra-args: |
|
||||
--compression-format=zstd
|
||||
Reference in New Issue
Block a user