From 4d0d452e15e728f4c73b5033ed2409599f254644 Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Fri, 29 Dec 2023 10:43:08 +0100 Subject: [PATCH] Up --- .github/workflows/end-user1.yml | 177 ++++++++++++++++---------------- action.yml | 70 +++++++++---- 2 files changed, 137 insertions(+), 110 deletions(-) diff --git a/.github/workflows/end-user1.yml b/.github/workflows/end-user1.yml index c8ba78dc61f1..f3300794d1b5 100644 --- a/.github/workflows/end-user1.yml +++ b/.github/workflows/end-user1.yml @@ -2,21 +2,50 @@ name: "Build images XXX" on: workflow_dispatch: inputs: - skipImages: - description: 'Skip building images? no = build images, yes = skip images' - required: true - options: [ 'yes', 'no' ] + + armbian_target: type: choice - default: 'no' - branch: + description: 'Build' + required: false + options: + - kernel + - image + + armbian_branch: type: choice description: 'Framework build branch' options: # branches - - main - - v23.11 - default: 'main' - board: + - legacy + - current + - edge + default: 'current' + + armbian_release: + type: choice + description: 'Userspace' + options: + # userspace + - jammy + - bookworm + - trixie + default: 'jammy' + + armbian_ui: + type: choice + description: 'User interface (not all combinations work)' + options: + # userspace + - minimal + - server + - xfce + - gnome + - cinnamon + - i3-wm + - kde-plasma + default: 'minimal' + + armbian_board: type: choice description: 'Board' options: @@ -77,93 +106,63 @@ on: - uefi-arm64 - uefi-x86 - xiaomi-elish - - all - default: 'all' - targetsFilterInclude: - description: 'TARGETS_FILTER_INCLUDE, example: "BOARD:odroidhc4,BOARD:odroidn2"' - required: false - default: '' - type: string - nightlybuild: - description: 'yes = nighlty, no = stable' - required: false - options: [ 'yes', 'no' ] - type: choice - default: 'no' - uploadtoserver: - description: 'CDN upload github = releases, armbian = rsync.armbian.com' - required: false - options: [ 'github', 'armbian', 'both' ] - type: choice - default: 'armbian' - versionOverride: - description: 'Version override. Leave empty for automatic bump' - required: false - default: '' - build_runner: - description: 'GH runner' - required: false - default: 'ubuntu-latest' - -env: - - # For easier reuse across the multiple chunks ('armbian/build' repo) - BUILD_REPOSITORY: "armbian/build" - BUILD_REF: "${{ inputs.ref || inputs.branch || 'main' }}" # branch or tag or sha1 - - # For easier reuse across the multiple chunks ('armbian/os' repo) - USERPATCHES_REPOSITORY: "armbian/os" - USERPATCHES_REF: "main" # branch or tag or sha1 - USERPATCHES_DIR: "userpatches" # folder inside USERPATCHES_REPOSITORY - - # Github repository for releases. Normally its the one where we executing script - RELEASE_REPOSITORY: "os" - - # Armbian envs. Adjust to your needs - # This makes builds faster, but only if the Docker images are up-to-date with all dependencies, Python, tools, etc. Otherwise it makes it... slower. - DOCKER_SKIP_UPDATE: "yes" # Do not apt update/install/requirements/etc during Dockerfile build, trust that images are up-to-date. - - # Added to every build, even the prepare job. - EXTRA_PARAMS_ALL_BUILDS: "${{ inputs.extraParamsAllBuilds || 'UPLOAD_TO_OCI_ONLY=yes' }}" - - VERSION_OVERRIDE: "${{ github.event.inputs.versionOverride }}" - - # To use GitHub CLI in a GitHub Actions workflow - GH_TOKEN: "${{ secrets.ACCESS_TOKEN }}" + default: 'uefi-x86' - # Added to every image build arguments. - EXTRA_PARAMS_IMAGE: "COMPRESS_OUTPUTIMAGE=xz,sha SHOW_DEBIAN=yes SHARE_LOG=yes " - -# To ensure that only a single workflow using the same concurrency group will run at a time -concurrency: - group: ${{ github.run_id }}-standard-supportstable - cancel-in-progress: false + armbian_version: + description: 'Version' + required: false + default: '23.11.1' jobs: build: - runs-on: ${{ inputs.BUILD_RUNNER }} + name: "Build Armbian" + runs-on: ubuntu-latest steps: - - name: Update - if: inputs.BUILD_RUNNER == 'ubuntu-latest' - run: | - sudo apt update - sudo apt -y clean + #- name: Update + # run: | + # sudo apt update + # sudo apt -y upgrade - - name: Free Github Runner - if: inputs.BUILD_RUNNER == 'ubuntu-latest' - uses: descriptinc/free-disk-space@main - with: - android: true - dotnet: true - haskell: true - large-packages: true - docker-images: true - swap-storage: true + #- name: Free Github Runner + # if: inputs.BUILD_RUNNER == 'ubuntu-latest' + # uses: descriptinc/free-disk-space@main + # with: + # android: true + # dotnet: true + # haskell: true + # large-packages: true + # docker-images: true + # swap-storage: true - - name: Compile the kernel + - name: "Compile ${{ inputs.build_target }}" uses: igorpecovnik/build@main with: - build_target: kernel - kernel_source: ${{ inputs.kernel_source }} + armbian_target: "${{ inputs.armbian_target }}" + armbian_branch: "${{ inputs.armbian_branch }}" + armbian_release: "${{ inputs.armbian_release }}" + armbian_version: "${{ inputs.armbian_version }}" + armbian_minimal: "${{ inputs.armbian_minimal }}" + armbian_board: "${{ inputs.armbian_board }}" + + - name: Calculate upload path + run: | + if [[ "${{ inputs.armbian_target }}" == image ]]; then + echo "ARMBIAN_SCRIPT_PATH=${{ env.ARMBIAN_SCRIPT_PATH }}/output/images/" >> $GITHUB_ENV + else + echo "ARMBIAN_SCRIPT_PATH=${{ env.ARMBIAN_SCRIPT_PATH }}/output/debs/" >> $GITHUB_ENV + fi + + - uses: ncipollo/release-action@v1 + with: + tag: "artifacts" + name: "Armbian artifacts" + artifacts: "${{ env.ARMBIAN_SCRIPT_PATH }}*" + allowUpdates: true + removeArtifacts: true + replacesArtifacts: true + makeLatest: true + token: "${{ secrets.GITHUB_TOKEN }}" + body: | + Unofficial Armbian artifacts with [official tools](https://github.com/armbian/build) diff --git a/action.yml b/action.yml index a40ac13f52be..4d5e6f108d9f 100644 --- a/action.yml +++ b/action.yml @@ -1,39 +1,67 @@ name: "Rebuild Armbian" author: "https://github.com/armbian" -description: "Build custom Linux for custom hardware" +description: "Build Armbian Linux" inputs: - # Select build target - build_target: - description: "Select build target: armbian / kernel" + + armbian_target: + description: "Build image or kernel" required: false - default: "armbian" - # Images - armbian_board: - description: "Set device Board." + default: "kernel" + + armbian_branch: + description: "Choose kernel branch" required: false - default: "all" - armbian_fstype: - description: "Set armbian rootfs type: ext4 / btrfs" + default: "current" + + armbian_release: + description: "Choose userspace release" required: false - default: "ext4" - builder_name: - description: "Set Armbian builder signature." + default: "jammy" + + armbian_version: + description: "Set different version" required: false default: "" - # Kernel - kernel_branch: - description: "Set the tags of the stable kernel." + + armbian_board: + description: "Select hardware platform" required: false - default: "stable" + default: "uefi-x86" + + armbian_minimal: + description: "Minimal image" + required: false + default: "yes" runs: using: "composite" steps: - shell: bash run: | + + # translations for easier handling + BUILD_TARGET="${{ inputs.build_target }}" + [[ "${{ inputs.armbian_target }}" == image ]] && unset BUILD_TARGET + + # go to build folder cd ${GITHUB_ACTION_PATH} - ls -l + + # execute build command + ./compile.sh "${BUILD_TARGET}" \ + REVISION="${{ inputs.armbian_version }}" \ + BOARD="${{ inputs.armbian_board }}" \ + BRANCH="${{ inputs.armbian_branch }}" \ + RELEASE="${{ inputs.armbian_release }}" \ + KERNEL_CONFIGURE="no" \ + BUILD_DESKTOP="no" \ + BUILD_MINIMAL="${{ inputs.armbian_minimal }}" \ + COMPRESS_OUTPUTIMAGE="sha,img,xz" \ + EXPERT="yes" + + # save path + echo "ARMBIAN_SCRIPT_PATH=${GITHUB_ACTION_PATH}" >> $GITHUB_ENV branding: - icon: "terminal" - color: "gray-dark" + icon: "check" + color: "red" +