From 39a2cab829ed98d1529113426aaf3c7e590fef90 Mon Sep 17 00:00:00 2001 From: Wojciech Sipak Date: Mon, 30 Oct 2023 15:03:42 +0100 Subject: [PATCH] modify the bucket only when running on main --- .github/workflows/workflow.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 4e2b3a9..2515f16 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -72,7 +72,7 @@ jobs: sudo apt -qq install --no-install-recommends git cmake ninja-build gperf \ ccache dfu-util device-tree-compiler wget \ python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file \ - make gcc gcc-multilib g++-multilib libsdl2-dev libmagic1 parallel + make gcc gcc-multilib g++-multilib libsdl2-dev libmagic1 parallel ls -lah @@ -97,7 +97,7 @@ jobs: # List workload ls -l boards_sample_pairs-* - + - name: Build matrix run: | echo Zephyr Matrix Runner @${{ matrix.runner }} of ${MATRIX_RUNNERS} @@ -117,6 +117,7 @@ jobs: build/**/*-result.json - id: gcp-auth + if: ${{github.event_name == 'push' && github.ref == 'refs/heads/main'}} name: GCP Authentcation uses: google-github-actions/auth@v1 with: @@ -127,6 +128,7 @@ jobs: export_environment_variables: false - name: Set up Cloud SDK + if: ${{github.event_name == 'push' && github.ref == 'refs/heads/main'}} uses: google-github-actions/setup-gcloud@v1 env: GOOGLE_GHA_CREDS_PATH: ${{ steps.gcp-auth.outputs.credentials_file_path }} @@ -134,8 +136,9 @@ jobs: version: '>= 363.0.0' - name: Upload artifacts to GCP + if: ${{github.event_name == 'push' && github.ref == 'refs/heads/main'}} run: | - gsutil -m rsync -r build/ gs://zephyr-samples-builder/zephyr/$ZEPHYR_VERSION + gsutil -m rsync -r build/ gs://zephyr-samples-builder/zephyr/$ZEPHYR_VERSION @@ -158,4 +161,4 @@ jobs: - name: Print status run: | ./scripts/generate_summary.py -c zephyr.yaml >> $GITHUB_STEP_SUMMARY - +