Skip to content

ci: install AWS CLI on self-hosted runner for S3 upload#3726

Merged
oliverlaz merged 1 commit into
developfrom
ci/install-aws-cli-for-s3-upload
Jul 10, 2026
Merged

ci: install AWS CLI on self-hosted runner for S3 upload#3726
oliverlaz merged 1 commit into
developfrom
ci/install-aws-cli-for-s3-upload

Conversation

@oliverlaz

Copy link
Copy Markdown
Member

🎯 Goal

Follow-up to #3725 (merged), which restored the SampleApp Android APK upload to S3 that powers https://getstream.io/downloads/rn-sample-app.apk. That upload fails on the self-hosted public runner because the AWS CLI is not installed there (the original S3 job ran on GitHub-hosted ubuntu-latest, where aws is preinstalled). This PR makes the job install the AWS CLI when it is missing so the upload can succeed.

πŸ›  Implementation details

Adds an Ensure AWS CLI is available step to the build_and_deploy_android_firebase job in sample-distribution.yml, before the AWS credentials/upload steps:

  • No-op when aws is already on PATH (so it costs nothing if the runner image gains the CLI later).
  • Otherwise installs AWS CLI v2 from the official bundle, architecture-aware (x86_64 / aarch64).
  • Installs to a user-writable location ($HOME/.local/...) with no sudo, then appends the bin dir to $GITHUB_PATH so the subsequent Upload APK to S3 step picks it up.
  • Runs on develop only, matching the rest of the S3 flow.

🎨 UI Changes

N/A β€” CI/workflow-only change, no UI impact.

πŸ§ͺ Testing

CI-only change; verified by the develop pipeline rather than the example apps:

  1. On merge to develop, the build_and_deploy_android_firebase job runs the new install step and logs the resolved aws --version.
  2. Confirm the Upload APK to S3 step now succeeds in the Actions logs.
  3. Confirm https://getstream.io/downloads/rn-sample-app.apk serves the latest build.

β˜‘οΈ Checklist

  • I have signed the Stream CLA (required)
  • PR targets the develop branch
  • Documentation is updated
  • New code is tested in main example apps, including all possible scenarios
    • SampleApp iOS and Android
    • Expo iOS and Android

The S3 upload restored in #3725 fails on the self-hosted `public` runner
because the AWS CLI is not installed there. Add a step that installs AWS
CLI v2 when missing (no-op if already present), to a user-writable dir
without sudo, and exposes it via GITHUB_PATH so the upload step can run.
@oliverlaz
oliverlaz requested review from isekovanic and szuperaz July 10, 2026 10:24
@oliverlaz
oliverlaz merged commit 364d30a into develop Jul 10, 2026
10 checks passed
@oliverlaz
oliverlaz deleted the ci/install-aws-cli-for-s3-upload branch July 10, 2026 10:25
@stream-ci-bot

Copy link
Copy Markdown
Contributor

πŸŽ‰ This PR is included in version 9.7.0 πŸŽ‰

The release is available on:

Your semantic-release bot πŸ“¦πŸš€

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants