Use Utils from CI to build Conty in CI

#156
This commit is contained in:
Kron4ek 2024-08-03 12:59:48 +03:00
parent 348758658b
commit e25b933af6
3 changed files with 41 additions and 17 deletions

View file

@ -8,10 +8,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: checkout
uses: actions/checkout@v4
with:
lfs: 'false'
- name: Download artifact
id: download-artifact
uses: dawidd6/action-download-artifact@v6
with:
workflow: utils.yml
workflow_conclusion: success
if_no_artifact_found: ignore
path: /opt
- name: Build Conty
run: |
if [ -f /opt/Utils/utils.tar.gz ]; then
cp /opt/Utils/* .
fi
chmod +x create-arch-bootstrap.sh create-conty.sh
sudo ./create-arch-bootstrap.sh && ./create-conty.sh

View file

@ -10,10 +10,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: checkout
uses: actions/checkout@v4
with:
lfs: 'false'
- name: Download artifact
id: download-artifact
uses: dawidd6/action-download-artifact@v6
with:
workflow: utils.yml
workflow_conclusion: success
if_no_artifact_found: ignore
path: /opt
- name: Build Conty
run: |
if [ -f /opt/Utils/utils.tar.gz ]; then
cp /opt/Utils/* .
fi
chmod +x create-arch-bootstrap.sh create-conty.sh
sudo ./create-arch-bootstrap.sh && ./create-conty.sh

View file

@ -61,22 +61,14 @@ else
fi
if [ ! -f "${utils}" ] || [ "$(wc -c < "${utils}")" -lt 100000 ]; then
if [ -d .git ]; then
git lfs install
git lfs fetch origin master
git lfs checkout
fi
if git config --get remote.origin.url; then
utils_url="$(git config --get remote.origin.url)"/raw/"$(git rev-parse --abbrev-ref HEAD)"/${utils}
else
utils_url="https://github.com/Kron4ek/Conty/raw/master/${utils}"
fi
if [ ! -f "${utils}" ] || [ "$(wc -c < "${utils}")" -lt 100000 ]; then
if git config --get remote.origin.url; then
utils_url="$(git config --get remote.origin.url)"/raw/master/${utils}
else
utils_url="https://github.com/Kron4ek/Conty/raw/master/${utils}"
fi
rm -f "${utils}"
curl -#LO "${utils_url}"
fi
rm -f "${utils}"
curl -#LO "${utils_url}"
fi
if [ ! -f conty-start.sh ]; then