mirror of
https://tvoygit.ru/Djam/r11_workflows.git
synced 2025-02-23 08:52:46 +00:00
update deploy
This commit is contained in:
parent
16da0e0222
commit
ba81359bfe
1 changed files with 35 additions and 30 deletions
65
action.yml
65
action.yml
|
@ -119,43 +119,48 @@ runs:
|
|||
CI_DEPLOY: ${{ secrets.CI_DEPLOY }}
|
||||
RPMBUILDROOT: /home/builder/rpmbuild
|
||||
run: |
|
||||
send_package() {
|
||||
local file=$1
|
||||
local arch=$2
|
||||
local type=$3
|
||||
send_package() {
|
||||
local file=$1
|
||||
local arch=$2
|
||||
local type=$3
|
||||
|
||||
if [ "$arch" = "noarch" ]; then
|
||||
url="${{ github.server_url }}/api/packages/${{ github.repository }}/generic/R11/noarch/${file}"
|
||||
else
|
||||
url="${{ github.server_url }}/api/packages/${{ github.repository }}/generic/R11/${arch}/${file}"
|
||||
fi
|
||||
if [ "$arch" = "noarch" ]; then
|
||||
url="${{ github.server_url }}/api/packages/${{ github.repository }}/generic/R11/noarch/${file}"
|
||||
else
|
||||
url="${{ github.server_url }}/api/packages/${{ github.repository }}/generic/R11/${arch}/${file}"
|
||||
fi
|
||||
|
||||
if [ "$type" = "srpm" ]; then
|
||||
url="${{ github.server_url }}/api/packages/${{ github.repository }}/generic/R11/srpms/${file}"
|
||||
fi
|
||||
if [ "$type" = "srpm" ]; then
|
||||
url="${{ github.server_url }}/api/packages/${{ github.repository }}/generic/R11/srpms/${file}"
|
||||
fi
|
||||
|
||||
curl --user ${{ github.repository_owner }}:${CI_DEPLOY} \
|
||||
--upload-file "$file" \
|
||||
"$url"
|
||||
}
|
||||
curl --user ${{ github.repository_owner }}:${CI_DEPLOY} \
|
||||
--upload-file "$file" \
|
||||
"$url"
|
||||
}
|
||||
|
||||
for dir in SRPMS RPMS/noarch RPMS/$ARCH; do
|
||||
if [ -d "${RPMBUILDROOT}/${dir}" ]; then
|
||||
for file in "${RPMBUILDROOT}/${dir}"/*.rpm; do
|
||||
if [ -f "$file" ]; then
|
||||
local arch=$(basename "${dir}")
|
||||
local type="rpm"
|
||||
for dir in SRPMS RPMS/noarch RPMS/*; do
|
||||
if [ -d "${RPMBUILDROOT}/${dir}" ]; then
|
||||
for file in "${RPMBUILDROOT}/${dir}"/*.rpm; do
|
||||
if [ -f "$file" ]; then
|
||||
if [ "$dir" = "SRPMS" ]; then
|
||||
arch="noarch"
|
||||
type="srpm"
|
||||
elif [ "$dir" = "noarch" ]; then
|
||||
arch="noarch"
|
||||
type="rpm"
|
||||
else
|
||||
arch=$(basename "${dir}")
|
||||
type="rpm"
|
||||
fi
|
||||
|
||||
if [ "$arch" = "SRPMS" ]; then
|
||||
arch="noarch"
|
||||
type="srpm"
|
||||
fi
|
||||
|
||||
send_package "$file" "$arch" "$type"
|
||||
fi
|
||||
done
|
||||
send_package "$file" "$arch" "$type"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
|
||||
# cd /home/builder/rpmbuild/SRPMS/
|
||||
# for file in *.rpm; do
|
||||
|
|
Loading…
Add table
Reference in a new issue