diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 3d65c4b91c7d..fc7d0a12020b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -247,7 +247,7 @@ jobs: contents: "read" id-token: "write" - if: github.ref == 'refs/heads/main' || github.event.inputs.force_update_web_build + #if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || github.event.inputs.force_update_web_build runs-on: ubuntu-latest-16-cores container: image: rerunio/ci_docker:0.6 @@ -281,14 +281,26 @@ jobs: - id: "auth" uses: google-github-actions/auth@v1 with: - workload_identity_provider: "projects/11779445316/locations/global/workloadIdentityPools/rerun-github-actions-ci/providers/github" - service_account: "github-actions-ci@rerun-open.iam.gserviceaccount.com" + workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }} + service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }} - - id: "upload-folder" + - name: Add SHORT_SHA env property with commit short sha + run: echo "SHORT_SHA=`echo ${{github.sha}} | cut -c1-8`" >> $GITHUB_ENV + + - name: "Upload web-viewer" + uses: google-github-actions/upload-cloud-storage@v1 + with: + path: "web_viewer" + destination: "rerun-web-viewer/commit/${{env.SHORT_SHA}}" + parent: false + + - name: "Upload web-viewer (tagged)" + if: startsWith(github.ref, 'refs/tags/v') uses: google-github-actions/upload-cloud-storage@v1 with: path: "web_viewer" - destination: "rerun-web-viewer" + destination: "rerun-web-viewer/version/${{github.ref_name}}" + parent: false # ---------------------------------------------------------------------------