CICD test
This commit is contained in:
parent
a1766f7307
commit
3663d61939
|
|
@ -0,0 +1,47 @@
|
|||
name: Build
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Prepare build environment
|
||||
run: ./cicd/prepare_runner.sh
|
||||
- name: Build
|
||||
run: ./cicd/docker_brun.sh
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
|
||||
with:
|
||||
tag_name: Balloon${{ github.run_id }}${{ github.run_attempt }}
|
||||
release_name: Release ${{ github.sha }}
|
||||
body: |
|
||||
Contents of this release:
|
||||
* update.img - Update image for LuckyFox pico Board.
|
||||
* output.zip - Contents of output folder
|
||||
draft: true
|
||||
prerelease: false
|
||||
- name: Upload Release Asset update.img
|
||||
id: upload-release-asset-update
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
||||
asset_path: ./balloon/output/update.img
|
||||
asset_name: rootfs.img
|
||||
asset_content_type: application/img
|
||||
# # BIGGER THAN 2G if not zipped!
|
||||
# - name: Upload Release Asset edl.zip
|
||||
# id: upload-release-asset-debian-edl
|
||||
# uses: actions/upload-release-asset@v1
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# with:
|
||||
# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
||||
# asset_path: ./edl.zip
|
||||
# asset_name: edl.zip
|
||||
# asset_content_type: application/zip
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
set -e
|
||||
|
||||
sudo docker run --privileged --mount type=bind,source="$(pwd)",target=/balloon luckfoxtech/luckfox_pico:latest /bin/bash /balloon/build.sh
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
set -e
|
||||
|
||||
# Install binfmt-support and zip
|
||||
sudo apt install -y binfmt-support qemu-user-static zip
|
||||
|
||||
# Install docker
|
||||
# Add Docker's official GPG key:
|
||||
sudo apt-get update
|
||||
sudo apt-get install ca-certificates curl gnupg
|
||||
sudo install -m 0755 -d /etc/apt/keyrings
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||
sudo chmod a+r /etc/apt/keyrings/docker.gpg
|
||||
|
||||
# Add the repository to Apt sources:
|
||||
echo \
|
||||
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
|
||||
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
|
||||
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
sudo apt-get update
|
||||
|
||||
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||
|
||||
# Do submodule checkout
|
||||
git submodule init
|
||||
git submodule update --depth=1
|
||||
Loading…
Reference in New Issue