-
Notifications
You must be signed in to change notification settings - Fork 49
/
action.yaml
58 lines (58 loc) · 1.57 KB
/
action.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: bsp
description: Radxa BSP Build Tool
inputs:
target:
required: true
edition:
required: true
revision:
retuired: false
default: 1
artifacts:
required: false
default: 'false'
release-id:
required: false
github-token:
required: false
runs:
using: "composite"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: radxa-repo/bsp
submodules: true
- name: Install dependency
shell: bash
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y qemu-user-static binfmt-support
- name: Build
shell: bash
run: |
mkdir .output
pushd .output
../bsp --long-version -r ${{ inputs.revision }} ${{ inputs.target }} ${{ inputs.edition }}
popd
- name: Upload artifacts
if: inputs.artifacts == 'true' && inputs.board != 'rootfs'
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.target }}_${{ inputs.edition }}_${{ inputs.revision }}
path: .output
- name: Upload
if: inputs.release-id != '' && inputs.github-token != ''
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ inputs.github-token }}
with:
release_id: ${{ inputs.release-id }}
file: .output/*
- name: Rollback release
if: failure() && inputs.release-id != '' && inputs.github-token != ''
uses: author/action-rollback@stable
env:
GITHUB_TOKEN: ${{ inputs.github-token }}
with:
release_id: ${{ inputs.release-id }}