From 67fba5956909a4e4327c9fbdd9d00650679616f7 Mon Sep 17 00:00:00 2001 From: Balaji Arun Date: Tue, 8 Aug 2023 09:02:12 -0700 Subject: [PATCH] [gha] cargo metadata uploader (#9487) --- .github/workflows/cargo-metadata-upload.yaml | 26 ++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/cargo-metadata-upload.yaml diff --git a/.github/workflows/cargo-metadata-upload.yaml b/.github/workflows/cargo-metadata-upload.yaml new file mode 100644 index 0000000000000..f7514a74d303a --- /dev/null +++ b/.github/workflows/cargo-metadata-upload.yaml @@ -0,0 +1,26 @@ +name: Target Determinator Cargo Metadata Uploader +on: + push: + branches: + - "main" + pull_request: + paths: + - ".github/workflows/cargo-metadata-upload.yaml" +permissions: + contents: read + id-token: write +jobs: + cargo-metadata: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # pin@v1 + - id: auth + uses: "google-github-actions/auth@35b0e87d162680511bf346c299f71c9c5c379033" # pin@v + with: + workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }} + service_account: ${{ secrets.GCP_SERVICE_ACCOUNT_EMAIL }} + - uses: 'google-github-actions/setup-gcloud@v1' + - shell: bash + run: | + cargo metadata --all-features | gsutil cp - gs://aptos-core-cargo-metadata-public/metadata-${{ github.sha }}.json