Files
rerun-io--rerun/.github/workflows/reusable_bundle_and_upload_rerun_cpp.yml
2026-07-13 13:05:14 +08:00

62 lines
1.8 KiB
YAML

name: Reusable C++ bundling and upload
on:
workflow_call:
inputs:
CONCURRENCY:
required: true
type: string
PLATFORM_FILTER:
required: false
type: string
RELEASE_COMMIT:
required: false
type: string
default: ""
concurrency:
group: ${{ inputs.CONCURRENCY }}-bundle-and-upload-rerun-cpp
cancel-in-progress: true
defaults:
run:
shell: bash --noprofile --norc -euo pipefail {0}
permissions:
contents: "read"
id-token: "write"
jobs:
bundle-and-upload-rerun_cpp:
name: Bundle and upload rerun_cpp_sdk.zip
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.RELEASE_COMMIT || ((github.event_name == 'pull_request' && github.event.pull_request.head.ref) || '') }}
- id: "auth"
uses: google-github-actions/auth@v2
with:
workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}
- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v2"
with:
version: ">= 363.0.0"
- name: Install python gcs library
run: |
pip3 install google-cloud-storage
- name: Get sha
id: get-sha
run: |
full_commit="${{ inputs.RELEASE_COMMIT || ((github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.sha) }}"
echo "sha=$(echo $full_commit | cut -c1-7)" >> "$GITHUB_OUTPUT"
- name: "Bundle and upload rerun_cpp_sdk.zip"
run: python3 ./scripts/ci/bundle_and_upload_rerun_cpp.py --git-hash ${{ steps.get-sha.outputs.sha }} --platform-filter=${{ inputs.PLATFORM_FILTER }}