diff --git a/.github/workflows/end-user1.yml b/.github/workflows/end-user1.yml index c8ba78dc61f1..14e4a906f8bc 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,79 +106,25 @@ 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 }}" + default: 'uefi-x86' - # To use GitHub CLI in a GitHub Actions workflow - GH_TOKEN: "${{ secrets.ACCESS_TOKEN }}" - - # 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 + sudo apt -y upgrade + sudi apt -y clean - name: Free Github Runner if: inputs.BUILD_RUNNER == 'ubuntu-latest' @@ -162,8 +137,33 @@ jobs: 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_ui: "${{ inputs.armbian_ui }}" + 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/.github/workflows/example.yml b/.github/workflows/example.yml new file mode 100644 index 000000000000..b4b9cc4601c9 --- /dev/null +++ b/.github/workflows/example.yml @@ -0,0 +1,35 @@ +name: "Build Armbian Jammy for generic ARM64" +on: + workflow_dispatch: + +jobs: + + build: + name: "Build Armbian for generic ARM64" + runs-on: ubuntu-latest + steps: + + - name: Free Github Runner + uses: descriptinc/free-disk-space@main + with: + android: true + dotnet: true + haskell: true + large-packages: true + docker-images: true + swap-storage: true + + - name: "Compile ${{ inputs.build_target }}" + uses: igorpecovnik/build@main + with: + armbian_target: "image" + armbian_branch: "current" + armbian_release: "jammy" + armbian_ui: "minimal" + armbian_board: "uefi-arm64" + + - uses: actions/upload-artifact@v4 + with: + name: armbian-artifacts + path: | + "${{ env.ARMBIAN_SCRIPT_PATH }}/output/*" diff --git a/action.yml b/action.yml index a40ac13f52be..acaca196a1bd 100644 --- a/action.yml +++ b/action.yml @@ -1,39 +1,86 @@ 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_ui: + description: "Armbian user interface" + required: false + default: "minimal" runs: using: "composite" steps: - shell: bash run: | + + # userspace decode + if [[ "${{ inputs.armbian_ui }}" == minimal ]]; then + BUILD_DESKTOP="yes" + BUILD_MINIMAL="no" + elif [[ "${{ inputs.armbian_ui }}" == server ]]; then + BUILD_DESKTOP="no" + BUILD_MINIMAL="yes" + else + BUILD_DESKTOP="yes" + BUILD_MINIMAL="no" + DESKTOP_ENVIRONMENT="${{ inputs.armbian_ui }}" + DESKTOP_APPGROUPS_SELECTED="" + DESKTOP_ENVIRONMENT_CONFIG_NAME="config_base" + fi + + # compile image or kernel translation + BUILD_TARGET="${{ inputs.armbian_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="${BUILD_DESKTOP}" \ + BUILD_MINIMAL="${BUILD_MINIMAL}" \ + DESKTOP_ENVIRONMENT="${DESKTOP_ENVIRONMENT}" \ + DESKTOP_APPGROUPS_SELECTED="${DESKTOP_APPGROUPS_SELECTED}" \ + DESKTOP_ENVIRONMENT_CONFIG_NAME="${DESKTOP_ENVIRONMENT_CONFIG_NAME}" \ + COMPRESS_OUTPUTIMAGE="sha,img,xz" \ + SHARE_LOG="yes" \ + EXPERT="yes" + + # save path + echo "ARMBIAN_SCRIPT_PATH=${GITHUB_ACTION_PATH}" >> $GITHUB_ENV branding: - icon: "terminal" - color: "gray-dark" + icon: "check" + color: "red" +