267 lines
7.5 KiB
YAML
267 lines
7.5 KiB
YAML
name: Build Images
|
|
|
|
on:
|
|
|
|
schedule:
|
|
- cron: "30 2 */2 * *"
|
|
|
|
workflow_dispatch:
|
|
inputs:
|
|
choice:
|
|
type: choice
|
|
description: Build targets
|
|
options:
|
|
- beta
|
|
- stable
|
|
- rc
|
|
runner:
|
|
type: choice
|
|
description: Build runners for CLI
|
|
options:
|
|
- small
|
|
- ubuntu-latest
|
|
sourcerepo:
|
|
description: Source repository
|
|
required: false
|
|
default: 'nightly'
|
|
advanced:
|
|
description: 'Single board (grep -w tinkerboard |)'
|
|
required: false
|
|
default: ''
|
|
|
|
jobs:
|
|
|
|
Cancel:
|
|
name: "Cancel currently active"
|
|
if: ${{ github.repository_owner == 'Armbian' }}
|
|
runs-on: small
|
|
steps:
|
|
- uses: n1hility/cancel-previous-runs@v2
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
fake:
|
|
|
|
runs-on: ubuntu-latest
|
|
needs: [ Cancel ]
|
|
name: Source changes
|
|
if: ${{ github.repository_owner == 'Armbian' }}
|
|
steps:
|
|
- run: |
|
|
echo "not empty" > changes
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
path: changes
|
|
name: changes
|
|
if-no-files-found: ignore
|
|
|
|
|
|
generaterelease:
|
|
|
|
needs: [ fake ]
|
|
runs-on: ubuntu-latest
|
|
name: "Update latest release"
|
|
steps:
|
|
|
|
- run: |
|
|
echo "Env: ${{ github.event.inputs.choice }}"
|
|
echo "Env: ${{ github.event.inputs.runner }}"
|
|
echo "Env: ${{ github.event.inputs.sourcerepo }}"
|
|
echo "Branch: ${{ github.event.inputs.branch }}"
|
|
|
|
- uses: actions/checkout@v3
|
|
if: ${{ github.repository_owner == 'Armbian' && github.event.inputs.choice != 'stable' && github.event.inputs.choice != 'rc' }}
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- uses: ncipollo/release-action@v1
|
|
if: ${{ github.repository_owner == 'Armbian' && github.event.inputs.choice != 'stable' && github.event.inputs.choice != 'rc' }}
|
|
with:
|
|
artifacts: "LICENSE"
|
|
tag: "latest"
|
|
name: "Build in progress"
|
|
bodyFile: ".github/Releases-wip.md"
|
|
allowUpdates: true
|
|
removeArtifacts: true
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
merge:
|
|
|
|
needs: [ generaterelease ]
|
|
uses: armbian/scripts/.github/workflows/merge-from-branch.yml@master
|
|
|
|
with:
|
|
branch: 'nightly'
|
|
runner: small
|
|
|
|
secrets:
|
|
GPG_KEY2: ${{ secrets.GPG_KEY2 }}
|
|
GPG_PASSPHRASE2: ${{ secrets.GPG_PASSPHRASE2 }}
|
|
|
|
x86:
|
|
|
|
needs: [ merge ]
|
|
uses: armbian/scripts/.github/workflows/build-with-docker.yml@master
|
|
|
|
with:
|
|
|
|
variant: 'cli:${{ github.event.inputs.choice }}'
|
|
sourcerepo: '${{ github.event.inputs.sourcerepo }}'
|
|
runner: ubuntu-latest
|
|
part: 1
|
|
of: 1
|
|
include: 'grep uefi-x86 | ${{ github.event.inputs.advanced }}'
|
|
exclude: ''
|
|
uploading: false
|
|
|
|
secrets:
|
|
GPG_KEY1: ${{ secrets.GPG_KEY1 }}
|
|
GPG_PASSPHRASE1: ${{ secrets.GPG_PASSPHRASE1 }}
|
|
GPG_KEY2: ${{ secrets.GPG_KEY2 }}
|
|
GPG_PASSPHRASE2: ${{ secrets.GPG_PASSPHRASE2 }}
|
|
SCRIPTS_ACCESS_TOKEN: ${{ secrets.SCRIPTS_ACCESS_TOKEN }}
|
|
SSH_KEY_TORRENTS: ${{ secrets.KEY_TORRENTS }}
|
|
KNOWN_HOSTS_UPLOAD: ${{ secrets.KNOWN_HOSTS_UPLOAD }}
|
|
|
|
x86-desktop:
|
|
|
|
needs: [ merge ]
|
|
uses: armbian/scripts/.github/workflows/build-with-docker.yml@master
|
|
|
|
with:
|
|
|
|
variant: 'desktop:${{ github.event.inputs.choice }}'
|
|
sourcerepo: '${{ github.event.inputs.sourcerepo }}'
|
|
runner: "big"
|
|
part: 1
|
|
of: 1
|
|
include: 'grep uefi-x86 | ${{ github.event.inputs.advanced }}'
|
|
exclude: ''
|
|
uploading: false
|
|
|
|
secrets:
|
|
GPG_KEY1: ${{ secrets.GPG_KEY1 }}
|
|
GPG_PASSPHRASE1: ${{ secrets.GPG_PASSPHRASE1 }}
|
|
GPG_KEY2: ${{ secrets.GPG_KEY2 }}
|
|
GPG_PASSPHRASE2: ${{ secrets.GPG_PASSPHRASE2 }}
|
|
SCRIPTS_ACCESS_TOKEN: ${{ secrets.SCRIPTS_ACCESS_TOKEN }}
|
|
SSH_KEY_TORRENTS: ${{ secrets.KEY_TORRENTS }}
|
|
KNOWN_HOSTS_UPLOAD: ${{ secrets.KNOWN_HOSTS_UPLOAD }}
|
|
|
|
cli1:
|
|
|
|
needs: [ merge ]
|
|
uses: armbian/scripts/.github/workflows/build-with-docker.yml@master
|
|
|
|
with:
|
|
|
|
variant: 'cli:${{ github.event.inputs.choice }}'
|
|
sourcerepo: '${{ github.event.inputs.sourcerepo }}'
|
|
runner: ubuntu-latest
|
|
part: 1
|
|
of: 2
|
|
include: '${{ github.event.inputs.advanced }}'
|
|
exclude: 'grep -v uefi-x86 | '
|
|
uploading: false
|
|
|
|
secrets:
|
|
GPG_KEY1: ${{ secrets.GPG_KEY1 }}
|
|
GPG_PASSPHRASE1: ${{ secrets.GPG_PASSPHRASE1 }}
|
|
GPG_KEY2: ${{ secrets.GPG_KEY2 }}
|
|
GPG_PASSPHRASE2: ${{ secrets.GPG_PASSPHRASE2 }}
|
|
SCRIPTS_ACCESS_TOKEN: ${{ secrets.SCRIPTS_ACCESS_TOKEN }}
|
|
SSH_KEY_TORRENTS: ${{ secrets.KEY_TORRENTS }}
|
|
KNOWN_HOSTS_UPLOAD: ${{ secrets.KNOWN_HOSTS_UPLOAD }}
|
|
|
|
|
|
cli2:
|
|
|
|
needs: [ merge ]
|
|
uses: armbian/scripts/.github/workflows/build-with-docker.yml@master
|
|
|
|
with:
|
|
|
|
variant: 'cli:${{ github.event.inputs.choice }}'
|
|
sourcerepo: '${{ github.event.inputs.sourcerepo }}'
|
|
runner: '${{ github.event.inputs.runner }}'
|
|
part: 2
|
|
of: 2
|
|
include: '${{ github.event.inputs.advanced }}'
|
|
exclude: 'grep -v uefi-x86 | '
|
|
uploading: false
|
|
|
|
secrets:
|
|
GPG_KEY1: ${{ secrets.GPG_KEY1 }}
|
|
GPG_PASSPHRASE1: ${{ secrets.GPG_PASSPHRASE1 }}
|
|
GPG_KEY2: ${{ secrets.GPG_KEY2 }}
|
|
GPG_PASSPHRASE2: ${{ secrets.GPG_PASSPHRASE2 }}
|
|
SCRIPTS_ACCESS_TOKEN: ${{ secrets.SCRIPTS_ACCESS_TOKEN }}
|
|
SSH_KEY_TORRENTS: ${{ secrets.KEY_TORRENTS }}
|
|
KNOWN_HOSTS_UPLOAD: ${{ secrets.KNOWN_HOSTS_UPLOAD }}
|
|
|
|
desktop1:
|
|
|
|
needs: [ merge ]
|
|
uses: armbian/scripts/.github/workflows/build-with-docker.yml@master
|
|
|
|
with:
|
|
variant: 'desktop:${{ github.event.inputs.choice }}'
|
|
sourcerepo: '${{ github.event.inputs.sourcerepo }}'
|
|
runner: "big"
|
|
part: 1
|
|
of: 2
|
|
include: '${{ github.event.inputs.advanced }}'
|
|
exclude: 'grep -v uefi-x86 | '
|
|
uploading: false
|
|
|
|
secrets:
|
|
GPG_KEY1: ${{ secrets.GPG_KEY1 }}
|
|
GPG_PASSPHRASE1: ${{ secrets.GPG_PASSPHRASE1 }}
|
|
GPG_KEY2: ${{ secrets.GPG_KEY2 }}
|
|
GPG_PASSPHRASE2: ${{ secrets.GPG_PASSPHRASE2 }}
|
|
SCRIPTS_ACCESS_TOKEN: ${{ secrets.SCRIPTS_ACCESS_TOKEN }}
|
|
SSH_KEY_TORRENTS: ${{ secrets.KEY_TORRENTS }}
|
|
KNOWN_HOSTS_UPLOAD: ${{ secrets.KNOWN_HOSTS_UPLOAD }}
|
|
|
|
desktop2:
|
|
|
|
needs: [ merge ]
|
|
uses: armbian/scripts/.github/workflows/build-with-docker.yml@master
|
|
|
|
with:
|
|
variant: 'desktop:${{ github.event.inputs.choice }}'
|
|
sourcerepo: '${{ github.event.inputs.sourcerepo }}'
|
|
runner: "big"
|
|
part: 2
|
|
of: 2
|
|
include: '${{ github.event.inputs.advanced }}'
|
|
exclude: 'grep -v uefi-x86 | '
|
|
uploading: false
|
|
|
|
secrets:
|
|
GPG_KEY1: ${{ secrets.GPG_KEY1 }}
|
|
GPG_PASSPHRASE1: ${{ secrets.GPG_PASSPHRASE1 }}
|
|
GPG_KEY2: ${{ secrets.GPG_KEY2 }}
|
|
GPG_PASSPHRASE2: ${{ secrets.GPG_PASSPHRASE2 }}
|
|
SCRIPTS_ACCESS_TOKEN: ${{ secrets.SCRIPTS_ACCESS_TOKEN }}
|
|
SSH_KEY_TORRENTS: ${{ secrets.KEY_TORRENTS }}
|
|
KNOWN_HOSTS_UPLOAD: ${{ secrets.KNOWN_HOSTS_UPLOAD }}
|
|
|
|
jobsend:
|
|
|
|
name: finish
|
|
needs: [x86,x86-desktop,cli1,desktop1,cli2,desktop2]
|
|
runs-on: [ubuntu-latest]
|
|
if: ${{ github.repository_owner == 'Armbian' && github.event.inputs.choice != 'stable' && github.event.inputs.choice != 'rc' }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: ncipollo/release-action@v1
|
|
with:
|
|
tag: "latest"
|
|
bodyFile: ".github/Releases.md"
|
|
name: "Automated builds"
|
|
allowUpdates: true
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|