miracle-wm/.github/workflows/fedora-rpm.yml

47 lines
1.4 KiB
YAML
Raw Permalink Normal View History

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.1.0'
echo 'RUN tar --create --file miracle-wm-0.1.0.tar.gz miracle-wm-0.1.0'
echo 'RUN mv miracle-wm-0.1.0.tar.gz ~/rpmbuild/SOURCES'
echo 'RUN cp ./miracle-wm-0.1.0/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