mirror of
https://github.com/miracle-wm-org/miracle-wm.git
synced 2024-11-30 02:09:10 +03:00
55 lines
1.8 KiB
YAML
55 lines
1.8 KiB
YAML
name: Fedora RPM
|
|
|
|
on:
|
|
push:
|
|
branches: [ "master" ]
|
|
pull_request:
|
|
branches: [ "master" ]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.number && format('pr{0}', github.event.number) || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
Fedora:
|
|
name: Build on Fedora
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Setup Podman
|
|
run: |
|
|
sudo apt update
|
|
sudo apt-get -y install podman
|
|
podman pull fedora:40
|
|
|
|
- name: Get source
|
|
uses: actions/checkout@v3
|
|
with:
|
|
path: 'miracle-wm'
|
|
|
|
- name: Build the rpm
|
|
run: |
|
|
chmod -R 755 miracle-wm
|
|
{
|
|
echo 'FROM fedora:40'
|
|
echo 'RUN dnf -y update'
|
|
echo 'RUN dnf install -y rpmdevtools rpmlint dnf-plugins-core'
|
|
echo 'RUN dnf clean all'
|
|
echo 'RUN rpmdev-setuptree'
|
|
echo 'COPY miracle-wm miracle-wm-0.2.1'
|
|
echo 'RUN tar --create --file miracle-wm-0.2.1.tar.gz miracle-wm-0.2.1'
|
|
echo 'RUN mv miracle-wm-0.2.1.tar.gz ~/rpmbuild/SOURCES'
|
|
echo 'RUN cp ./miracle-wm-0.2.1/rpm/miracle-wm.spec ~/rpmbuild/SPECS'
|
|
echo 'RUN dnf -y builddep ~/rpmbuild/SPECS/miracle-wm.spec'
|
|
echo 'RUN rpmbuild -bs ~/rpmbuild/SPECS/miracle-wm.spec'
|
|
} > podmanfile
|
|
podman build --tag fedora40test -f ./podmanfile
|
|
podman run --name miraclewmbuilder fedora40test
|
|
podman cp miraclewmbuilder:/root/rpmbuild/SRPMS/miracle-wm-0.2.1-1.fc40.src.rpm ./
|
|
podman stop --all
|
|
|
|
- name: Store sources as artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: miracle-wm-0.2.1-1.fc40.src.rpm
|
|
path: miracle-wm-0.2.1-1.fc40.src.rpm |