134 lines
4.2 KiB
YAML
134 lines
4.2 KiB
YAML
name: Beta Desktop
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
|
|
Prepare:
|
|
|
|
name: Find desktop variants
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.repository_owner == 'Armbian' && github.event.workflow_run.conclusion == 'success' }} || github.event_name == 'workflow_dispatch'
|
|
outputs:
|
|
matrix: ${{steps.list_dirs.outputs.matrix}}
|
|
steps:
|
|
|
|
- uses: ahmadnassri/action-workflow-run-wait@v1
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
repository: armbian/build
|
|
ref: nightly
|
|
|
|
- name: Build desktops
|
|
id: list_dirs
|
|
run: |
|
|
|
|
MATRIX=$(
|
|
set +e
|
|
releases=($(find config/distributions -mindepth 1 -maxdepth 1 -type d | sed 's/.*\///' ))
|
|
for i in ${releases[@]}
|
|
do
|
|
environments=($([[ -d config/desktop/$i/environments ]] && ls -1 config/desktop/$i/environments))
|
|
for j in ${environments[@]}
|
|
do
|
|
echo "$i:$j"
|
|
done
|
|
done)
|
|
echo ::set-output name=matrix::$(for x in $(echo "${MATRIX}"); do echo $x; done|jq -cnR '[inputs | select(length>0)]' | jq)
|
|
|
|
Desktop:
|
|
|
|
name: "Build package"
|
|
needs: [ Prepare ]
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 480
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
node: ${{fromJson(needs.Prepare.outputs.matrix)}}
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
repository: armbian/build
|
|
path: build
|
|
ref: nightly
|
|
clean: true
|
|
|
|
- name: Checkout support scripts
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
repository: armbian/scripts
|
|
path: scripts
|
|
clean: true
|
|
|
|
- name: Pull Docker image
|
|
run: |
|
|
|
|
sudo docker pull ghcr.io/armbian/build:$(cat build/VERSION | sed 's/trunk.*/trunk/')"-$(dpkg --print-architecture)"
|
|
|
|
- name: Build package
|
|
run: |
|
|
|
|
mkdir -p build/userpatches
|
|
cp scripts/configs/* build/userpatches/
|
|
cd build
|
|
CHUNK="${{ matrix.node }}"
|
|
RELEASE=$(echo $CHUNK | cut -d":" -f1)
|
|
DE=$(echo $CHUNK | cut -d":" -f2)
|
|
echo "RELEASE=${RELEASE}" >> $GITHUB_ENV
|
|
echo "DE=${DE}" >> $GITHUB_ENV
|
|
sed -i "s/-it --rm/-i --rm/" userpatches/config-docker.conf
|
|
|
|
./compile.sh docker \
|
|
BSP_BUILD="yes" \
|
|
BETA="yes" \
|
|
RELEASE="${RELEASE}" \
|
|
DESKTOP_ENVIRONMENT_CONFIG_NAME="config_base" \
|
|
BUILD_DESKTOP="yes" \
|
|
DESKTOP_ENVIRONMENT="${DE}" \
|
|
KERNEL_ONLY="yes" \
|
|
KERNEL_CONFIGURE="no" \
|
|
BOARD="uefi-x86" \
|
|
BRANCH="current" \
|
|
SKIP_EXTERNAL_TOOLCHAINS="yes" \
|
|
OFFLINE_WORK="yes" \
|
|
REPOSITORY_INSTALL="u-boot,kernel,armbian-config,armbian-firmware" \
|
|
DESKTOP_APPGROUPS_SELECTED="" \
|
|
EXPERT="yes"
|
|
|
|
if [[ $? -eq 0 ]]; then
|
|
echo "UPLOAD=true" >> $GITHUB_ENV
|
|
fi
|
|
|
|
- name: Upload build artifacts
|
|
if: ${{ matrix.node != 'none:none' }}
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: armbian-${{ env.RELEASE }}-desktop-${{ env.DE }}
|
|
path: build/output/debs-beta/${{ env.RELEASE }}/armbian-${{ env.RELEASE }}-desktop-${{ env.DE }}_*.deb
|
|
if-no-files-found: ignore
|
|
retention-days: 10
|
|
|
|
- name: Install SSH key for storage
|
|
uses: shimataro/ssh-key-action@v2
|
|
with:
|
|
key: ${{ secrets.KEY_TORRENTS }}
|
|
known_hosts: ${{ secrets.KNOWN_HOSTS_UPLOAD }}
|
|
if_key_exists: replace
|
|
|
|
- name: Deploy to server
|
|
if: ${{ matrix.node != 'none:none' }} && {{ env.UPLOAD == true }}
|
|
run: |
|
|
|
|
sudo apt-get -y -qq install lftp
|
|
lftp -u upload, -e "set net:timeout 10;set net:max-retries 16;mirror --Remove-source-files -R --no-empty-dirs --parallel=8 --include-glob=armbian-${{ env.RELEASE }}-desktop-${{ env.DE }}_*.deb --no-perms $(pwd)/build/output/debs-beta/ debs-beta/ ;bye" sftp://users.armbian.com
|