Skip to content

Commit

Permalink
modify the bucket only when running on main
Browse files Browse the repository at this point in the history
  • Loading branch information
wsipak committed Oct 30, 2023
1 parent cc8ada2 commit 39a2cab
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}
Expand All @@ -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:
Expand All @@ -127,15 +128,17 @@ 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 }}
with:
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
Expand All @@ -158,4 +161,4 @@ jobs:
- name: Print status
run: |
./scripts/generate_summary.py -c zephyr.yaml >> $GITHUB_STEP_SUMMARY

0 comments on commit 39a2cab

Please sign in to comment.