CI: initial hardcoded ci
Some checks failed
Build container images / Build and push image (base, 43) (push) Failing after 3s
Some checks failed
Build container images / Build and push image (base, 43) (push) Failing after 3s
This commit is contained in:
66
.gitea/workflows/build.yaml
Normal file
66
.gitea/workflows/build.yaml
Normal file
@@ -0,0 +1,66 @@
|
||||
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]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build OCI bootc image
|
||||
run: |
|
||||
mkdir -p oci
|
||||
sudo podman run --rm --privileged --security-opt label=disable \
|
||||
-v /var/lib/containers/storage:/var/lib/containers/storage \
|
||||
-v $PWD:/build \
|
||||
-w /build \
|
||||
quay.io/centos-bootc/bootc-image-builder-container:latest \
|
||||
--type container \
|
||||
--output oci \
|
||||
manifests/${{ matrix.image }}.yaml
|
||||
|
||||
- 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 }}"
|
||||
|
||||
skopeo copy \
|
||||
--authfile /tmp/auth.json \
|
||||
oci:oci \
|
||||
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}
|
||||
Reference in New Issue
Block a user