|
| 1 | +name: Armsom-Sige5-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 armsom-sige5 \ |
| 40 | + -d https://repo.openeuler.org/openEuler-22.03-LTS-SP3/docker_img/aarch64/openEuler-docker.aarch64.tar.xz \ |
| 41 | + -n openEuler-22.03-LTS-SP3-Armsom-Sige5-aarch64-alpha1 \ |
| 42 | + -k https://github.com/armbian/linux-rockchip.git \ |
| 43 | + -b rk-6.1-rkr5.1 \ |
| 44 | + -c rockchip_linux_defconfig \ |
| 45 | + -r https://gitee.com/src-openeuler/openEuler-repos/raw/openEuler-22.03-LTS-SP3/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