{"id":20857082,"url":"https://github.com/flipperdevices/flipperzero-ufbt-action","last_synced_at":"2025-08-20T18:13:13.424Z","repository":{"id":161085824,"uuid":"626120968","full_name":"flipperdevices/flipperzero-ufbt-action","owner":"flipperdevices","description":"Official ufbt Action wrapper for building Flipper Zero applications","archived":false,"fork":false,"pushed_at":"2024-03-06T21:26:48.000Z","size":30,"stargazers_count":103,"open_issues_count":1,"forks_count":9,"subscribers_count":9,"default_branch":"dev","last_synced_at":"2025-02-14T05:16:07.096Z","etag":null,"topics":["fap","faps","flipper-plugin","flipper-zero","flipperzero"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/build-flipper-application-package-fap","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flipperdevices.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-10T20:57:26.000Z","updated_at":"2025-02-10T16:00:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"0c2cebdd-e19c-4906-97ae-d56d61e61ff6","html_url":"https://github.com/flipperdevices/flipperzero-ufbt-action","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flipperdevices%2Fflipperzero-ufbt-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flipperdevices%2Fflipperzero-ufbt-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flipperdevices%2Fflipperzero-ufbt-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flipperdevices%2Fflipperzero-ufbt-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flipperdevices","download_url":"https://codeload.github.com/flipperdevices/flipperzero-ufbt-action/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243230060,"owners_count":20257640,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fap","faps","flipper-plugin","flipper-zero","flipperzero"],"created_at":"2024-11-18T04:36:02.741Z","updated_at":"2025-03-12T13:44:02.029Z","avatar_url":"https://github.com/flipperdevices.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"## GitHub Action for [ufbt, micro Flipper Build Tool](https://pypi.org/project/ufbt/)\n\nThis action brings all features of [ufbt](https://pypi.org/project/ufbt/) to GitHub Workflows. It is used to build applications for [Flipper Zero](https://flipperzero.one/). Building applications with `ufbt` is much faster than using `fbt` with [full firmware sources](https://github.com/flipperdevices/flipperzero-firmware), and it allows you to build applications for different versions of the firmware, including unofficial ones.\n\nThis action and has 3 modes of operation:\n\n* **application builder**: builds .fap (Flipper Application Package) file for the application in specified directory and returns a list of built files;\n* **linter**: runs linter (`clang-format`) on application's sources;\n* **ufbt setup**: makes `ufbt` available in the environment, without running any tasks. This mode is used to set up `ufbt` command and SDK for other steps in the workflow. \n\nYou can use [all SDK update modes](https://github.com/flipperdevices/flipperzero-ufbt/blob/dev/README.md#managing-the-sdk) supported by `ufbt`, including downloads from unofficial sources. See [SDK source options](#sdk-source-options) for action inputs used to specify SDK origin.\n\n\u003e This action caches toolchain used for `ufbt` operations, so it can be reused without being re-downloaded in subsequent runs of workflows in your repository.\n\n## Usage \n\nTo build your application with this action, you must create a workflow file in your repository. Place a file named `.github/workflows/build.yml` with one of the examples below, and, optionally, tune it to your needs.\n\n### Basic example: build and lint\n\nThis example will build your application for bleeding edge version, `dev`, of the official firmware, and upload generated binaries to GitHub artifacts. It will also run linter on your sources and fail the workflow if there are any formatting errors.\n\n```yaml\nname: \"FAP: Build and lint\"\non: [push, pull_request]\njobs:\n  ufbt-build-action:\n    runs-on: ubuntu-latest\n    name: 'ufbt: Build for Dev branch'\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n      - name: Build with ufbt\n        uses: flipperdevices/flipperzero-ufbt-action@v0.1\n        id: build-app\n        with:\n          # Set to 'release' to build for latest published release version\n          sdk-channel: dev\n      - name: Upload app artifacts\n        uses: actions/upload-artifact@v3\n        with:\n          name: ${{ github.event.repository.name }}-${{ steps.build-app.outputs.suffix }}\n          path: ${{ steps.build-app.outputs.fap-artifacts }}\n      # You can remove this step if you don't want to check source code formatting\n      - name: Lint sources\n        uses: flipperdevices/flipperzero-ufbt-action@v0.1\n        with:\n          # skip SDK setup, we already did it in previous step\n          skip-setup: true\n          task: lint\n```\n\n### Advanced example: build for multiple SDK sources\n\nThis example will build your application for 3 different SDK sources: `dev` and `release` channels of official firmware, and for an SDK from an unofficial source. It will upload generated binaries to GitHub artifacts. It will also do a build every day, even if there are no new commits in the repository, so you can be sure that your application is always up to date with the latest SDK.\n\n```yaml\nname: \"FAP: Build for multiple SDK sources\"\non:\n  push:\n    ## put your main branch name under \"braches\"\n    #branches: \n    #  - master \n  pull_request:\n  schedule: \n    # do a build every day\n    - cron: \"1 1 * * *\"\njobs:\n  ufbt-build-action:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        include:\n          - name: dev channel\n            sdk-channel: dev\n          - name: release channel\n            sdk-channel: release\n          - name: Unofficial firmware\n            # example URL, replace with a valid one\n            # you can also use other modes for specifying SDK sources\n            sdk-index-url: https://flipper.example.com/directory.json\n            sdk-channel: dev\n    name: 'ufbt: Build for ${{ matrix.name }}'\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n      - name: Build with ufbt\n        uses: flipperdevices/flipperzero-ufbt-action@v0.1\n        id: build-app\n        with:\n          sdk-channel: ${{ matrix.sdk-channel }}\n          sdk-index-url: ${{ matrix.sdk-index-url }}\n      - name: Upload app artifacts\n        uses: actions/upload-artifact@v3\n        with:\n          name: ${{ github.event.repository.name }}-${{ steps.build-app.outputs.suffix }}\n          path: ${{ steps.build-app.outputs.fap-artifacts }}\n```\n\n## Inputs\n\nAll inputs are **optional**. If you don't specify any inputs, `ufbt` will build your application for the latest release version of official firmware. You can use [fap-artifacts](#fap-artifacts) output to get a list of built files to [upload them](https://github.com/marketplace/actions/upload-a-build-artifact).\n\n#### `task`\n\nTask to run. Can be `setup`, `build` or `lint`. Default is `\"build\"`.\n\n#### `app-dir`\n\nPath to application's source code. Default is `\".\"` — the root of the repository.\n\n#### `ufbt-version`\n\nVersion of `ufbt` to use. Default is `\"latest\"` — the latest version available on PyPI. If set to `prerelease`, this action will fetch the latest [pre-release version](https://pypi.org/project/ufbt/#history). You can also use a PyPI version specifier, such as `\"\u003e=0.2.1,\u003c0.3.0\"`.\n\n#### `ufbt-args`\n\nAdditional arguments to pass to `ufbt`. Default is `-s` — which suppresses build system output, only leaving subcommands' outputs, such as compiler messages. Set to `\"\"` for extra verbosity. \nOnly handled when `task` is set to `build` or `lint`. See `ufbt` documentation for details.\n\n#### `skip-setup`\n\nIf set to `true`, skips SDK setup. Useful when running multiple action multiple times. Default is `false`.\n\n#### SDK source options\n\nTable below describes options for SDK update. See ufbt documentation on available [SDK update modes](https://github.com/flipperdevices/flipperzero-ufbt/blob/dev/README.md#managing-the-sdk) for details.\n\n| Input name      | `ufbt update` argument | Description |\n| ---             | ---                    | --- |\n| `sdk-channel`   | `--channel`            | Release channel to use. Can be `dev`, `rc` or `release` |\n| `sdk-branch`    | `--branch`             | Branch to use |\n| `sdk-index-url` | `--index-url`          | Index URL to use in branch and channel modes |\n| `sdk-file`      | `--file`               | Path to a local SDK file |\n| `sdk-url`       | `--url`                | Fixed URL to a remote SDK file |\n| `sdk-hw-target` | `--hw-target`          | Hardware target to use |\n\n## Outputs\n\n#### `fap-artifacts`\n\nA list of built `.fap` and `.fal` files. Can be used as input for `upload-artifact` action. Only available in `build` mode.\n\n#### `fap-dir`\n\nA directory with built artifacts and `.elf` files with debugging information. Only available in `build` mode.\n\n#### `api-version`\n\nAPI version used to build the application. Only available in `build` mode.\n\n#### `suffix`\n\nA suffix to use in artifact names, includes hardware target, API and SDK versions. Can be used for naming artifacts uploaded with `upload-artifact` action. Only available in `build` mode.\n\n#### `lint-messages`\n\nA list of linter messages, in case of any formatting errors. Only available in `lint` mode.\n\n#### `build-errors`\n\nA list of build errors, in case of any. Only available in `build` mode.\n\n#### `ufbt-status`\n\nA string, JSON object with ufbt status. Contains `ufbt status --json` output. Useful for extracting information about ufbt's directories, configured modes, etc. Useful in combination with [fromJSON() function](https://docs.github.com/en/actions/learn-github-actions/expressions#fromjson) to extract information from the output. For example, `${{ fromJSON(steps.\u003cbuild\u003e.ufbt-status).toolchain_dir }}`. Available in all modes. \n\n#### `toolchain-version`\n\nA version of the toolchain used to build the application. Defined by current SDK. Available in all modes.\n\n## Acknowledgements\n\nFirst version of this action was created by [Oleksii Kutuzov](https://github.com/oleksiikutuzov) and is available [here](https://github.com/oleksiikutuzov/flipperzero-ufbt-action). However, it no longer works with the latest version of `ufbt`. This version is a complete rewrite, with problem matcher borrowed from original verison.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflipperdevices%2Fflipperzero-ufbt-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflipperdevices%2Fflipperzero-ufbt-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflipperdevices%2Fflipperzero-ufbt-action/lists"}