From 52a5c6849f0216dfa5fb049da491e76c329b0296 Mon Sep 17 00:00:00 2001 From: ebner Date: Wed, 11 Mar 2026 11:50:19 +0100 Subject: [PATCH] test --- .github/workflows/build.yaml | 39 ++++++++++++++++++++++++++++++++++++ Readme.md | 3 +++ micromamba.spec | 38 +++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 .github/workflows/build.yaml create mode 100644 Readme.md create mode 100644 micromamba.spec diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..28fd35a --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,39 @@ +name: Build and Publish RPM + +on: + push: + branches: + - main + workflow_dispatch: + +permissions: + contents: read + +jobs: + build-and-publish: + runs-on: "ubuntu-latest-intranet" + container: + image: gitea.psi.ch/images/rhel9-developer-gitea-actions + steps: + - name: Checkout LFS objects + run: git clone https://${{secrets.GITHUB_TOKEN}}@gitea.psi.ch/${{ github.repository }}.git . + # - name: Checkout code + # uses: actions/checkout@v4 + # with: + # lfs: true + + - name: Build RPM + run: | + spectool -g -R micromamba.spec + rpmbuild -ba micromamba.spec + + - name: Publish RPM package + run: | + echo curl -X PUT \ + --user "${{ secrets.PACKAGE_DEPLOY_TOKEN }}" \ + --upload-file /data/RPMS/x86_64/*.rpm \ + "${{ github.server_url }}/api/packages/${{ github.repository_owner }}/rpm/upload" + curl -X PUT \ + --user "${{ secrets.PACKAGE_DEPLOY_TOKEN }}" \ + --upload-file /data/RPMS/x86_64/*.rpm \ + "${{ github.server_url }}/api/packages/${{ github.repository_owner }}/rpm/upload" diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..24ff869 --- /dev/null +++ b/Readme.md @@ -0,0 +1,3 @@ +# Overview + +This repository packages micromamba - https://github.com/mamba-org/micromamba-releases - as an RPM diff --git a/micromamba.spec b/micromamba.spec new file mode 100644 index 0000000..4923faa --- /dev/null +++ b/micromamba.spec @@ -0,0 +1,38 @@ +%define debug_package %{nil} +%define install_dir /opt/micromamba + + + +Name: micromamba +Version: 2.5.0 +%define minor_ver 2 +Release: 0%{?dist} +Summary: The micromamba package manager +License: MIT +URL: https://github.com/mamba-org/micromamba-releases +Source0: https://github.com/mamba-org/micromamba-releases/releases/download/%{version}-%{minor_ver}/micromamba-linux-64 + + +BuildRequires: bash +Requires: bash + +%description +Micromamba is a community-led minimal installer for Conda and Mamba, +pre-configured to use the conda-forge channel by default. + +%prep +# No source to unpack, we use the shell installer directly + +%build +# Nothing to compile + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{install_dir}/bin + +# Copy binary into buildroot +cp %{SOURCE0} %{buildroot}%{install_dir}/bin + +%files +%{install_dir} +