From e3a567e4b5feaf8a0437d0ac4e0ec475328659f3 Mon Sep 17 00:00:00 2001 From: Sergey Zhemoytel Date: Thu, 30 Jan 2025 17:37:54 +0300 Subject: [PATCH] update actions --- action.yml | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 7b612c5..7130f3f 100644 --- a/action.yml +++ b/action.yml @@ -7,6 +7,9 @@ inputs: CI_DEPLOY: description: CI deploy token required: true + REPO_DEPLOY: + description: Deploy artefacts to urpm repo + required: true on: push: @@ -61,9 +64,6 @@ runs: sudo urpmi.update -fa sudo urpmi --auto-update --auto -# sudo urpmi --auto \ -# https://packages.buildkite.com/r11-team/r11-x86-64/files/branding-configs-r11-3.0-3-mdv.x86_64.rpm \ -# https://packages.buildkite.com/r11-team/r11-x86-64/files/branding-configs-common-3.0-3-mdv.x86_64.rpm - name: Download sources artifacts run: | @@ -346,7 +346,37 @@ runs: # fi # done # done - + + - name: Deploy to urpm packages + if: github.ref == 'refs/heads/rosa2016.1' + run: | + echo "Deploying src artifacts..." + for file in /home/builder/rpmbuild/SRPMS/*.rpm; do + curl -X POST http://135.181.14.149:8080/src/ \ + -H "Authorization: Bearer ${{ inputs.REPO_DEPLOY }}" \ + -F "file=@$file" + done + + declare -A arch_urls=( + ["x86_64"]="http://135.181.14.149:8080/x86_64/" + ["noarch"]="http://135.181.14.149:8080/noarch/" + ["aarch64"]="http://135.181.14.149:8080/aarch64/" + ["riscv64"]="http://135.181.14.149:8080/riscv64/" + ) + + for arch in "${!arch_urls[@]}"; do + echo "Deploying rpm artifacts for $arch..." + for file in /home/builder/rpmbuild/RPMS/$arch/*.rpm; do + if [ -f "$file" ]; then + curl -X POST "${arch_urls[$arch]}" \ + -H "Authorization: Bearer ${{ inputs.REPO_DEPLOY }}" \ + -F "package=@$file" + fi + done + done + + + container: image: docker.io/zhemoitel/r11:builder-20250125