mirror of
https://github.com/funkemunky/KDE-x86_64-v4-Fedora.git
synced 2026-05-31 00:51:56 +00:00
Adding prebuilt builder image workflow and containerfile
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
name: Publish RPM Builder Image
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'ci/fedora-rpm-builder.Containerfile'
|
||||
- '.github/workflows/publish-rpm-builder-image.yml'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Derive image coordinates
|
||||
id: vars
|
||||
run: |
|
||||
owner_lc="${GITHUB_REPOSITORY_OWNER,,}"
|
||||
repo_name="${GITHUB_REPOSITORY#*/}"
|
||||
repo_lc="${repo_name,,}"
|
||||
echo "image=ghcr.io/${owner_lc}/${repo_lc}-rpm-builder" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ steps.vars.outputs.image }}
|
||||
tags: |
|
||||
type=raw,value=latest
|
||||
type=sha
|
||||
labels: |
|
||||
org.opencontainers.image.title=Fedora RPM Builder
|
||||
org.opencontainers.image.description=Fedora RPM builder image for KDE x86_64 v3/v4 package workflows
|
||||
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
|
||||
|
||||
- name: Build and push image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ci/fedora-rpm-builder.Containerfile
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
@@ -0,0 +1,16 @@
|
||||
FROM fedora:43
|
||||
|
||||
# Keep downloaded RPMs in the image layer cache so rebuilds are cheaper.
|
||||
RUN printf '%s\n' 'keepcache=True' 'max_parallel_downloads=10' > /etc/dnf/dnf.conf.d/99-ci-cache.conf
|
||||
|
||||
RUN dnf -y upgrade --refresh \
|
||||
&& dnf -y install \
|
||||
'dnf-command(builddep)' \
|
||||
fedpkg \
|
||||
git \
|
||||
nodejs \
|
||||
python3 \
|
||||
rpm-build \
|
||||
rpmdevtools \
|
||||
&& dnf clean all
|
||||
|
||||
Reference in New Issue
Block a user