Skip to content

Commit

Permalink
[gha] cargo metadata uploader
Browse files Browse the repository at this point in the history
  • Loading branch information
ibalajiarun committed Aug 4, 2023
1 parent a56468a commit 45cafec
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/cargo-metadata-upload.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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: |
METADATA_FILENAME="metadata-${{ github.sha }}.json"
cargo metadata --all-features > ${METADATA_FILENAME}
echo "Uploading ${METADATA_FILENAME}..."
gsutil cp ${METADATA_FILENAME} gs://aptos-core-cargo-metadata-public/${METADATA_FILENAME}

0 comments on commit 45cafec

Please sign in to comment.