From babfb86a4d8fd99e130677411c6cae4b0febb905 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 23 Apr 2024 19:30:03 +0800 Subject: [PATCH] chore: templates generated by RadxaOS-SDK/rsdk@f093495.dirty --- .github/dependabot.yml | 11 ++-- .github/workflows/build.yml | 96 ++++++++++++++-------------- .github/workflows/dependabot.yml | 23 +++++++ .github/workflows/test.yml | 104 ++++++++++++++++--------------- README.md | 16 +---- 5 files changed, 132 insertions(+), 118 deletions(-) create mode 100644 .github/workflows/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 2c7d170..a574de2 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,7 +1,6 @@ -version: 2 updates: - # Maintain dependencies for GitHub Actions - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "daily" +- directory: "/" + package-ecosystem: "github-actions" + schedule: + interval: "daily" +version: 2 \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1cb89f0..f51b63f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,53 +1,55 @@ -name: Build image for Release channel -on: - workflow_dispatch: - env: - GH_TOKEN: ${{ github.token }} - + GH_TOKEN: "${{ github.token }}" jobs: - prepare_release: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Generate rbuild changelog - uses: radxa-repo/rbuild-changelog@main - with: - product: radxa-zero - - name: Create empty release - id: release - uses: softprops/action-gh-release@v2 - with: - tag_name: b${{ github.run_number }} - body_path: README.md - token: ${{ secrets.GITHUB_TOKEN }} - target_commitish: main - draft: false - prerelease: true - files: .changelog/changelog.md - outputs: - release_id: ${{ steps.release.outputs.id }} build: - runs-on: ubuntu-latest - needs: prepare_release + needs: "prepare_release" + runs-on: "ubuntu-latest" + steps: + - name: "Checkout" + uses: "actions/checkout@v4" + - name: "Build image" + uses: "RadxaOS-SDK/rsdk/.github/actions/build@main" + with: + edition: "${{ matrix.edition }}" + github-token: "${{ secrets.GITHUB_TOKEN }}" + product: "${{ matrix.product }}" + release-id: "${{ needs.prepare_release.outputs.release_id }}" + suite: "${{ matrix.suite }}" strategy: matrix: - boards: [radxa-zero] - build_systems: [rbuild] - # distros: [debian, ubuntu] - suites: [bookworm, jammy] - flavors: [kde, cli] + edition: "${{ fromJSON(needs.prepare_release.outputs.editions )}}" + product: + - "radxa-zero" + suite: "${{ fromJSON(needs.prepare_release.outputs.suites )}}" + prepare_release: + outputs: + editions: "${{ steps.query.outputs.editions }}" + release_id: "${{ steps.release.outputs.id }}" + suites: "${{ steps.query.outputs.suites }}" + runs-on: "ubuntu-latest" steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Upload rbuild image - uses: radxa-repo/rbuild@main - if: matrix.build_systems == 'rbuild' - with: - board: ${{ matrix.boards }} - # distro: ${{ matrix.distros }} - suite: ${{ matrix.suites }} - flavor: ${{ matrix.flavors }} - release-id: ${{ needs.prepare_release.outputs.release_id }} - github-token: ${{ secrets.GITHUB_TOKEN }} + - name: "Checkout" + uses: "actions/checkout@v4" + - name: "Generate changelog" + uses: "radxa-repo/rbuild-changelog@main" + with: + product: "radxa-zero" + - id: "query" + name: "Query product info" + uses: "RadxaOS-SDK/rsdk/.github/actions/query@main" + with: + product: "radxa-zero" + - id: "release" + name: "Create empty release" + uses: "softprops/action-gh-release@v2" + with: + body_path: "README.md" + draft: false + files: ".changelog/changelog.md" + prerelease: true + tag_name: "b${{ github.run_number }}" + target_commitish: "main" + token: "${{ secrets.GITHUB_TOKEN }}" +name: "Build image for release channel" +"on": + workflow_dispatch: {} \ No newline at end of file diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml new file mode 100644 index 0000000..355b64c --- /dev/null +++ b/.github/workflows/dependabot.yml @@ -0,0 +1,23 @@ +jobs: + dependabot: + if: "github.actor == 'dependabot[bot]'" + runs-on: "ubuntu-latest" + steps: + - id: "metadata" + name: "Dependabot metadata" + uses: "dependabot/fetch-metadata@v2" + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + - env: + GH_TOKEN: "${{secrets.GITHUB_TOKEN}}" + PR_URL: "${{github.event.pull_request.html_url}}" + name: "Approve a PR & Enable auto-merge for Dependabot PRs" + run: | + gh pr review --approve "$PR_URL" + gh pr merge --auto --merge "$PR_URL" +name: "Dependabot auto-merge" +"on": + pull_request: {} +permissions: + contents: "write" + pull-requests: "write" \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c9b8fb9..17b9df2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,57 +1,59 @@ -name: Build image for Test channel -on: - workflow_dispatch: - env: - GH_TOKEN: ${{ github.token }} - + GH_TOKEN: "${{ github.token }}" jobs: - prepare_release: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Generate rbuild changelog - uses: radxa-repo/rbuild-changelog@main - with: - product: radxa-zero - - name: Create empty release - id: release - uses: softprops/action-gh-release@v2 - with: - tag_name: test-build-${{ github.run_number }} - body: | - This is a test build for internal development. - Only use when specifically instructed by Radxa support. - token: ${{ secrets.GITHUB_TOKEN }} - target_commitish: main - draft: false - prerelease: true - files: .changelog/changelog.md - outputs: - release_id: ${{ steps.release.outputs.id }} build: - runs-on: ubuntu-latest - needs: prepare_release + needs: "prepare_release" + runs-on: "ubuntu-latest" + steps: + - name: "Checkout" + uses: "actions/checkout@v4" + - name: "Build image" + uses: "RadxaOS-SDK/rsdk/.github/actions/build@main" + with: + edition: "${{ matrix.edition }}" + github-token: "${{ secrets.GITHUB_TOKEN }}" + product: "${{ matrix.product }}" + release-id: "${{ needs.prepare_release.outputs.release_id }}" + suite: "${{ matrix.suite }}" + test-repo: true + timestamp: "t${{ github.run_number }}" strategy: matrix: - boards: [radxa-zero] - build_systems: [rbuild] - # distros: [debian, ubuntu] - suites: [bookworm, jammy] - flavors: [kde, cli] + edition: "${{ fromJSON(needs.prepare_release.outputs.editions )}}" + product: + - "radxa-zero" + suite: "${{ fromJSON(needs.prepare_release.outputs.suites )}}" + prepare_release: + outputs: + editions: "${{ steps.query.outputs.editions }}" + release_id: "${{ steps.release.outputs.id }}" + suites: "${{ steps.query.outputs.suites }}" + runs-on: "ubuntu-latest" steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Upload rbuild image - uses: radxa-repo/rbuild@main - if: matrix.build_systems == 'rbuild' - with: - board: ${{ matrix.boards }} - # distro: ${{ matrix.distros }} - suite: ${{ matrix.suites }} - flavor: ${{ matrix.flavors }} - release-id: ${{ needs.prepare_release.outputs.release_id }} - github-token: ${{ secrets.GITHUB_TOKEN }} - test-repo: true - timestamp: t${{ github.run_number }} + - name: "Checkout" + uses: "actions/checkout@v4" + - name: "Generate changelog" + uses: "radxa-repo/rbuild-changelog@main" + with: + product: "radxa-zero" + - id: "query" + name: "Query product info" + uses: "RadxaOS-SDK/rsdk/.github/actions/query@main" + with: + product: "radxa-zero" + - id: "release" + name: "Create empty release" + uses: "softprops/action-gh-release@v2" + with: + body: | + This is a test build for internal development. + Only use when specifically instructed by Radxa support. + draft: false + files: ".changelog/changelog.md" + prerelease: true + tag_name: "t${{ github.run_number }}" + target_commitish: "main" + token: "${{ secrets.GITHUB_TOKEN }}" +name: "Build image for test channel" +"on": + workflow_dispatch: {} \ No newline at end of file diff --git a/README.md b/README.md index 827eaca..557b2ca 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Radxa ZERO -[![Build](https://github.com/radxa-build/radxa-zero/workflows/Build/badge.svg)](https://github.com/radxa-build/radxa-zero/actions/workflows/build.yml) +[![Build image for Release channel](https://github.com/radxa-build/radxa-zero/actions/workflows/build.yml/badge.svg)](https://github.com/radxa-build/radxa-zero/actions/workflows/build.yml) [![Build image for Test channel](https://github.com/radxa-build/radxa-zero/actions/workflows/test.yml/badge.svg)](https://github.com/radxa-build/radxa-zero/actions/workflows/test.yml) ## What is this? @@ -7,22 +7,10 @@ This repo is the central location for Radxa-built system images for Radxa ZERO. ## What images are provided? -Currently 4 flavors are provided: - -- Debian KDE: This flavor is officially supported, tested, and recommended for all users. -- Debian CLI: This flavor is officially supported. This flavor is quite minimal and is intended for headless usage. We do not support desktop usage on top of this flavor. -- Ubuntu KDE: This flavor is provided as-is except for critical issues. Users should look at Debian KDE as an alternative. -- Ubuntu CLI: This flavor is provided as-is except for critical issues. Users should look at Debian CLI as an alternative. - Please also always use [the latest release](https://github.com/radxa-build/radxa-zero/releases/latest) instead of any pre-release / test builds. Those will not be supported. -## Is there any other options? - -- [Manjaro](https://github.com/manjaro-arm/radxa-zero-images) -- [Armbian](https://www.armbian.com/radxa-zero/) - ## Help! Something doesn't work! -For other questions, please first take a look at [our Wiki](https://wiki.radxa.com/Zero), which covers the most basic usages. +For other questions, please first take a look at [our Documentation](https://docs.radxa.com), which covers the most basic usages. Should you have any additional questions, please visit [our forum](https://forum.radxa.com/) or [our Discord](https://rock.sh/go), and we are willing to help.