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 runs-on: ubuntu-latest
steps: 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 - name: Build Conty
run: | run: |
if [ -f /opt/Utils/utils.tar.gz ]; then
cp /opt/Utils/* .
fi
chmod +x create-arch-bootstrap.sh create-conty.sh chmod +x create-arch-bootstrap.sh create-conty.sh
sudo ./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 runs-on: ubuntu-latest
steps: 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 - name: Build Conty
run: | run: |
if [ -f /opt/Utils/utils.tar.gz ]; then
cp /opt/Utils/* .
fi
chmod +x create-arch-bootstrap.sh create-conty.sh chmod +x create-arch-bootstrap.sh create-conty.sh
sudo ./create-arch-bootstrap.sh && ./create-conty.sh sudo ./create-arch-bootstrap.sh && ./create-conty.sh

View file

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