mirror of
https://tvoygit.ru/Djam/r11_workflows.git
synced 2025-02-23 17:02:46 +00:00
update deploy
This commit is contained in:
parent
6a7cca5bf7
commit
01f7e7ad9e
1 changed files with 81 additions and 24 deletions
105
action.yml
105
action.yml
|
@ -82,6 +82,63 @@ runs:
|
|||
- name: Install dependies
|
||||
run: |
|
||||
source .env
|
||||
|
||||
SPEC_FILE="${SPECFILE}"
|
||||
BASE_URL="https://packages.buildkite.com/r11-team/r11-x86-64/files/"
|
||||
|
||||
# Функция для установки зависимостей
|
||||
install_dependencies() {
|
||||
# Массив для хранения всех зависимостей
|
||||
declare -a all_dependencies
|
||||
|
||||
# Чтение файла построчно
|
||||
while IFS= read -r line; do
|
||||
if [[ $line =~ ^BuildRequires:\s+(go)$ ]]; then
|
||||
go_dependencies="golang-1.23.4-1-rosa0.1.x86_64"
|
||||
if [[ -n "$go_dependencies" ]]; then
|
||||
echo "Found Go dependencies: $go_dependencies"
|
||||
all_dependencies+=("$BASE_URL/$go_dependencies.rpm")
|
||||
fi
|
||||
elif [[ $line =~ ^BuildRequires:\s+(pkgconfig\(openssl3\.3\))$ ]]; then
|
||||
openssl_dependencies="openssl3.3-devel-3.3.2-1-rosa0.1.x86_64"
|
||||
if [[ -n "$openssl_dependencies" ]]; then
|
||||
echo "Found OpenSSL dependency: $openssl_dependencies"
|
||||
all_dependencies+=("$BASE_URL/$openssl_dependencies.rpm")
|
||||
fi
|
||||
elif [[ $line =~ ^BuildRequires:\s+(llvm17)$ ]]; then
|
||||
llvm17_dependency="llvm17-17.0.1-1-rosa2016.1.x86_64"
|
||||
if [[ -n "$llvm17_dependency" ]]; then
|
||||
echo "Found LLVM17 dependency: $llvm17_dependency"
|
||||
all_dependencies+=("$BASE_URL/$llvm17_dependency.rpm")
|
||||
fi
|
||||
elif [[ $line =~ ^BuildRequires:\s+(stdc++-gcc10-devel)$ ]]; then
|
||||
gcc10_dependency="stdc++-gcc10-devel-10.2.1-1-rosa0.1.x86_64"
|
||||
if [[ -n "$gcc10_dependency" ]]; then
|
||||
echo "Found GCC10 dependency: $gcc10_dependency"
|
||||
# all_dependencies+=("$BASE_URL/$gcc10_dependency.rpm") # не доступен
|
||||
fi
|
||||
elif [[ $line =~ ^BuildRequires:\s+(qt515)$ ]]; then
|
||||
qt515_dependency="qt515-5.15.12-1-rosa2016.1.x86_64"
|
||||
if [[ -n "$qt515_dependency" ]]; then
|
||||
echo "Found Qt515 dependency: $qt515_dependency"
|
||||
all_dependencies+=("$BASE_URL/$qt515_dependency.rpm")
|
||||
fi
|
||||
fi
|
||||
done < "$SPEC_FILE"
|
||||
|
||||
# Установка всех найденных зависимостей
|
||||
if [[ ${#all_dependencies[@]} -gt 0 ]]; then
|
||||
echo "Installing all dependencies: ${all_dependencies[@]}"
|
||||
sudo urpmi --auto "${all_dependencies[@]}"
|
||||
else
|
||||
echo "No dependencies found."
|
||||
fi
|
||||
}
|
||||
|
||||
# Установка всех зависимостей
|
||||
install_dependencies
|
||||
|
||||
# Установка всех остальных зависимостей
|
||||
sudo urpmi --buildrequires --auto ${SPECFILE}
|
||||
|
||||
- name: Build rpm
|
||||
|
@ -89,30 +146,30 @@ runs:
|
|||
source .env
|
||||
rpmbuild -ba ${SPECFILE}
|
||||
|
||||
- name: DEBUG tokens
|
||||
env:
|
||||
CI_DEPLOY_SEC: ${{ secrets.CI_DEPLOY }}
|
||||
CI_DEPLOY: ${{ inputs.CI_DEPLOY }}
|
||||
PUBLICATOR: ${{ inputs.PUBLICATOR }}
|
||||
run: |
|
||||
echo "Deploying artifacts..."
|
||||
echo "********************************************************************"
|
||||
if [ -n "${CI_DEPLOY_SEC}" ]; then
|
||||
echo "CI_DEPLOY_SEC: ${CI_DEPLOY_SEC:0:3}***${CI_DEPLOY_SEC: -3}"
|
||||
else
|
||||
echo "CI_DEPLOY: не передан"
|
||||
fi
|
||||
if [ -n "${CI_DEPLOY}" ]; then
|
||||
echo "CI deploy token: ${CI_DEPLOY:0:3}***${CI_DEPLOY: -3}"
|
||||
else
|
||||
echo "CI deploy token: не передан"
|
||||
fi
|
||||
if [ -n "${PUBLICATOR}" ]; then
|
||||
echo "Publicator token: ${PUBLICATOR:0:3}***${PUBLICATOR: -3}"
|
||||
else
|
||||
echo "Publicator token: не передан"
|
||||
fi
|
||||
echo "********************************************************************"
|
||||
# - name: DEBUG tokens
|
||||
# env:
|
||||
# CI_DEPLOY_SEC: ${{ secrets.CI_DEPLOY }}
|
||||
# CI_DEPLOY: ${{ inputs.CI_DEPLOY }}
|
||||
# PUBLICATOR: ${{ inputs.PUBLICATOR }}
|
||||
# run: |
|
||||
# echo "Deploying artifacts..."
|
||||
# echo "********************************************************************"
|
||||
# if [ -n "${CI_DEPLOY_SEC}" ]; then
|
||||
# echo "CI_DEPLOY_SEC: ${CI_DEPLOY_SEC:0:3}***${CI_DEPLOY_SEC: -3}"
|
||||
# else
|
||||
# echo "CI_DEPLOY: не передан"
|
||||
# fi
|
||||
# if [ -n "${CI_DEPLOY}" ]; then
|
||||
# echo "CI deploy token: ${CI_DEPLOY:0:3}***${CI_DEPLOY: -3}"
|
||||
# else
|
||||
# echo "CI deploy token: не передан"
|
||||
# fi
|
||||
# if [ -n "${PUBLICATOR}" ]; then
|
||||
# echo "Publicator token: ${PUBLICATOR:0:3}***${PUBLICATOR: -3}"
|
||||
# else
|
||||
# echo "Publicator token: не передан"
|
||||
# fi
|
||||
# echo "********************************************************************"
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue