Files
scripts/.github/workflows/build-firmware.yml
dependabot[bot] daa2b955b7 Bump actions/checkout from 2 to 3.1.0 (#29)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3.1.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-11 07:21:30 +02:00

150 lines
5.1 KiB
YAML

name: Build other
on:
workflow_dispatch:
workflow_call:
inputs:
reference:
required: false
type: string
runner:
required: true
type: string
uploading:
type: string
packagesrepo:
required: false
type: string
secrets:
KEY_TORRENTS:
required: true
KNOWN_HOSTS_UPLOAD:
required: true
jobs:
gradle:
if: ${{ github.repository_owner == 'Armbian' }}
strategy:
fail-fast: false
matrix:
board: [bananapi]
release: [focal]
name: Variant
runs-on: ${{ inputs.runner }}
steps:
- name: Runner prepare
uses: armbian/actions/runner-prepare@main
- run: |
REFERENCE=${{ inputs.reference }}
echo "REFERENCE=${REFERENCE:-"nightly"}" >> $GITHUB_ENV
PACKAGESREPO=${{ inputs.packagesrepo }}
echo "BETA=${PACKAGESREPO:-yes}" >> $GITHUB_ENV
- name: Checkout Armbian build script
uses: actions/checkout@v3.1.0
with:
repository: armbian/build
path: build
fetch-depth: '1'
ref: ${{ env.REFERENCE }}
clean: false
- name: Checkout support scripts
uses: actions/checkout@v3.1.0
with:
fetch-depth: '1'
repository: armbian/scripts
path: scripts
clean: false
- name: Remove previous artefacts if any
run: |
sudo rm -rf changes 2>/dev/null || true
- name: Download changes
uses: actions/download-artifact@v3
with:
name: changes
- name: Read changes
if: ${{ inputs.uploading == 'true' }}
run: |
[ -s changes ] || echo "SKIP=yes" >> $GITHUB_ENV
- name: Install SSH key for storage
if: ${{ github.repository_owner == 'Armbian' && inputs.uploading == 'true' && env.SKIP != 'yes' }}
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.KEY_TORRENTS }}
known_hosts: ${{ secrets.KNOWN_HOSTS_UPLOAD }}
if_key_exists: replace
- name: Mount upload folders
if: ${{ github.repository_owner == 'Armbian' && inputs.uploading == 'true' && env.SKIP != 'yes' }}
run: |
# use this only on our runners
##if [[ ${{ inputs.runner }} != "ubuntu-latest" ]]; then
# mount deploy target
sudo apt-get -y -qq install sshfs
sudo mkdir -p /root/.ssh/
sudo cp ~/.ssh/known_hosts /root/.ssh/
sudo mkdir -p build/output/debs || true
sudo mkdir -p build/output/debs-beta || true
sudo sshfs upload@users.armbian.com:/debs build/output/debs -o IdentityFile=~/.ssh/id_rsa -o reconnect -o allow_other || true
sudo sshfs upload@users.armbian.com:/debs build/output/debs -o IdentityFile=~/.ssh/id_rsa -o reconnect -o nonempty,allow_other || true
sudo sshfs upload@users.armbian.com:/debs-beta build/output/debs-beta -o IdentityFile=~/.ssh/id_rsa -o reconnect -o allow_other || true
sudo sshfs upload@users.armbian.com:/debs-beta build/output/debs-beta -o IdentityFile=~/.ssh/id_rsa -o reconnect -o nonempty,allow_other || true
## fi
- name: Sync
if: ${{ github.repository_owner == 'Armbian' && inputs.uploading == 'true' && env.SKIP != 'yes' }}
run: |
sudo mkdir -p build/userpatches build/cache/hash build/cache/hash-beta
sudo rm -f build/userpatches/targets.conf
sudo cp scripts/configs/* build/userpatches/
sudo rm -r build/cache/hash/* build/cache/hash-beta/* 2> /dev/null || true
- name: Pull Docker image
if: ${{ github.repository_owner == 'Armbian' && inputs.uploading == 'true' && env.SKIP != 'yes' }}
run: |
[[ -z $(command -v docker) ]] && sudo apt-get -yy install docker containerd docker.io
sudo docker kill $(sudo docker ps -q) 2>/dev/null || true
sudo docker image rm $(sudo docker images | grep -v latest"-$(dpkg --print-architecture)" | awk 'NR>1 {print $3}') 2> /dev/null || true
sudo docker pull ghcr.io/armbian/build:latest"-$(dpkg --print-architecture)"
- name: Build test image
if: ${{ github.repository_owner == 'Armbian' && inputs.uploading == 'true' && env.SKIP != 'yes' }}
run: |
mkdir -p build/userpatches
sudo cp scripts/configs/* build/userpatches/
cd build
export TERM=dumb
sudo sed -i "s/-it --rm/-i --rm/" userpatches/config-docker.conf
./compile.sh docker \
BETA="${{ env.BETA }}" \
EXPERT=yes \
BOARD=${{ matrix.board }} \
BRANCH=current \
RELEASE=${{ matrix.release }} \
CLEAN_LEVEL="make,oldcache" \
BUILD_MINIMAL=no \
KERNEL_ONLY=yes \
KERNEL_CONFIGURE=no \
IGNORE_UPDATES=yes \
REPOSITORY_INSTALL="u-boot,kernel,armbian-bsp-cli" \
SKIP_EXTERNAL_TOOLCHAINS=yes \
USE_MAINLINE_GOOGLE_MIRROR="yes"
- name: Runner prepare
uses: armbian/actions/runner-prepare@main