mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-03-05 15:05:23 +01:00
72 lines
2.6 KiB
YAML
72 lines
2.6 KiB
YAML
name: "[Build] transport-bluetooth binary"
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
create-pull-request:
|
|
description: "Create pull request with updated transport-bluetooth binary"
|
|
type: boolean
|
|
default: false
|
|
|
|
jobs:
|
|
build-bluetooth-binary:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
lfs: true
|
|
submodules: true
|
|
|
|
- name: Setup Docker
|
|
uses: docker/setup-docker-action@v4
|
|
|
|
- name: Build transport-bluetooth binary
|
|
working-directory: packages/transport-bluetooth
|
|
run: |
|
|
BUILD_VERSION_TAG="${{ github.ref_name }}:${{ github.sha }}"
|
|
mkdir build
|
|
touch build/index.html
|
|
docker build . -f ./scripts/Dockerfile -t trezor-bluetooth-image --build-arg BUILD_VERSION_TAG=$BUILD_VERSION_TAG
|
|
docker create --name trezor-bluetooth-container trezor-bluetooth-image
|
|
docker cp trezor-bluetooth-container:/output/. ../suite-data/files/bin/bluetooth
|
|
docker rm trezor-bluetooth-container
|
|
docker rmi trezor-bluetooth-image
|
|
|
|
- name: Upload binaries as artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: transport-bluetooth-binaries-${{ github.sha }}
|
|
path: |
|
|
packages/suite-data/files/bin/bluetooth
|
|
|
|
- name: Generate GitHub App token
|
|
if: inputs.create-pull-request == true
|
|
id: trezor-bot-token
|
|
uses: actions/create-github-app-token@v2
|
|
with:
|
|
app-id: ${{ secrets.TREZOR_BOT_APP_ID }}
|
|
private-key: ${{ secrets.TREZOR_BOT_PRIVATE_KEY }}
|
|
|
|
- name: Create pull request
|
|
if: inputs.create-pull-request == true
|
|
uses: peter-evans/create-pull-request@v4
|
|
with:
|
|
token: ${{ steps.trezor-bot-token.outputs.token }}
|
|
title: "chore(transport-bluetooth): update binaries"
|
|
commit-message: |
|
|
chore(transport-bluetooth): update binaries
|
|
build from: ${{ github.ref_name }}:${{ github.sha }}
|
|
committer: ${{ steps.trezor-bot-token.outputs.app-slug }}[bot] <208941332+${{ steps.trezor-bot-token.outputs.app-slug }}[bot]@users.noreply.github.com>
|
|
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
|
|
branch: transport-bluetooth-binaries-update-${{ github.sha }}
|
|
base: develop
|
|
signoff: false
|
|
delete-branch: true
|
|
labels: |
|
|
no-project
|
|
body: |
|
|
Update transport-bluetooth binaries built from commit ${{ github.sha }}
|
|
- Auto-generated by Trezor Bot
|
|
draft: false
|