Skip to content

Commit f5dc037

Browse files
authored
Create Station-m2-Build.yaml
1 parent fb8a4ab commit f5dc037

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Station-m2-Build
2+
on:
3+
workflow_dispatch:
4+
5+
jobs:
6+
prepare_release:
7+
runs-on: ubuntu-22.04-arm
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v2
11+
- name: Get time
12+
id: time
13+
uses: nanzm/get-time-action@v1.1
14+
with:
15+
format: 'YYYYMMDD-HHmm'
16+
- name: Create empty release
17+
id: release
18+
uses: softprops/action-gh-release@v1
19+
with:
20+
tag_name: ${{ steps.time.outputs.time }}
21+
body_path: VERSION
22+
token: ${{ secrets.GITHUB_TOKEN }}
23+
target_commitish: main
24+
draft: false
25+
outputs:
26+
release_id: ${{ steps.release.outputs.id }}
27+
build:
28+
runs-on: ubuntu-22.04-arm
29+
needs: prepare_release
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v2
33+
- name: Build
34+
shell: bash
35+
run: |
36+
git clone https://gitee.com/chainsx/SBC-sig --depth=1
37+
cd SBC-sig/scripts/rockchip/
38+
sudo bash build-image-docker.sh \
39+
--board firefly-roc-rk3566-pc \
40+
-d https://repo.openeuler.org/openEuler-24.03-LTS/docker_img/aarch64/openEuler-docker.aarch64.tar.xz \
41+
-n openEuler-24.03-LTS-Station-M2-aarch64-alpha1 \
42+
-k https://gitee.com/chainsx/rockchip-kernel.git \
43+
-b openEuler-24.03-LTS \
44+
-c openeuler_rockchip_defconfig \
45+
-r https://gitee.com/src-openeuler/openEuler-repos/raw/openEuler-24.03-LTS/generic.repo \
46+
-s headless
47+
- name: Upload
48+
if: needs.prepare_release.outputs.release_id != ''
49+
uses: xresloader/upload-to-github-release@v1
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
with:
53+
release_id: ${{ needs.prepare_release.outputs.release_id }}
54+
file: "./SBC-sig/scripts/rockchip/build/*/*.img.xz*"
55+
draft: false
56+
- name: Rollback release
57+
if: failure() && needs.prepare_release.outputs.release_id != ''
58+
uses: author/action-rollback@stable
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
with:
62+
release_id: ${{ needs.prepare_release.outputs.release_id }}

0 commit comments

Comments
 (0)