New CI flow for Climb OBC Software #2
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: 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 | |
run: | | |
pwd | |
ls -al | |
echo hello 1 | |
THE_SWVERSION=$(printf 'Ver_%.8s' "${{ github.sha }}" ) | |
MY_SWVERSION=$(printf 'My_%.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" | |
buildIt: | |
runs-on: ubuntu-latest | |
needs: prepBuild | |
name: Build the Software artefacts | |
steps: | |
- env: | |
OBC_VERSION: ${{needs.prepBuild.outputs.obcVersion}} | |
run: | | |
ls -al | |
echo hello 2 | |
echo "$OBC_VERSION" | |
pwd | |
ls -al |