From fe3265fde05e04cc6f22c4f53d669d235670c68c Mon Sep 17 00:00:00 2001 From: ebner Date: Wed, 1 Oct 2025 16:40:57 +0200 Subject: [PATCH] add gitea workflow --- .gitea/workflows/build_rhel8.yaml | 44 +++++++++++++++++++++++++++++++ .gitea/workflows/build_rhel9.yaml | 44 +++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 .gitea/workflows/build_rhel8.yaml create mode 100644 .gitea/workflows/build_rhel9.yaml diff --git a/.gitea/workflows/build_rhel8.yaml b/.gitea/workflows/build_rhel8.yaml new file mode 100644 index 0000000..fb349ed --- /dev/null +++ b/.gitea/workflows/build_rhel8.yaml @@ -0,0 +1,44 @@ +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/rhel8-developer-gitea-actions + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Build RPM + run: | + spectool -g -R Pmodules.spec + rpmbuild -ba Pmodules.spec + + spectool -g -R Pmodules_modules.spec + rpmbuild -ba Pmodules_modules.spec + + spectool -g -R Pmodules_bash.spec + rpmbuild -ba Pmodules_bash.spec + + # list generated rpms + find RPMS + + - name: Publish RPM package + run: | + echo curl -X PUT \ + --user "${{ secrets.PACKAGE_DEPLOY_TOKEN }}" \ + --upload-file RPMS/x86_64/*.rpm \ + "${{ github.server_url }}/api/packages/${{ github.repository_owner }}/rpm/upload" + curl -X PUT \ + --user "${{ secrets.PACKAGE_DEPLOY_TOKEN }}" \ + --upload-file RPMS/x86_64/*.rpm \ + "${{ github.server_url }}/api/packages/${{ github.repository_owner }}/rpm/upload" diff --git a/.gitea/workflows/build_rhel9.yaml b/.gitea/workflows/build_rhel9.yaml new file mode 100644 index 0000000..eb0b306 --- /dev/null +++ b/.gitea/workflows/build_rhel9.yaml @@ -0,0 +1,44 @@ +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 code + uses: actions/checkout@v4 + + - name: Build RPM + run: | + spectool -g -R Pmodules.spec + rpmbuild -ba Pmodules.spec + + spectool -g -R Pmodules_modules.spec + rpmbuild -ba Pmodules_modules.spec + + spectool -g -R Pmodules_bash.spec + rpmbuild -ba Pmodules_bash.spec + + # list generated rpms + find RPMS + + - name: Publish RPM package + run: | + echo curl -X PUT \ + --user "${{ secrets.PACKAGE_DEPLOY_TOKEN }}" \ + --upload-file RPMS/x86_64/*.rpm \ + "${{ github.server_url }}/api/packages/${{ github.repository_owner }}/rpm/upload" + curl -X PUT \ + --user "${{ secrets.PACKAGE_DEPLOY_TOKEN }}" \ + --upload-file RPMS/x86_64/*.rpm \ + "${{ github.server_url }}/api/packages/${{ github.repository_owner }}/rpm/upload" -- 2.52.0