mirror of
https://tvoygit.ru/Djam/r11_workflows.git
synced 2025-02-23 08:52:46 +00:00
update deploy per arch
This commit is contained in:
parent
8bfde4a7a3
commit
02bfb21343
1 changed files with 30 additions and 11 deletions
41
action.yml
41
action.yml
|
@ -164,7 +164,7 @@ runs:
|
|||
fi
|
||||
;;
|
||||
*trivy*)
|
||||
trivy_dependency="trivy-0.58.1-1-rosa0.1.x86_64"
|
||||
trivy_dependency="trivy-0.58.2-1-rosa0.1.x86_64"
|
||||
if [[ -n "$trivy_dependency" ]]; then
|
||||
echo "Found trivy: $trivy_dependency"
|
||||
all_dependencies+=("$BASE_URL/$trivy_dependency.rpm")
|
||||
|
@ -177,6 +177,13 @@ runs:
|
|||
all_dependencies+=("$BASE_URL/$toxcore_dependency.rpm")
|
||||
fi
|
||||
;;
|
||||
*goreleaser*)
|
||||
goreleaser_dependency="goreleaser-1.8.3-1-rosa0.1.x86_64"
|
||||
if [[ -n "$goreleaser_dependency" ]]; then
|
||||
echo "Found goreleaser: $goreleaser_depenedency"
|
||||
all_dependencies+=("$BASE_URL/$goreleaser_dependency.rpm")
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# Вывод текущего состояния массива all_dependencies
|
||||
|
@ -299,22 +306,34 @@ runs:
|
|||
# ${GITHUB_SERVER_URL}/api/packages/${GITHUB_REPOSITORY_OWNER}/rpm/upload
|
||||
# done
|
||||
|
||||
- name: Deploy in buildkitie
|
||||
- name: Deploy in buildkite
|
||||
if: github.ref == 'refs/heads/rosa2016.1'
|
||||
run: |
|
||||
echo "Deploying src artifacts..."
|
||||
for file in /home/builder/rpmbuild/SRPMS/*.rpm; do
|
||||
curl -X POST https://api.buildkite.com/v2/packages/organizations/r11-team/registries/r11-srpms/packages \
|
||||
-H "Authorization: Bearer ${{ inputs.PUBLICATOR }}" \
|
||||
-F "file=@$file"
|
||||
done
|
||||
echo "Deploying rpm artifacts..."
|
||||
for file in /home/builder/rpmbuild/RPMS/x86_64/*.rpm; do
|
||||
curl -X POST https://api.buildkite.com/v2/packages/organizations/r11-team/registries/r11-x86-64/packages \
|
||||
-H "Authorization: Bearer ${{ inputs.PUBLICATOR }}" \
|
||||
-F "file=@$file"
|
||||
done
|
||||
-H "Authorization: Bearer ${{ inputs.PUBLICATOR }}" \
|
||||
-F "file=@$file"
|
||||
done
|
||||
|
||||
# Define the architectures and their corresponding URLs
|
||||
declare -A arch_urls=(
|
||||
["x86_64"]="https://api.buildkite.com/v2/packages/organizations/r11-team/registries/r11-x86-64/packages"
|
||||
["noarch"]="https://api.buildkite.com/v2/packages/organizations/r11-team/registries/r11-noarch/packages"
|
||||
)
|
||||
|
||||
# Loop through each architecture directory
|
||||
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.PUBLICATOR }}" \
|
||||
-F "file=@$file"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
container:
|
||||
image: packages.buildkite.com/r11-team/r11/builder:latest
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue