From e96516f52e803799ad7340744186e8d5cb35586f Mon Sep 17 00:00:00 2001 From: Luochongjun Date: Thu, 27 May 2021 20:11:12 +0800 Subject: [PATCH] support github actions --- .github/workflows/build-snapshot.yml | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/build-snapshot.yml diff --git a/.github/workflows/build-snapshot.yml b/.github/workflows/build-snapshot.yml new file mode 100644 index 0000000..c176f12 --- /dev/null +++ b/.github/workflows/build-snapshot.yml @@ -0,0 +1,36 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the main branch + schedule: + - cron: '0 3 * * *' + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: self-hosted + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + # build source code + - name: build + run: cd ~/work/runner-script/sdk4_script && ./build_firmware_by_source + + - uses: actions/upload-artifact@v2 + with: + name: ./snapshot_firmware + path: | + ./bin/target/**/*squashfs-sysupgrade.bin + ./bin/target/**/*squashfs-sysupgrade.img + ./bin/target/**/*squashfs-sysupgrade.tar