uses: Meginhufr/brua-cli/action/pull@v1GitHub Actions
Two composite actions that run the command line from a workflow: push sends a file into review, pull keeps the released ids in your repository.
Both take a project API key as a secret. Neither can approve or merge, which a person does in Brua. They need Node 24 on the runner and set it up themselves; @v1 follows the latest release of the command line.
pull
- uses: Meginhufr/brua-cli/action/pull@v1
with:
api-key: ${{ secrets.BRUA_API_KEY }} # a key with delivery:read
project: <project>
out: src/brua/assets.ts # .ts, .swift, .kt, .cs or .json
check: true # fail when the file is out of date instead of writing itWithout check, the step writes the file when the project has changed; commit it with a step of your own, or run it in a scheduled workflow that opens a pull request. namespace sets the Kotlin package or C# namespace and all includes assets with no release yet. Outputs: count and changed.
push
- uses: Meginhufr/brua-cli/action/push@v1
with:
api-key: ${{ secrets.BRUA_API_KEY }} # a key with assets:write, and delivery:read to find change sets by name
project: <project>
file: brand/hero.jpg # the asset is named hero unless id says otherwise
alt: |
en=Red wool blanket
nb=Rødt ullpledd
change-set: Spring campaign # opened when there is none; left out, a new one for this changeFixed and animated assets give slots instead of file, one slot=file per line, and on the first push preset, width, height and color-schemes. Alt text can also be a sidecar hero.alt.json beside the file, or alt-file. wait: false uploads without waiting for processing or submitting.
Outputs: version, created, change-set (its id) and change-set-name, so a later step can link to the review.
Next
- Command line: every flag the actions map to.
- The lifecycle of an asset: what happens after the push.