diff --git a/RPMS/noarch/hello-0.0.1-1.fc43.noarch.rpm b/RPMS/noarch/hello-0.0.1-1.fc43.noarch.rpm deleted file mode 100644 index e731962..0000000 Binary files a/RPMS/noarch/hello-0.0.1-1.fc43.noarch.rpm and /dev/null differ diff --git a/SOURCES/hello-0.0.1.tar.gz b/SOURCES/hello-0.0.1.tar.gz deleted file mode 100644 index 78a32c7..0000000 Binary files a/SOURCES/hello-0.0.1.tar.gz and /dev/null differ diff --git a/SPECS/hello.spec b/SPECS/hello.spec deleted file mode 100644 index 013a777..0000000 --- a/SPECS/hello.spec +++ /dev/null @@ -1,29 +0,0 @@ -Name: hello -Version: 0.0.1 -Release: 1%{?dist} -Summary: A simple hello world script -BuildArch: noarch - -License: GPLv3+ -URL: http://git.phyllo.me/ -Source0: %{name}-%{version}.tar.gz - -Requires: bash - -%description -A demo RPM build - -%prep -%setup -q - -%install -rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT/%{_bindir} -cp %{name}.sh $RPM_BUILD_ROOT/%{_bindir} - -%files -%{_bindir}/%{name}.sh - -%changelog -* Wed Jul 09 2025 Lukas Greve - 0.0.1 -- First version being packaged diff --git a/SRPMS/hello-0.0.1-1.fc43.src.rpm b/SRPMS/hello-0.0.1-1.fc43.src.rpm deleted file mode 100644 index 77c4748..0000000 Binary files a/SRPMS/hello-0.0.1-1.fc43.src.rpm and /dev/null differ diff --git a/build-publish-rpm.yaml b/build-publish-rpm.yaml deleted file mode 100644 index 8efeed1..0000000 --- a/build-publish-rpm.yaml +++ /dev/null @@ -1,84 +0,0 @@ -name: Build and Publish RPM - -on: - push: - branches: - - main - tags: - - 'v*' - -jobs: - build-and-publish: - runs-on: fedora - defaults: - run: - shell: bash - container: - image: git.phyllo.me/devops/fedora-runner-image:latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup RPM build environment - run: | - mkdir -p ~/rpmbuild/{SOURCES,SPECS,BUILD,RPMS,SRPMS} - echo "%_topdir %(echo $HOME)/rpmbuild" > ~/.rpmmacros - - - name: Create source archive - run: | - tar -czf hello-0.0.1.tar.gz hello.sh - - - name: Copy spec file and source - run: | - cp hello.spec ~/rpmbuild/SPECS/ - cp hello-0.0.1.tar.gz ~/rpmbuild/SOURCES/ - - - name: Build RPM - run: | - cd ~/rpmbuild - rpmbuild -ba SPECS/hello.spec - - - name: Publish RPM to Gitea - if: github.ref_type == 'tag' - run: | - # Extract version from spec file - VERSION=$(grep -E "^Version:" hello.spec | cut -d: -f2 | xargs) - echo "Version: $VERSION" - - # Find built RPM - RPM_FILE=$(find ~/rpmbuild -name "*.rpm" -type f | head -1) - echo "RPM file: $RPM_FILE" - - # Publish to Gitea - if [ -n "$GITEA_TOKEN" ] && [ -n "$GITEA_OWNER" ]; then - curl -u "$GITEA_OWNER:$GITEA_TOKEN" \ - --upload-file "$RPM_FILE" \ - "https://gitea.example.com/api/packages/$GITEA_OWNER/rpm/upload" - else - echo "Missing GITEA_TOKEN or GITEA_OWNER environment variables" - exit 1 - fi - - - name: Publish RPM with group - if: github.ref_type == 'tag' - run: | - # Extract version from spec file - VERSION=$(grep -E "^Version:" hello.spec | cut -d: -f2 | xargs) - echo "Version: $VERSION" - - # Find built RPM - RPM_FILE=$(find ~/rpmbuild -name "*.rpm" -type f | head -1) - echo "RPM file: $RPM_FILE" - - # Publish to Gitea with group (using tag name as group) - TAG_NAME=${GITHUB_REF#refs/tags/} - echo "Publishing to group: $TAG_NAME" - - if [ -n "$GITEA_TOKEN" ] && [ -n "$GITEA_OWNER" ]; then - curl -u "$GITEA_OWNER:$GITEA_TOKEN" \ - --upload-file "$RPM_FILE" \ - "https://gitea.example.com/api/packages/$GITEA_OWNER/rpm/$TAG_NAME/upload" - else - echo "Missing GITEA_TOKEN or GITEA_OWNER environment variables" - exit 1 - fi