-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
620e8fa
commit b42b945
Showing
1 changed file
with
126 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
name: Recreate Matrix (push) | ||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
paths: | ||
- "config/boards/*" | ||
- ".github/workflows/generate.yml" | ||
workflow_dispatch: | ||
jobs: | ||
|
||
build: | ||
name: Recreate action | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: armbian/os | ||
fetch-depth: 0 | ||
clean: false | ||
|
||
- name: Checkout Armbian Framework | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: armbian/build | ||
fetch-depth: 0 | ||
clean: false | ||
path: build | ||
|
||
- name: "Generate builds lists" | ||
run: | | ||
cat <<- EOF > .github/workflows/generated.yml | ||
name: Generated | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
armbian_target: | ||
type: choice | ||
description: 'Build' | ||
required: false | ||
options: | ||
- kernel | ||
- build | ||
default: build | ||
armbian_kernel_branch: | ||
type: choice | ||
description: 'Kernel branch' | ||
options: | ||
- legacy | ||
- current | ||
- edge | ||
default: 'current' | ||
armbian_release: | ||
type: choice | ||
description: 'Userspace' | ||
options: | ||
- jammy | ||
- bookworm | ||
- trixie | ||
default: 'jammy' | ||
armbian_ui: | ||
type: choice | ||
description: 'User interface (not all works)' | ||
options: | ||
- minimal | ||
- server | ||
- xfce | ||
- gnome | ||
- cinnamon | ||
- i3-wm | ||
- kde-plasma | ||
default: 'minimal' | ||
armbian_version: | ||
description: 'Version' | ||
required: false | ||
default: '' | ||
armbian_board: | ||
type: choice | ||
description: 'Board' | ||
options: | ||
EOF | ||
# generate lists to include them | ||
ls -1 build/config/boards/*.conf | cut -d"/" -f4 | cut -d"." -f1 | uniq | sed 's/.*/ - &/' >> .github/workflows/generated.yml | ||
cat <<- EOF >> .github/workflows/generated.yml | ||
jobs: | ||
build: | ||
name: "Build Armbian" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: armbian/build@AR-1459 | ||
with: | ||
armbian_token: "${{ '\${{secrets.GITHUB_TOKEN}}' }}" | ||
armbian_target: "${{ '\${{inputs.armbian_target}}' }}" | ||
armbian_release: "${{ '\${{inputs.armbian_release}}' }}" | ||
armbian_kernel_branch: "${{ '\${{inputs.armbian_kernel_branch}}' }}" | ||
armbian_ui: "${{ '\${{inputs.armbian_ui}}' }}" | ||
armbian_board: "${{ '\${{inputs.armbian_board}}' }}" | ||
armbian_release_tittle: "Armbian SDK" | ||
armbian_release_body: "Virtual images for x86 and arm64" | ||
armbian_pgp_key: "${{ '\${{secrets.GPG_KEY1}}' }}" | ||
armbian_pgp_password: "${{ '\${{secrets.GPG_PASSPHRASE1}}' }}" | ||
EOF | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "Armbianworker" | ||
git add .github/workflows/generated.yml | ||
git commit --allow-empty -m "Update generated GHA chunk workflow artifact-image-complete-matrix.yml" -a | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.ACCESS_TOKEN_ARMBIANWORKER }} | ||
repository: armbian/os | ||
branch: ${{ github.ref }} |