From 13587ae841d18d545bcdab7bb436da0db6372142 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 3 Jul 2024 10:53:07 +0800 Subject: [PATCH] chore: templates generated by RadxaOS-SDK/rsdk@a62f42fa89bc1403ca231db20c92e904c7381fe8 --- .github/dependabot.yaml | 6 +++ .github/workflows/build.yaml | 66 +++++++++++++++++++++++++++++ .github/workflows/dependabot.yaml | 23 ++++++++++ .github/workflows/test.yaml | 70 +++++++++++++++++++++++++++++++ README.md | 20 +++++++++ 5 files changed, 185 insertions(+) create mode 100644 .github/dependabot.yaml create mode 100644 .github/workflows/build.yaml create mode 100644 .github/workflows/dependabot.yaml create mode 100644 .github/workflows/test.yaml create mode 100644 README.md diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000..a574de2 --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,6 @@ +updates: +- directory: "/" + package-ecosystem: "github-actions" + schedule: + interval: "daily" +version: 2 \ No newline at end of file diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..60c1408 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,66 @@ +env: + GH_TOKEN: "${{ github.token }}" +jobs: + build: + 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: + edition: "${{ fromJSON(needs.prepare_release.outputs.editions )}}" + product: + - "radxa-e52c" + 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" + with: + fetch-depth: 0 + fetch-tags: true + - name: "Check for existing releases" + run: | + TAG="rsdk-b${{ github.run_number }}" + if git show-ref --tags --verify --quiet "refs/tags/${TAG}"; then + echo "Release ${TAG} exists." + exit 1 + fi + - name: "Generate changelog" + uses: "radxa-repo/rbuild-changelog@main" + with: + product: "radxa-e52c" + - id: "query" + name: "Query product info" + uses: "RadxaOS-SDK/rsdk/.github/actions/query@main" + with: + product: "radxa-e52c" + - id: "release" + name: "Create empty release" + uses: "softprops/action-gh-release@v2" + with: + body_path: "README.md" + draft: false + files: ".changelog/changelog.md" + name: "b${{ github.run_number }} (rsdk)" + prerelease: true + tag_name: "rsdk-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.yaml b/.github/workflows/dependabot.yaml new file mode 100644 index 0000000..355b64c --- /dev/null +++ b/.github/workflows/dependabot.yaml @@ -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.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..6b51cb3 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,70 @@ +env: + GH_TOKEN: "${{ github.token }}" +jobs: + build: + 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: + edition: "${{ fromJSON(needs.prepare_release.outputs.editions )}}" + product: + - "radxa-e52c" + 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" + with: + fetch-depth: 0 + fetch-tags: true + - name: "Check for existing releases" + run: | + TAG="rsdk-t${{ github.run_number }}" + if git show-ref --tags --verify --quiet "refs/tags/${TAG}"; then + echo "Release ${TAG} exists." + exit 1 + fi + - name: "Generate changelog" + uses: "radxa-repo/rbuild-changelog@main" + with: + product: "radxa-e52c" + - id: "query" + name: "Query product info" + uses: "RadxaOS-SDK/rsdk/.github/actions/query@main" + with: + product: "radxa-e52c" + - 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" + name: "t${{ github.run_number }} (rsdk)" + prerelease: true + tag_name: "rsdk-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 new file mode 100644 index 0000000..053b9f8 --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +# Radxa E52C +[![Build image for Release channel](https://github.com/radxa-build/radxa-e52c/actions/workflows/build.yaml/badge.svg)](https://github.com/radxa-build/radxa-e52c/actions/workflows/build.yaml) [![Build image for Test channel](https://github.com/radxa-build/radxa-e52c/actions/workflows/test.yaml/badge.svg)](https://github.com/radxa-build/radxa-e52c/actions/workflows/test.yaml) + +## What is this? + +This repo is the central location for Radxa-built system images for Radxa E52C. + +## What images are provided? + +Please also always use [the latest release](https://github.com/radxa-build/radxa-e52c/releases/latest) instead of any pre-release / test builds. Those will not be supported. + +## Where is the source code? + +This repository is only for hosting the GitHub workflows that build the image. As such, you will need to examine the workflow to find the builder. + +## Help! Something doesn't work! + +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.