Githug Actions bugfix and optimisations

This commit is contained in:
Igor Pecovnik 2021-06-14 19:21:01 +02:00
parent e65c7a9f80
commit d166d16377
2 changed files with 54 additions and 16 deletions

View File

@ -69,7 +69,7 @@ jobs:
with:
gpg-private-key: ${{ secrets.GPG_KEY1 }}
passphrase: ${{ secrets.GPG_PASSPHRASE1 }}
workdir: scripts
workdir: build
git-user-signingkey: true
git-commit-gpgsign: true
@ -103,6 +103,16 @@ jobs:
[[ "${REPOSITORY}" != "yes" ]] && ./compile.sh single IGNORE_HASH="yes" REPOSITORY_INSTALL="${REPOSITORY_INSTALL}" REBUILD_IMAGES="${REBUILD_IMAGES}" KERNEL_ONLY="yes" BETA="no" BUILD_ALL="yes" BSP_BUILD="yes" MAKE_ALL_BETA="yes"
./compile.sh single MULTITHREAD="${PARALLEL_BUILDS}" REPOSITORY_INSTALL="${REPOSITORY_INSTALL}" IGNORE_HASH="yes" IGNORE_UPDATES="yes" REBUILD_IMAGES="${REBUILD_IMAGES}" KERNEL_ONLY="no" BETA="no" BUILD_ALL="yes" GPG_PASS="${GPG_PASS}"
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v3
with:
gpg-private-key: ${{ secrets.GPG_KEY2 }}
passphrase: ${{ secrets.GPG_PASSPHRASE2 }}
workdir: scripts
git-user-signingkey: true
git-commit-gpgsign: true
- name: Make BSP packages if we build from sources
if: ${{ success() && github.event.inputs.repository != 'yes' }}
@ -132,15 +142,15 @@ jobs:
git config --global user.name "Armbianworker"
git pull
git add VERSION
git commit -m "Bump stable version" -m "" -m "Adding following kernels:" -m "$(find output/debs-beta/ -type f -name "linux-image*.deb" -printf "%f\n" | sort)"
git commit -m "Bump stable version" -m "" -m "Adding following kernels:" -m "$(find output/debs/ -type f -name "linux-image*.deb" -printf "%f\n" | sort)"
git push
- name: Install SSH key for storage
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.KEY_FOR_TORRENT }}
known_hosts: ${{ secrets.KNOWN_HOSTS_TORRENT }}
key: ${{ secrets.KEY_TORRENTS }}
known_hosts: ${{ secrets.KNOWN_HOSTS_UPLOAD }}
if_key_exists: replace
- name: Deploy images to server
@ -208,15 +218,3 @@ jobs:
- name: Create torrents
run: ssh -T -i ~/.ssh/id_torrent ${{ secrets.USER_TORRENTS }}@${{ secrets.HOST_TORRENTS }}
finish:
name: Cleaning
needs: [torrents, repository]
runs-on: [self-hosted, Linux]
steps:
- name: Run script
shell: bash {0}
run: |
echo "Stop"

View File

@ -62,6 +62,19 @@ jobs:
- name: Fix permissions
run: |
# make sure no temporally dirs are mounted from previous runs
while :
do
sudo pkill compile.sh || true
sudo pkill arm-binfmt-P || true
sudo pkill aarch64-binfmt-P || true
sudo pkill pixz || true
[[ "$(df | grep "/.tmp" | wc -l)" -eq 0 ]] && sudo rm -rf build/.tmp && break
echo "Mounted temp directories. Trying to unmount."
df | grep ".tmp" | awk '{print $6}' | xargs sudo umount 2>/dev/null || true
sleep 10
done
sudo chown -R $USER:$USER .
- name: Checkout Armbian build script
@ -149,6 +162,7 @@ jobs:
steps:
- name: Fix permissions
run: |
sudo chown -R $USER:$USER .
@ -225,6 +239,19 @@ jobs:
run: |
# make sure no temporally dirs are mounted from previous runs
while :
do
sudo pkill compile.sh || true
sudo pkill arm-binfmt-P || true
sudo pkill aarch64-binfmt-P || true
sudo pkill pixz || true
[[ "$(df | grep "/.tmp" | wc -l)" -eq 0 ]] && sudo rm -rf build/.tmp && break
echo "Mounted temp directories. Trying to unmount."
df | grep ".tmp" | awk '{print $6}' | xargs sudo umount 2>/dev/null || true
sleep 10
done
sudo chown -R $USER:$USER .
- name: Checkout Armbian build script
@ -369,6 +396,19 @@ jobs:
run: |
# make sure no temporally dirs are mounted from previous runs
while :
do
sudo pkill compile.sh || true
sudo pkill arm-binfmt-P || true
sudo pkill aarch64-binfmt-P || true
sudo pkill pixz || true
[[ "$(df | grep "/.tmp" | wc -l)" -eq 0 ]] && sudo rm -rf build/.tmp && break
echo "Mounted temp directories. Trying to unmount."
df | grep ".tmp" | awk '{print $6}' | xargs sudo umount 2>/dev/null || true
sleep 10
done
sudo chown -R $USER:$USER .
- name: Checkout Armbian build script