[WIP] Convert Jenkins metadata / binary upload to GitHub actions #2704
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy per-target metadata | |
# This action deploys target specific metadata to the S3 bucket | |
# This is needed because QGC needs to fetch correct metadata for the target | |
# to show correct set of parameter / event / airframes that is supported on | |
# the target, as it varies quite a bit between targets. | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'release/*' | |
- 'pr-metadata-test' | |
pull_request: | |
branches: | |
- '*' | |
# EXPERIMENTAL: Remove the PR trigger above before merging the PR!!! | |
jobs: | |
enumerate_targets: | |
runs-on: ubuntu-latest | |
container: px4io/px4-dev-base-focal:2021-09-08 | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
token: ${{secrets.ACCESS_TOKEN}} | |
- id: set-matrix | |
run: echo "matrix=$(./Tools/generate_board_targets_json.py)" >> $GITHUB_OUTPUT | |
build: | |
runs-on: ubuntu-latest | |
needs: enumerate_targets | |
strategy: | |
matrix: ${{fromJson(needs.enumerate_targets.outputs.matrix)}} | |
container: ${{ matrix.container }} | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
token: ${{secrets.ACCESS_TOKEN}} | |
- name: make ${{matrix.target}} | |
run: make ${{matrix.target}} | |
- name: parameter & events metadata | |
run: | | |
make ${{matrix.target}} ver_gen events_json actuators_json | |
./src/lib/version/get_git_tag_or_branch_version.sh build/${{ matrix.target }} >> $GITHUB_ENV | |
cd build/${{ matrix.target }} | |
mkdir _metadata || true | |
cp parameters.* events/*.xz actuators.json* _metadata |