Skip to content

New CI flow for Climb OBC Software #7

New CI flow for Climb OBC Software

New CI flow for Climb OBC Software #7

Workflow file for this run

name: New CI flow for Climb OBC Software
on:
push:
branches: [ develop ]
paths-ignore:
- '.github/**'
release:
types: [created]
workflow_dispatch:
jobs:
prepBuild:
runs-on: ubuntu-latest
name: Prepare Build Variables
outputs:
obcVersion: ${{ steps.create_ver.outputs.THE_SWVERSION }}
obcVersion2: ${{ steps.create_ver.outputs.MY_SWVERSION }}
steps:
- id: create_ver
name: Set Variables
run: |
THE_SWVERSION=$(printf '%.8s' "${{ github.sha }}" )
MY_SWVERSION=$(printf '%.10s' "$GITHUB_REF_NAME" )
#echo "THE_SWVERSION=$THE_SWVERSION" >> $GITHUB_ENV
#echo "MY_SWVERSION=$MY_SWVERSION" >> $GITHUB_ENV
echo "THE_SWVERSION=$THE_SWVERSION" >> "$GITHUB_OUTPUT"
echo "MY_SWVERSION=$MY_SWVERSION" >> "$GITHUB_OUTPUT"
echo "jobs output obcVersion set to '$THE_SWVERSION'"
echo "jobs output obcVersion2 set to '$MY_SWVERSION''"
buildIt:
runs-on: ubuntu-latest
needs: prepBuild
name: Build the Software artefacts
strategy:
matrix:
kind: ['obc', 'dev']
include:
- kind: obc
board: BA_CLIMBOBC
- kind: dev
board: BA_OM13085_EM2T
steps:
- env:
OBC_VERSION: ${{needs.prepBuild.outputs.obcVersion2}}
name: simulate build
run: |
echo "$OBC_VERSION"
echo dummy build creating result ...
echo "dummy content for ${{ matrix.kind }}"
echo "dummy content for ${{ matrix.kind }}" >> ./ClimbObc${{ env.OBC_VERSION }}-${{ matrix.kind }}.axf
pwd
ls
- name: Upload Binary
env:
MY_SWVERSION: ${{needs.prepBuild.outputs.obcVersion2}}
uses: actions/upload-artifact@v3
id: upload-axf
with:
name: 'Build-${{ env.MY_SWVERSION }}'
path: ClimbObc${{ env.MY_SWVERSION }}-${{ matrix.kind }}.axf
if-no-files-found: error