diff --git a/.github/workflows/carbonix_build.yml b/.github/workflows/carbonix_build.yml index c532bef513..df41a98e6f 100644 --- a/.github/workflows/carbonix_build.yml +++ b/.github/workflows/carbonix_build.yml @@ -319,15 +319,17 @@ jobs: shell: sh -e {0} - name: Run aircraft_config.py + id: aircraft_config run: | python Tools/Carbonix_scripts/aircraft_config.py "libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/aircraft_configuration/${{ matrix.xml_file }}.xml" "${{ env.commit_id }}" - # Check if the folder exists if not skip the next steps - if [ ! -d "final-output" ]; then - echo "No final-output folder found, skipping the next steps" - exit 0 + if [ -d "final-output" ]; then + echo "exists=true" >> $GITHUB_ENV + else + echo "exists=false" >> $GITHUB_ENV fi - name: Install AWS CLI + if: steps.aircraft_config.outputs.exists == 'true' run: | apt-get update -y DEBIAN_FRONTEND=noninteractive apt-get install -y curl unzip @@ -336,6 +338,7 @@ jobs: ./aws/install --update - name: Configure AWS credentials + if: steps.aircraft_config.outputs.exists == 'true' uses: aws-actions/configure-aws-credentials@v4 with: aws-access-key-id: ${{ secrets.AWS_S3_ACCESS_KEY_ID }} @@ -343,16 +346,19 @@ jobs: aws-region: us-east-1 - name: Upload to S3 + if: steps.aircraft_config.outputs.exists == 'true' run: | PATH_TO_S3=${{ needs.setup-s3-path.outputs.s3_path }} echo "Uploading Artifacts to: $PATH_TO_S3" aws s3 cp final-output/ $PATH_TO_S3 --recursive - name: Upload build artifacts + if: steps.aircraft_config.outputs.exists == 'true' uses: actions/upload-artifact@v4 with: name: ${{ matrix.xml_file }} path: final-output/${{ matrix.xml_file }}/ + build-sitl: runs-on: 'windows-latest'